locked
Clustering module fails for only 1 pin RRS feed

  • Question

  • I'm using the client side clustering feature as demonstrated in the Loading Dynamic Modules -> Load Module - clustering.

    It all seems to work without problems, except in the case where I only have 1 pin to display.  I get a javascript error in veapicore.js : Unable to get value of the property 'latitude': object is null or undefined

    I can reproduce this by modifying the following line in the Bing Maps Portal page (under Loading dynamic module -> Load module - clustering).

    TestDataGenerator.GenerateData(100,dataCallback);

    to

    TestDataGenerator.GenerateData(1,dataCallback);

    It works for anything greater than 1, but if I set it to 1, I get the same error message displayed on the right, and no pins appear.

    • Moved by Ricky_Brundritt Saturday, March 10, 2012 12:31 PM (From:Bing Maps: Map Control and Web services Development)
    Sunday, December 18, 2011 1:17 PM

Answers

All replies

  • Download the latest version of this module from here: http://bingmapsv7modules.codeplex.com/ This issue was corrected a while ago.
    http://rbrundritt.wordpress.com
    • Marked as answer by taen Monday, December 19, 2011 10:35 PM
    Monday, December 19, 2011 11:35 AM
  • That's great, thanks.  Hadn't even realised there was a codeplex project, had been using the download supplied with the article below.

    http://www.bing.com/community/site_blogs/b/maps/archive/2011/03/01/bing-maps-v7-modular-design-and-client-side-clustering.aspx

    Monday, December 19, 2011 10:35 PM