How do I highlight a certain city on world Map using jVectorMap plugin
-
15-02-2021 - |
Question
I need to have a small identifier to highlight the particular city on Map using jVectorMap. what would be the Ideal way to do so. May be I can put something like image(say 3px wide and high red coloured near San Francisco) on Map. This way users can locate the precise location rather than USA in general.
Solution
You can do it in the last version of jVectorMap.
OTHER TIPS
jVectorMap does just that, draw vectors. I don't see any mention in the API of defining true "points". So you can either draw a tiny polygon around San Fransisco, or you can overlay your own image manually. jsFiddle
<img src="http://www.changosurf.com/images/marker_red.png" id="sanFranMarker" title="San Fransisco"/>
...
#map-usa { position: relative; width: 600px; height: 400px;}
#sanFranMarker{ position: absolute; top: 160px; left:17px;}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow