My crude hack for custom markers.
-
Couldn’t make it work with the geomashup custom plugin, so I finally did it my way.
Probably not the best hack to get custom markers working, but it does the trick for me.
This hack will get overwritten by any updates, and so will the markers that you created.
Therefore make a backup of these files, in order to repeat the hack in future updates of the plugin.
Probably it would be better to do this in the geomashup custom plugin, but I don’t know how to do so.First you need to create your new markers.
Name them for instance like this > mm_36_apartment.png mm_36_bar.png etcetera.
Obvious only in case you would want to have markers for apartment or bar listings.
These names will be used in the two files you subsequently need to hack.
Create all the markers you will need with your desired names and place them in the images folder of the plugin.Now first make a backup of the file js/geo-mashup.js
Open the file geo-mashup.js and look at the lines starting at 103 or so, starting with color_names :Replace the color definitions here with your own, adapted to the names of your custom markers.
For convenience you also change the colors inside the dropdown field to white.
My own choices are the following.color_names : ['airport','wreck','nature','turtle','tools','village','info','boat','sailing','restaurant','palm','resort','snacks','bank','hotel','snorkling','footprint','bed','cottages','car','diving','shop','camera','medical','bar','apartment','villa'], colors : { 'airport':'#000000', 'wreck':'#000000', 'nature':'#000000', 'turtle':'#000000', 'tools':'#000000', 'village':'#000000', 'info':'#000000', 'boat':'#000000', 'sailing':'#000000', 'restaurant':'#000000', 'palm':'#000000', 'snacks':'#000000', 'bank':'#000000', 'hotel':'#000000', 'resort':'#000000', 'snorkling':'#000000', 'footprint':'#000000', 'bed':'#000000', 'cottages':'#000000', 'car':'#000000', 'diving':'#000000', 'shop':'#000000', 'camera':'#000000', 'medical':'#000000', 'bar':'#000000', 'apartment':'#000000', 'villa':'#000000' },Now you need to hack another file, options.php starting at line 118,
// Create marker and color arrays.
Make a backup of options.php first.In my own setting and with the markers as above, I replaced the marker and color arrays to the following.
$colorNames = Array( 'airport' => '#ffffff', 'apartment' => '#ffffff', 'bank' => '#ffffff', 'bar' => '#ffffff', 'bed' => '#ffffff', 'boat' => '#ffffff', 'camera' => '#ffffff', 'car' => '#ffffff', 'cottages' => '#ffffff', 'diving' => '#ffffff', 'footprint' => '#ffffff', 'hotel' => '#ffffff', 'info' => '#ffffff', 'medical' => '#ffffff', 'nature' => '#ffffff', 'palm' => '#ffffff', 'resort' => '#ffffff', 'restaurant' => '#ffffff', 'sailing' => '#ffffff', 'shop' => '#ffffff', 'snacks' => '#ffffff', 'snorkling' => '#ffffff', 'tools' => '#ffffff', 'turtle' => '#ffffff', 'villa' => '#ffffff', 'village' => '#ffffff', 'wreck' => '#ffffff');Thats all.
I recommend saving a copy of these modifications somewhere so that you do not have to redo it all in accidental case of overwriting during an update.
You can see an example on This page.
If somebody has an improvement to this please let me know.
Still looking for a way to save the hack in such way that it does not get overwritten by updates.
The topic ‘My crude hack for custom markers.’ is closed to new replies.