1) What kind of zoom error you are referring to? There are properties in the map control to set the minimum scale and maximum scale, while please be more considered about your attempt when you are trying this. winformsMap1.MinimumScale = 10000; winformsMap1.MinimumScale = double.MaxValue;
3) You can try to set the ApplyZoomLevel for the layer, while this can be only applied for feature layer. If it is raster layer, you can try to set the UpperThreshold and LowerThreshold for it.
4) Try the following code snippet to set the text color as transparent to see if it works for you. GraticuleAdornmentLayer adormentLayer = new GraticuleAdornmentLayer(); adormentLayer.GraticuleTextBrush = new GeoSolidBrush(GeoColor.StandardColors.Transparent);
Also,please try to set a projection to the GraticuleAdormentLayer,following is some sample code you can refer to, hope it helps. wiki.thinkgeo.com/wiki/File:...101005.zip
Any more questions please feel free to let me know.
I am sorry to say that you missed the attachment, please try to upload it again. Also, if possible, it would be good and helpful if a sample application could be provided to recreate the issue or to show your attempt.
Any more questions please feel free to let me know.
I am sorry I cannot fully understand your question nor recreate it, could you try to add the following statement to see if it could resolve your issue. winformsMap1.MaximumScale = Double.MaxValue winformsMap1.MinimumScale = 0
If your problem still exists, could your wrap your application into an executable solution, from which I can recreate the issue? I think that definitely would be helpful and useful to identify the issue.
Any more questions please feel free to let me know.
Now the first problem is solved, means I have set my maps minimum and maximum scale, thats the error is not coming at zoom till maximum or minimum scale.
Sorry if I was not able to describe my problem properly, lets try to explain again my requirement, suppose I have defined 20 levels of zoom, now I want when my application display any map first time, that should be 10th level of zoom. If you want my code file, I will send, if required.
Thanks for your post and description, I think I now understand your question, hope I am right.
Following code snippet shows you how to display the third zoomlevel of the map control, please try it. winformsMap1.ZoomToScale(winformsMap1.ZoomLevelSet.ZoomLevel03.Scale);
Any more questions please feel free to let me know.
I had work with you code, and its working, but one problem coming with this, when I am going with zoom and zoom, with mouse click continued, at end return error, which is attached as file.
From the description of the error in attachment, I think this issue is happening when you are trying to convert a line shape into an area base shape, which will definitely cause some problem as their types are different. So please pay some attention to this logic to avoid this.
Yale, I am not trying to convert any thing, the same code is running perfactly, when I an not using default zoom option given by map suite. This error is coming after using custom zoom. I think the problem is I am not able to control zoom function after reaching it max zoom level. So, suppose my minimum scale is 0, and when I am continued with zoom, where I should stop zooming activity when scale is 0. This is basic problem.
So basically I think the program required to check and stop zooming when it is on minimum or maximum value.
I am not trying to convert any thing, the same code is running perfactly, when I an not using default zoom option given by map suite. This error is coming after using custom zoom.
I think the problem is I am not able to control zoom function after reaching it max zoom level.
So, suppose my minimum scale is 0, and when I am continued with zoom, where I should stop zooming activity when scale is 0.
This is basic problem.
So basically I think the program required to check and stop zooming when it is on minimum or maximum value.
How to find cuttent zoom level of map, I have used following code
Dim CurLevel as string = WinformsMap1.ZoomLevelSet.GetZoomLevel(WinformsMap1.CurrentExtent, WinformsMap1.Width, WinformsMap1.MapUnit).Name
Try to take a look at the following sample provided in our wiki, it should give you some hints on how to find the current zoom level: wiki.thinkgeo.com/wiki/File:...100621.zip
Any more questions or concerns please feel free to let me know.
I had already gone with your suggested sample. And after yesterday testing, I can brief the situation when this error arises.
I have a tab file wich display data with point style like below Dim customPointStyle As Style = New PointStyle(PointSymbolType.Star, New GeoSolidBrush(GeoColor.SimpleColors.LightGreen), 10)
In the above case no error generating, while zooming, even after the minimum scale arises,
But when I am taking tab file which display with area style like below Dim customAreaStyle As Style = New LineStyle(New GeoPen(GeoColor.SimpleColors.Black, 1))
In the above case, it throws error, when try to zoom after reaching minimum scale.
So I think the best way to stop zoom after reaching minimum or maximum scale. Or you can suggest better way. If the option is stop zoom, the how to stop?
As you know I was busy to set projection of map. Now I have tested above code, but nothing progress. Still I am getting same message.
ArgumentOutOfRangeException Was Unhandled. Specified argument was out of range of valid values. Parameter Name: The Scale was too small or too large, Please set the minimum or maximum scale.
I have set scale like below WinformsMap1.MaximumScale = Double.MaxValue WinformsMap1.MinimumScale = 100
Private Sub WinformsMap1_CurrentScaleChanging(ByVal sender As Object, ByVal e As CurrentScaleChangingWinformsMapEventArgs) If e.CurrentScale < WinformsMap1.MinimumScale Or e.CurrentScale > WinformsMap1.MaximumScale Then e.Cancel = True End If End Sub
but after debugging I am able to tell you, when I am zooming for last scale, before fire the CurrentScaleChanging event, the above error throw.
Could you give me the version information of map control you are using against? I think we recently resolved an issue probably related with this issue, you can try to get the version by calling the following API:
string version = WinformsMap.GetVersion();
Any more questions please feel free to let me know.
Actually Still I am waiting for 4.5.143.0 version of daily build. On my customer portal (tab Evalution Daily Build) I am able to see 4.5.142.0. So, where I will find 4.5.143.0.