Hello WEC Community,
I've created a small (quick and dirty) patch to support multiple marker icons in wec_map.
Since I only needed it for my own plugin, I've only patched the core functions, to include all this into the existing plugins is easily possible, but the management of Icons is a complicated task. I thought about creating an own table for the icons, but since this would have been overkill for my own plugin, I didn't do it.
Short description:
I've added a global variable (array $icons) to class.tx_wecmap_map_google.php and a function ("add_marker_icon") to fill this array.
I've changed all "addMarkerBy*" to include the parameter "$iconID=''".
In the "drawMap" function i've included a foreach to add the javascript for all different marker icons.
So you have to add all your desired Icons in your plugin via "add_marker_icon" and when you add a marker you have to add as last parameter the ID of the marker to use.
Since I didn't remove any existing code, and simply add the ID of the markericon to the end of the markername it's totally backwards compatible. If you don't add individual markers you stay with the standard one.
Please take a look at the source code to understand it better
If you're interested in this path, here's the downloadlink to get everything: www.hupfau.com/fileadmin/_DUMP_/wec_map.rar
I've included a patch against the actual release version 1.3.6 and also the complete changed source in the file.
Also included is the source of my small plugin, which I use to show the partners on our company homepage (http://www.archlinexp.cc/de/partner/partner-uebersichtskarte.html) where you can see everything working ...
It would be very nice, if the WEC Team could take a look at it, perhaps it's possible to include it into the main distribution ... If you like and want I'm willing to also update the original plugins to include the option ... perhaps I'm really adding the markers table
If you have any questions, just answer to this post ...
I've created a small (quick and dirty) patch to support multiple marker icons in wec_map.
Since I only needed it for my own plugin, I've only patched the core functions, to include all this into the existing plugins is easily possible, but the management of Icons is a complicated task. I thought about creating an own table for the icons, but since this would have been overkill for my own plugin, I didn't do it.
Short description:
I've added a global variable (array $icons) to class.tx_wecmap_map_google.php and a function ("add_marker_icon") to fill this array.
I've changed all "addMarkerBy*" to include the parameter "$iconID=''".
In the "drawMap" function i've included a foreach to add the javascript for all different marker icons.
So you have to add all your desired Icons in your plugin via "add_marker_icon" and when you add a marker you have to add as last parameter the ID of the marker to use.
Since I didn't remove any existing code, and simply add the ID of the markericon to the end of the markername it's totally backwards compatible. If you don't add individual markers you stay with the standard one.
Please take a look at the source code to understand it better
If you're interested in this path, here's the downloadlink to get everything: www.hupfau.com/fileadmin/_DUMP_/wec_map.rar
I've included a patch against the actual release version 1.3.6 and also the complete changed source in the file.
Also included is the source of my small plugin, which I use to show the partners on our company homepage (http://www.archlinexp.cc/de/partner/partner-uebersichtskarte.html) where you can see everything working ...
It would be very nice, if the WEC Team could take a look at it, perhaps it's possible to include it into the main distribution ... If you like and want I'm willing to also update the original plugins to include the option ... perhaps I'm really adding the markers table
If you have any questions, just answer to this post ...



Author:
Author: