My map is configured for GeographicUnit.Meter (since I am using Bing as the base layer). The other overlays/layers are configured as EPSG 4326. How can I configure the routing layer to use EPSG even though the base layer and map are Meter?
Different projections
We can show you some code examples on how to do that. But to avoid any confusion, can you tell me what is Bing as the base layer? Meter is the map unit, but in what projection is your base layer? Thank you.
My map is configured using the MicrosoftMapLayerExtension as the base overlay, and that is using the Google (MS) projection. The map is configured with GeographicUnit.Meter. I added a few layers to the map and set their FeatureSource.Projection like so:
string internalProjectionParameters = Proj4Projection.GetEpsgParametersString(4326);
string externalProjectionParameters = Proj4Projection.GetGoogleMapParametersString();
Proj4Projection proj = new Proj4Projection(internalProjectionParameters, externalProjectionParameters);
Layer.FeatureSource.Projection = proj;
The RouteLayer does not have a feature source whose projection I can change, so what can I do?
Ok, I see exactely what your situation is. Tomorrow, I will publish a sample in the Code Community on how to handle this case. I will let you know as soon as it is published. Thank you for the idea.
Please, check out the new Code Community project that we posted today Routing With Projections. It shows how to handle a case similar to yours.
code.thinkgeo.com/projects/s...rojections