how to create a shp file for like mexico state.i want to show a ShapeFileFeatureLayer for mexico state citys.how to do that one can you give me some sort of step how to create shp file for state
How to create shp files for a state
still iam not getting any solution from your side.please send details how to create shape filr for a state to shoe the major and minor roads.
in sample example you are showing some cities ans states shape layer,like that how to create a shape layer for mexico city major roads and minor roads shape layer.
rajanikanth,
Thanks for your question but I would recommend that you try searching our extensive forum as there are many helpful resources available.
By conducting a search I was able to find a post on Creating Shapefiles from Scratch and a post on the free OpenStreetMap data that may already contain the Mexico cities data you are looking for.
Creating Shapefiles from Scratch: gis.thinkgeo.com/Support/Dis...fault.aspx
Free Open StreetMap Data Download information: gis.thinkgeo.com/Support/Dis...fault.aspx
thank you for your reply.iam downloading shape files from open street map.but if i use that shape file uam getting error like "corresponding idx file is missing you can use the static method shape file feature source.or you can set required index property set to false".how to solve this one
how to add this shape file to my google map.iam using code like
Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF"));
Map1.CurrentExtent = new RectangleShape(-125, 72, 50, -46);
Map1.MapUnit = GeographyUnit.DecimalDegree;
WorldMapKitWmsWebOverlay worldMapKitOverlay = new WorldMapKitWmsWebOverlay();
Map1.CustomOverlays.Add(worldMapKitOverlay);
ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer(MapPath("~/mexico/adminareas_general.shp"));
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.Transparent, GeoColor.FromArgb(100, GeoColor.SimpleColors.Green));
LayerOverlay staticOverlay = new LayerOverlay();
staticOverlay.IsBaseOverlay = false;
staticOverlay.Layers.Add(worldLayer);
Map1.CustomOverlays.Add(staticOverlay);
but iam not getting the output.iam doing any mistake here.please give me the steps hoe to add this shape file to google map
Hello rajanikanth,
For your first question, that exception means you don't have an index file for that shape file, so you can either set the property
shapeFileFeatureLayer.RequireIndex = false;
or build an index for the shape file(we recommend this way):
ShapeFileFeatureSource.BuildIndexFile(@"shapefilepath");
And for your second question, the reason is your shape file use decimal degree map unit, but the google map use Meter, you can not show different data with different projection together, you need to change your shape file's projection, there is a sample will show you how to do it, please have a look:
wiki.thinkgeo.com/wiki/Map_S...Google_Map
Please feel free to let us know your problem.
Regards,
Gary