开发者

Highlighting custom locations on map

I would like to do something like what is shown in the screenshot - http://themanyfacesof.com/wp-content/uploads/2010/03/map.png

I want to be able to highlight certain areas on a map using PHP as a server side technology and jQuery(preferable) on client side with some tooltip functionality. Is there anythin开发者_JAVA技巧g available or any idea how this could be achieved with the complexity involved?


Completely client-side solution: http://jvectormap.owl-hollow.net/


Look into using Google Maps for this. You can overlay lines and polygons which effectively means you can do anything - for example Loughbrough University does this.

A good way to start is to

  1. Log in to Google
  2. Go to Google Maps, then to my maps and create a new map
  3. Draw polygons and line using the tools provided
  4. Right click and copy the link for Google Earth, visit this link but change the output to KML output=kml. KML is just like XML
  5. You now have a file with the exported polygons and lines that you drew. You can then re-draw these onto a Google Map programmatically

I did this the other day to get some rather complex polygons drawn onto a map without having to trial and error the latitude and longitude coordinates for them.

Hope that helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜