2013-07-03 33 views
1

我有兩個變種的,用來吸取我的兵地圖多邊形BING地圖層和PINS:如何在POLYGON層上繪製圖釘?

map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), { 
     showMapTypeSelector:false, 
     showScalebar:false, 
     enableSearchLogo:false, 
     showDashboard:true, 
     credentials:"Aku0L3I-4aBqUL0zUWpJYNIp-vppMK2h", 
     mapTypeId:Microsoft.Maps.MapTypeId.road, 
     zoom:4, 
     center:new Microsoft.Maps.Location(38.3466110000000029,-77.0653559999999942) 
    }); 

這個地圖變種。

greenLayer = new ClusteredEntityCollection(map, { 
     singlePinCallback: createPin, 
     clusteredPinCallback: createClusteredPin, 
     clusterPlacementType: 2, 
     clusteringEnabled: true, 
     visible: true, 
     gridSize: 50 

    }); 

這個綠色圖層用於在bing地圖上繪製引腳。

運行的同時,

the polygon is up and the pins is down. 

i need to draw polygon down and pins up. 

怎麼辦greenlayer which comes up在Bing地圖。

+0

明智的冠軍吧。 – 2013-07-03 03:36:51

回答

1

您可以更改ClusteredEntityCollection的z-index的(因爲它是所謂的對EntityCollection擴展名)用一個簡單的:在較低或適當的情況下

greenLayer.setOptions({zIndex: 1000});