Supporting .shp & .mdb files-Collection of common programming errors
msdn Hi,I would like to supress the map data that is displayed by default and add my custom map data which is in .shp & .mdb files.I know how not to display the map on the control by setting the mode to
MyMap.Mode = new Microsoft.VirtualEarth.MapControl.Core.MercatorMode();
But doesnt know how to render the data from .shp & .mdb files. I understand we need to add the layers to the map (How to add the map data from the files as layer on top of the map control). Any idea how to do this?Thanks,
-Muneswar
msdn1 MDB files are simply Access database files. You are probably going to have to write your own code that reads the MDB file and plots the data according to the geographic information you have in there. Eg. plot individual points, or polylines, geocode if necessary, etc. SHP are the spatial files from the ESRI Shapefile format (there are other extensions : SHX index file, DBF database, PRJ for the projection, etc). The file formats are published online if you wished to write your own reader. There are utilities around – eg. to convert to KML. Beware of map projections – this would add another wrinkle if your SHP files are not in decimal longitude,latitude coordinates with the WGS84 geoid. If you only want to plot your shapefiles (I see you are also switching VE imagery off), then you might prefer to use the ESRI controls (they have a new silverlight SDK for instance) or an open source solution like OpenLayers. Richard
msdn2