Click or drag to resize

Map Constructor (LatLon, Int32, Int32, Double)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Create a map with the given parameters.

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public Map(
	LatLon Center,
	int Width,
	int Height,
	double Zoom
)

Parameters

Center
Type: Telogis.GeoBaseLatLon
A LatLon specifying the point that the map should be centered upon when created.
Width
Type: SystemInt32
The width of this map in pixels.
Height
Type: SystemInt32
The height of this map in pixels.
Zoom
Type: SystemDouble
The zoom level that this map should be set to when created. Somewhere between MinZoom and MaxZoom.
Examples

In the example below we create a 400(W) x 300(H) map centered on Los Angeles, then use GetMap together with a PictureBox control to add an image of the map to a Visual Studio form.

C#
// Create a 400px x 300px Map object in California with a zoom value of 3
Telogis.GeoBase.Map myMap = new Telogis.GeoBase.Map(new LatLon(33.694165, -117.956236), 400, 300, 3);

// Create a PictureBox to display the map on the Form
PictureBox myPictureBox = new PictureBox();

// Set the PictureBox size
myPictureBox.Size = new System.Drawing.Size(400, 300);

// Set the PictureBox image to the Map image
myPictureBox.Image = myMap.GetMap();

// Add the PictureBox to the form
Controls.Add(myPictureBox);
See Also