Hi, Support I was wondering if there was a way to add zoom levels onto Bing maps. We have successfully dont it to goolge maps but i was wondering if it was possible with bing i tried to convert the code to use the bing map instead of googles but with no luck
Client Side
function OnOverlaysDrawing(layers) {
for (var index = 0; index <
layers.length
; index++) {
var
templayer
=
layers
[index];
if (OpenLayers.String.contains(templayer.CLASS_NAME, ‘Bing Map’))
//if (OpenLayers.String.contains(templayer.CLASS_NAME.indexOf(‘Bing’) > 0))
{
templayer.options.numZoomLevels = 0;
templayer.options.maxZoomLevels = 20;
templayer.MIN_ZOOM_LEVEL = 0;
templayer.MAX_ZOOM_LEVEL = 20;
templayer.RESOLUTIONS.push(templayer.RESOLUTIONS[19] / 2);
templayer.RESOLUTIONS.push(templayer.RESOLUTIONS[20] / 2);
}
}
}
Server Side
private ZoomLevelSet CustomZoomlevelSets()
{
ZoomLevelSet myZoomlevelset = new ZoomLevelSet();
BingMapsZoomLevelSet bingzoomlevelsets = new BingMapsZoomLevelSet();
foreach (ZoomLevel item in bingzoomlevelsets.GetZoomLevels())
{
myZoomlevelset.CustomZoomLevels.Add(item);
}
ZoomLevel zoomlevel19 = new ZoomLevel(myZoomlevelset.GetZoomLevels()[myZoomlevelset.GetZoomLevels().Count - 1].Scale / 2);
myZoomlevelset.CustomZoomLevels.Add(zoomlevel19);
ZoomLevel zoomlevel20 = new ZoomLevel(myZoomlevelset.GetZoomLevels()[myZoomlevelset.GetZoomLevels().Count - 1].Scale / 2);
myZoomlevelset.CustomZoomLevels.Add(zoomlevel20);
return myZoomlevelset;
}