I want to zoom in to my map for a wpgs98 data at zoomlevel16.
PointShape pshape=new PointShape(28.111,40.111111);
Map1.ZoomTo(pshape,???);
I want to zoom in to my map for a wpgs98 data at zoomlevel16.
PointShape pshape=new PointShape(28.111,40.111111);
Map1.ZoomTo(pshape,???);
Here is the code Tolga.
PointShape pshape = new PointShape(28.111, 40.111111);
Map1.ZoomTo(pshape, Map1.ClientZoomLevelScales[15]);
Here I used the scale from ClientZoomLevel. Also you can use it from ServerZoomLevel. Please see the following post if you are interested.
gis.thinkgeo.com/Support/Dis...fault.aspx
Ben
I cannot zoom to specific point
Tolga,
Can you try the following code instead?
Map1.ZoomToScale(Map1.ClientZoomLevelScales[15]);
Map1.CenterAt(pshape);
We recommend you to enable the mouse coordinate which may help you know what’s going on.
Map1.MapTools.MouseCoordinate.Enabled = true;
Also I am not very sure what wpgs98 is, I googled it and seems no item exactly matches. So if you still have problem, please let me know more about that.
Thanks,
Ben
Map1.ZoomToScale(Map1.ClientZoomLevelScales[15]);
Dont set the zoom level. I add my maps to CustomOverlays layer. Is it the reason?
Tolga,
I’m still not sure about your problem. Here is a sample for you showing how to use the ZoomTo method under DecimalDegree and GoogleMap projection, they both work fine. Can you have a look what the difference is with your apps?
Thanks,
Ben
377-Post5231.zip (105 KB)
Thanks Ben
I work with your code. But it still goes directly to the point without zooming. I changed zoomlevel 10 to 16. I’m using evaluation copy. The reason can be that?
I download the latest evaluation copy & replace all previous reference with the newest ones in my project.
It’s solved thanks for your help Ben.
My pleasure:)