ThinkGeo.com    |     Documentation    |     Premium Support

Predefine the area visible when the map is shown first?

Hello,



how can I define the are that becomes visible (including zoom level) etc. when the map is loaded. I assume that CurrentScale and CurrentExtent are the values to set, but I don’t know how to find out these values from a running map. I tried to use the ExtentChangedEvent sample to find useful values. But when I try to apply e.g. the values below that I measured with this sample, I get a “The input double value is out of range” exception for pParametername: maxY on loading.



I’m using WorldMapKitWmsWebOverlay and MapUnit is GeographyUnit.DecimalDegree



Thanks!



CurrentScale:

54070.29327392578 


CurrentExtent:(left, top, right, bottom)


10.836685180664,

48.320089190986,

10.956848144532,

48.407636493232



Hi Karsten,



Please try the sequence 10.836685180664, 48.407636493232,
10.956848144532, 48.320089190986, it should work fine.



Thanks,

Johnny


… ah, now I see. Thanks!!!

You are welcome, any questions, please let us know. 
  
 Regards, 
 Johnny