Thanks for using MapSuite, if you want the map looks like google map, I think the best way is using google overlay, please check the code below: GoogleMapsOverlay google = new GoogleMapsOverlay(); winformsMap1.Overlays.Add(google);
winformsMap1.MapUnit = GeographyUnit.Meter; winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean); winformsMap1.CurrentExtent = new RectangleShape(-10000000, 10000000, 10000000, -10000000);
winformsMap1.Refresh();
Also you can refer HowDoISamples--->Markers--->Add simple markers on the map to make the POI.
Please refer this sample wiki.thinkgeo.com/wiki/Map_Suite_Desktop_Edition_All_Samples#Shapefile_to_Google_Map, I believe it contains everything you need.
I got this sample yesterday from searching in the internet but i have following queries regarding google map.
i)It is too slow compare to i was working without googleoverlay, so can you give samples or code for getting the performance ?
ii)Can googlemapovelay use the internet ?
iii)how to add marker when I click on the map because it is use in the Meter instead of decimal degree and it is not mark at specific location when i click .
iv) sometime it gives error [The remote server returned an error: (403) Forbidden.] same error given as your sample application
i)"It is too slow compare to i was working without googleoverlay" are you mean using GoogleMapsLayer? If so, you can easily switch between them, just replace GoogleMapsOverlay as GoogleMapsLayer and add it into an overlay. If not, it's a little hard to compare the performance between google map and other map, some times it depend on the google server response. Could you tell me more information how it make you fell slow?
ii)Of cause it use the internet, it need the google server return the static map to show.
iii)You can set a projection to translate the marker from decimal degree to meter, please refer the code below: var proj = new Proj4Projection { InternalProjectionParametersString = Proj4Projection.GetEsriParametersString(4326), ExternalProjectionParametersString = Proj4Projection.GetGoogleMapParametersString() }; proj.Open(); SimpleMarkerOverlay markerOverlay = new SimpleMarkerOverlay(); InMemoryMarkerOverlay m = new InMemoryMarkerOverlay(); m.FeatureSource.Projection = proj;
iv)This is google server problem, most time it's because our google overlay just use a free key, and it will reach limit in one day, you can register in the google and get a valid api key, using googleMapsOverlay.ClientId or googleMapsLayer.ClientId to set it.
i)I believe you can choose BingMap or OpenStreetMap, but you must every map data have their own styles, so it’s almost the same but still has difference. And you can find how to use them in HowDoISamples.
ii)I think when you say highlighted and display the street name, you mean you using a shapefile working with google map, and highlight the shapefile and show the name right? If not, I don’t know how you did this. If so, the reason street name not displayed maybe is you using the wrong column name and shapefilelayer does not get the right data to show. Please compare the sample in the HowDoISamples.
i)I ask question that , can we achieve the same look and feel as google map in our map using styles, zooming and color(e.g Boundary, Area, Street , POI color and line size in google map same as our current Map) without using google map ovelay or Open street Map or bing map? because we have requirement for the same.
If possible then can you give sample code or example for that ?
Yes, you can, with our ShapeFileFeatureLayer, we have a lot of styles to set to make it looks like Google map, you can set your AreaStyle, LineStyle, TextStyle, PointStyle, but the question is, you will need a really good artist to plan all of this, and make it totally looks like google. I believe you can find all the samples how to change the styles in the HowDoISamples.
In other words, we have all the functions but you are the one to set them.
And I’m very sorry it’s too complex to build this kind of sample. So you have to finish it by yourself but any questions you meet just let me know, I’m glad to help you.