Hello there
I think this component is really great, but i was wondering, how could i get one marker to display on more than one maps???
...
Samantha
set one marker to display on multiple maps
-
- Phoca Newbie
- Posts: 9
- Joined: 27 May 2009, 13:56
- Location: Greece
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: set one marker to display on multiple maps
Hi, you can assing marker to only one map.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 9
- Joined: 27 May 2009, 13:56
- Location: Greece
Re: set one marker to display on multiple maps
For any one who is wondering how this can be done.. well all you have to do is:
1. add the extra fields in the sql markers table catid_1, catid_2, blablabla...
2. paste this line in the map.php in the models where it reads the sql database and let it know it needs to read the extra fields catid_1 .. catid_2 blablabla.. you have added in your sql markers table.
.' LEFT JOIN #__phocamaps_map AS c ON c.id = a.catid OR c.id = a.catid_1 OR c.id = a.catid_2 OR c.id = a.catid_3 OR c.id = a.catid_4 OR c.id = a.catid_5' bla bla bla...
If in case u are also using the plugin, do make sure that you also add the line on the maps.php in the plugin or else it will not call the markers in the specified maps.
About the front end now.. i have no idea how to get it to ask from the php the extra fields.. u can only add the maps u want the markers to display on in your sql directly.. i do not know how to make the connection in php
If anyone knows how.. please do share!!
Thanks..have fun!
Jan you have done an excellent job.. keep going
cheers
1. add the extra fields in the sql markers table catid_1, catid_2, blablabla...
2. paste this line in the map.php in the models where it reads the sql database and let it know it needs to read the extra fields catid_1 .. catid_2 blablabla.. you have added in your sql markers table.
.' LEFT JOIN #__phocamaps_map AS c ON c.id = a.catid OR c.id = a.catid_1 OR c.id = a.catid_2 OR c.id = a.catid_3 OR c.id = a.catid_4 OR c.id = a.catid_5' bla bla bla...
If in case u are also using the plugin, do make sure that you also add the line on the maps.php in the plugin or else it will not call the markers in the specified maps.
About the front end now.. i have no idea how to get it to ask from the php the extra fields.. u can only add the maps u want the markers to display on in your sql directly.. i do not know how to make the connection in php
If anyone knows how.. please do share!!
Thanks..have fun!
Jan you have done an excellent job.. keep going
cheers
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: set one marker to display on multiple maps
Great to hear it, thank you for this guide. Jan
If you find Phoca extensions useful, please support the project