开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜