Google maps and Umbraco: Many markers?
I am creating a Google Map in a Umbraco solution. I have around 1000 markers to be displayed on the map, and all data for the markers are stored as individual nodes in Umbraco. What is the best way, performance wise, to pull out and display all these markers? I开发者_JAVA技巧t should also be possible to segment on the markers shown, ie., different categories etc.
You should look at retrieving the nodes with an XSLT or Razor macro, and transforming the list of details (lat/long etc.) into a Javascript array, which you then pass to the Google Maps Javascript constructor. Darren Ferguson, the creator of the Google Maps datatype for Umbraco, has a great blog post demonstrating how to achieve this with a single marker, which could be easily adapted for multiple markers.
精彩评论