Map Constructor (LatLon, Int32, Int32, Double) |
Namespace: Telogis.GeoBase
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.
// 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);