Hello,
I need to use the style SizedPointStyle how should I make it to work with the WEB edition?
thanks.
jm.
Hello,
I need to use the style SizedPointStyle how should I make it to work with the WEB edition?
thanks.
jm.
Hello Jean-marie,
Thanks for your post, you can visit the this link to get the SizedPointStyle sample.
wiki.thinkgeo.com/wiki/Map_Suite_We...oint_Style
It's almost the same it works in the Service and WebEdition. And below is the code I change to web edition.
Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean);
Map1.MapUnit = GeographyUnit.DecimalDegree;
// Add the static layers to the MapEngine
ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer(MapPath("~/SampleData/World/Countries02.shp"), ShapeFileReadWriteMode.ReadOnly);
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.County1;
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
worldLayer.Open();
Map1.CurrentExtent = worldLayer.GetBoundingBox();
worldLayer.Close();
LayerOverlay layerOverlay = new LayerOverlay();
layerOverlay.Layers.Add("WorldLayer", worldLayer);
ShapeFileFeatureLayer worldCapitalsLayer = new ShapeFileFeatureLayer(MapPath("~/SampleData/World/WorldCapitals.shp"), ShapeFileReadWriteMode.ReadOnly);
SizedPointStyle sizedpointStyle = new SizedPointStyle(PointStyles.CreateSimpleCircleStyle(GeoColor.SimpleColors.Blue, 1), "population", 1000000);
worldCapitalsLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Clear();
worldCapitalsLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(sizedpointStyle);
worldCapitalsLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
layerOverlay.Layers.Add("WorldCapitals", worldCapitalsLayer);
Map1.CustomOverlays.Add(layerOverlay);
I hope this can help.
Regards,
Gary
Hi again!
Did you try it? Is the class SizedPointStyle ready for web? The sample for desktop seems to expose class methods override not available for the web? Would you be nice and let me know what to do .
Thanks again.
Jm
Hello Jean-marie,
I have tested it in the web edition, and I copy my test code to you above.
What’s the situation have you met? Which version are you using?
Regards,
Gary
Hi works now!!!
thanks!
jm.
Hello Jean-marie,
You are welcome, please feel free to let us know your questions.
Regards,
Gary