ThinkGeo.com    |     Documentation    |     Premium Support

scaleBar and show the map by specific zoomlevel

Hello all,


I have two question...


Q1. I'd like to input the coordinates and set it be the center of the map, and map showing by specific zoomlevel (ex. zoomlevel16)


I displayed the map and set the center of input long/lat in the map by ZoomIntoCenter or  currentExtent.  (I don't want to zoom in percentage of XX to show the map.)


        Have any method to do this?


Q2. How to modify font size or font style of scaleBar ?


 



Carol,


I am happy that you have questions again! I am very glad to help you learn how to use MapSuite.


The first question you can zoom to scale and center at the coordinate.


            double scale = new ZoomLevelSet().ZoomLevel16.Scale;
            winformsMap1.ZoomToScale(scale);
            winformsMap1.CenterAt(pointShape);

The second question, do you mean ScaleBarAdornmentLayer, it has a property called Font that you can set it.


            ScaleBarAdornmentLayer scaleLineAdornmentLayer = new ScaleBarAdornmentLayer();
            scaleLineAdornmentLayer.Font.Size = 16;
            scaleLineAdornmentLayer.Font.Style = DrawingFontStyles.Italic;

Please let me know if you have more questions


Thanks


James


 



Thanks for your reply, James


But It shows property of readOnly, and it can't be modified.


       Dim ScaleBarAdornmentLayer As ScaleBarAdornmentLayer = New ScaleBarAdornmentLayer()

        ScaleBarAdornmentLayer.Location = AdornmentLocation.LowerLeft

        ScaleBarAdornmentLayer.Font.Size = 16     (X)

        ScaleBarAdornmentLayer.Font.Style = DrawingFontStyles.Italic   (X)

 



Carol, 



If the property of property is read only, you can set property itself by new value. 

Dim scaleBarAdornmentLayer As ScaleBarAdornmentLayer = new ScaleBarAdornmentLayer()

scaleBarAdornmentLayer.Location = AdornmentLocation.LowerLeft

scaleBarAdornmentLayer.Font = new GeoFont("Arial", 16, DrawingFontStyles.Italic)



Thanks 

James