Select one of the tabs below for more information on C1Maps' Main Concepts. The content includes:
C1Maps can display geographical information from several sources. By default, C1Maps uses Microsoft LiveMaps aerial photographs as the source, but you can change that using the Source property, which takes an object of type MultiScaleTileSource.
The following sources are included. The code below each source can be added to your project's code file to change the map source:
Visual Basic Copy Codemap1.Source = new VirtualEarthAerialSource()
C# Copy Codemap1.Source = new VirtualEarthAerialSource();
Visual Basic Copy Codemap2.Source = new VirtualEarthRoadSource()
C# Copy Codemap2.Source = new VirtualEarthRoadSource();
Visual Basic Copy Codemap3.Source = new VirtualEarthHybridSource()
C# Copy Codemap3.Source = new VirtualEarthHybridSource();
The portion of the map that is currently visible is determined by the Center and Zoom properties, and by the size of the control:
This property is of type Point but it actually represents a geographic coordinate in which the X property is longitude and the Y property is latitude. The user can change the value of the Center property by dragging the map. You can set this property either in XAML markup or in code:
XAML Copy Code <Maps:C1Maps Name="maps" Center="-58.40, -34.36"/>
C# Copy Codemaps.Center = new Point(-58.40, -34.36);
This property indicates the current resolution of the map. A zoom value of 0 has the map totally zoomed out, and each increment of 1 doubles the map resolution. The user can change the value of the Zoom property using the mouse wheel. You can set this property either in XAML markup or in code:
XAML Copy Code <Maps:C1Maps Name="maps" MinZoomValue= "5" MaxZoomValue= "15"/>
C# Copy Code maps.MinZoomValue = 5; maps.MaxZoomValue = 15;
C1Maps uses three coordinate systems:
This coordinate system is not Cartesian, which means the scale of the map may change as you pan.
A coordinate pair for a city in the Northern and Eastern hemispheres will resemble the following:
(131.9, 43.1333)
These are the coordinates for the Russian city Vladivostok. Both the longitude and latitude coordinates are positive numbers since Vladivostok's coordinates are in the East (longitude) and North (latitude).
If you were putting in coordinates for an area in South America (West - longitude) below the Equator (South - latitude), you will write the coordinates with negative numbers, like the coordinates for Buenos Aires, Brazil:
(-58.40, -34.36)
C1Maps provides four methods for converting between these coordinate systems: ScreenToGeographic, ScreenToLogic, GeographicToScreen, and LogicToScreen. The conversion between geographic and logic coordinates is done by the projection configured using the C1Maps.Projection property.
You can implement other GIS projections by inheriting from the IMapProjection interface, but the default is the Mercator projection used by LiveMaps and most other providers.
In addition to the geographical information provided by the source, you can add layers of information to the map. C1Maps includes five layers by default.
You can see the three layers you'll use most in the following image: