The following code snippet demonstrates using the Lambert Conic Projection:
Chart.Mapping.Projection.Type = ProjectionType.LambertConic;
Chart.Mapping.Projection.Parameters = "-10,-20,-32,49";
Chart.Mapping.Projection.Type = ProjectionType.LambertConic
Chart.Mapping.Projection.Parameters = "-10,-20,-32,49"
Projections and Performance
Projecting ecw files is a CPU intensive operation. To remedy this feature in a real time rendering environment, the projected ecw views can be cached as jpeg images. This works by simply providing the path and name of a jpeg file where the cached image can be stored as shown in the following code snippet.:
MapLayer myLayer = MapDataEngine.LoadLayer("earth.ecw","earth_ecw.jpg);
MapLayer myLayer = MapDataEngine.LoadLayer("earth.ecw","earth_ecw.jpg)
Since shape and ecw files are generally based on the Longitude/Latitude coordinate system, choosing a center point of your zoom can be easily accomplished by finding the GPS coordinates of the particular location. This code snippet demonstrates a simple zoom:
// Zoom 2250% into the coordinates for chicago.
Chart.Mapping.ZoomPercentage = 2250;
Chart.Mapping.ZoomCenterPoint = new PointF(41.9f,-87.65f);
[Visual Basic] ' Zoom 2250% into the coordinates for chicago.
Chart.Mapping.ZoomPercentage = 2250
Chart.Mapping.ZoomCenterPoint = New PointF( 41.9F, -87.65F)
The following table shows how GPS coordinates are represented in .netCHARTING:
|Latitude Longitude: 41°54' N 87°39' W||new PointF( 41.54f, -87.39f)|
|Latitude Longitude: 34° 56' S 138° 35' E||new PointF( -34.56f, 138.35f )|
|See sample Mapping/MapZooming.aspx|