Hello,
I'm replacing a Bing map control in an existing application with a ThinkGeo one. This is my first ever project that has to do with anything Geo related. I'm trying to keep all the existing plumbing in place and only alter the few things that are Bing/THinkGeo specific.
Currently the application uses "Bing" coordinates:
private double _minLat = 90.0d;
private double _minLong = 180.0d;
private double _maxLat = -90.0d;
private double _maxLong = -180.0d;
PointShape topLeft = new PointShape(_minLat - 0.05, _minLong - 0.05);
PointShape bottomRight = new PointShape(_maxLat + 0.05, _maxLong + 0.05);
BoundingRectangle = new RectangleShape(topLeft, bottomRight);
On the last line I get an out of bounds exception, Maxx etc.. From what I understand, I need to convert the initial coordinates (and then the database ones too) to srid 4326, but how exactly do I do this?
One of the samples has this:
ManagedProj4Projection proj4Projection = new ManagedProj4Projection();
proj4Projection.InternalProjectionParametersString = ManagedProj4Projection.GetEpsgParametersString(4326);
proj4Projection.ExternalProjectionParametersString = ManagedProj4Projection.GetEpsgParametersString(2163);
ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer(@"..\..\SampleData\Data\Countries02.shp"); worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; worldLayer.FeatureSource.Projection = proj4Projection;
But I am using Bing Layer for maps:
- var bingMapsOverlay = new BingMapsOverlay();
- bingMapsOverlay.ApplicationId = <>;
- bingMapsOverlay.MapType = ThinkGeo.MapSuite.Core.BingMapsMapType.AerialWithLabels;
- bingMapsOverlay.Name = "BingMapOverlay";
- bingMapsOverlay.TimeoutInSeconds = 60;
- wpfMap1.MapUnit = GeographyUnit.Meter;
And I can't do
- bingMapsOverlay.FeatureSource.Projection = proj4Projection;
So, how exactly do I set my bingMapsOverlay to srid 4326 coordinate system?
Thanks