|
Sandy Matheson
Topic creator
registered since: 10/04/2005
Posts: 79
|
Is it possible to use the Table Map with tables other than tt_address, feusers and cal? It would be incredibly helpful to be able to map the churches in our diocese and we have all the addresses and lat/long within our bespoke database extension?
This may be along the same lines, but the docs talk about extensions that are "WEC Map enabled" - are there any documents about how to enable our own extensions?
Many thanks for any help,
Sandy
|
|
Christoph Koehler
registered since: 10/24/2005
Posts: 383
|
Sandy,
Sure! Just add this to your extension's ext_tables.php:
[code]
$TCA['fe_users']['ctrl']['EXT']['tablenamehere'] = array (
'isMappable' => 1,
'addressFields' => array (
'street' => 'field name of street info',
'city' => 'field name of city info',
'state' => 'etc',
'zip' => 'etc',
'country' => 'etc',
),
);
[/code]
That should make the new table show up in WEC Table Map.
Christoph
|
|
Sandy Matheson
Topic creator
registered since: 10/04/2005
Posts: 79
|
Christoph,
Many thanks for this. I have asked Simon to include this in a forthcoming update to our database extension and will then work on that instead of re-entering all the addresses manually.
One further quesion on this, if we have the latitude and longitude in our database can this be used to accuratly position the markers using a Table Map? My experience of markers based on address is that they are often inaccurate and I would prefer not to have to manually correct 150+ markers by adjusting the Geocode Admin under the WEC Map Admin!
Many thanks for your support,
Sandy
|
|
Christoph Koehler
registered since: 10/24/2005
Posts: 383
|
Sandy,
No, you can't, unfortunately. I've had good experience with accurate geocoding in the UK in the few examples I've seen, though. Make sure you set the default country in the extension config in the Extension Manager section for WEC Map, that should help a lot.
Christoph
|
|
Sandy Matheson
Topic creator
registered since: 10/04/2005
Posts: 79
|
Hi,
Simon has now included the following in ext_tables.php but the only tables appearing in the WEC Map Table plugin are still fe_users and tt_address - so the table for pd_diocesedatabase is not there. Any idea why this might be?
[code]$TCA['fe_users']['ctrl']['EXT']['tx_pddiocesedatabase_address'] = array (
'isMappable' => 1,
'addressFields' => array (
'street' => 'address1',
'city' => 'address2',
'state' => 'address3',
'country' => 'address4',
'zip' => 'postcode',
'name' => 'churchname',
'email' => 'officeemail',
'telephone' => 'officetelephone',
),
);[/code]
Many thanks,
Sandy
|
|
Christoph Koehler
registered since: 10/24/2005
Posts: 383
|
Sandy,
Sorry for the long wait. The problem is the wrong TCA definition. It should be:
$TCA['tx_pddiocesedatabase_address']['ctrl']['EXT']['wec_map'] = array (
// snip
}
Christoph
|