Technology Tools for Ministry

Community

Web-Empowered Church User Community
All Categories > Ministry Tools > Map Extension > Multiple Marker Icons
Total Posts: 4 - Pages (1): [1]
Author: Andreas Hupfau
Posted: Dec 12 2007 - 05:19 PM
Subject: Multiple Marker Icons
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 ...
user picture Author: Christoph Koehler
Posted: Dec 12 2007 - 05:29 PM
Subject: re: Multiple Marker Icons
Andreas,

Thank you very much for you work! I am busy at the moment with finals and all that good stuff but I will take a look at your patch once that's over.

Thanks again!

Christoph
user picture Author: Christoph Koehler
Posted: Jan 02 2008 - 06:32 PM
Subject: re: Multiple Marker Icons
Andreas,

Just for the record, I added your patch to trunk and it will be in the next major release of wec_map. Thanks again for the work, this was an often requested feature!
I did remove your comments from the code to keep it clean, but you will get full credit in the changelog and already got credit in the svn commit for that feature.

Thanks!

Christoph
user picture Author: Mark Stephenson
Posted: Jan 04 2008 - 09:34 PM
Subject: re: Multiple Marker Icons
Thanks again Andreas!!

In Christ,
Mark
Total Posts: 4 - Pages (1): [1]
You must login to post a message to this conference.