locked
Bing Maps v7 AJAX - hide cluster layer RRS feed

  • Question

  • Hi, Bing Maps newbie here.  I need to do the following - hopefully on the same map in the same div:

    1.  Zoom <= 7 - show a regular EntityCollection layer of pins with summary data in the info box. 

    2.  Zoom > 7 and < 14 - show a EntityClusteredCollection layer of detail data pins and info boxes. 

    3.  Zoom 14+ - show no pins- just the map. 

    I have the zoom <= 7 layer working.  I have a point based layer working for the zoom 7-14 layer.  However, I can't hide the EntityClusteredCollection layer as the map zooms in and out.  How can I accomplish this?

    Thanks!

    Wednesday, November 27, 2013 9:08 PM

Answers

  • Use the GetLayer method on the ClusteredEntityCollection. This will return a reference to the base EntityCollection. You can then set the option on this layer to hide it.

    http://rbrundritt.wordpress.com

    Wednesday, November 27, 2013 9:14 PM

All replies

  • Use the GetLayer method on the ClusteredEntityCollection. This will return a reference to the base EntityCollection. You can then set the option on this layer to hide it.

    http://rbrundritt.wordpress.com

    Wednesday, November 27, 2013 9:14 PM
  • var layer = incidentLayer.GetLayer();
    layer.setOptions({ visible: false });

    PERFECT!  Thanks so much!  Just what I needed.

    Friday, November 29, 2013 3:17 AM