/// <summary> /// Sets center of the map to position, and zooms to zoomLevel. /// </summary> /// <param name="position">New center position.</param> /// <param name="zoomLevel">New zoom level.</param> public void SetCenterAndZoom(VELatLong position, int zoomLevel) { WebBrowser.InvokeScript(this.GetType().Name + "SetCenterAndZoom", position.Latitude, position.Longitude, zoomLevel); }
/// <summary> /// Converts a (lat,long) couple to their corresponding pixels on the map viewer. /// </summary> /// <param name="position"></param> /// <returns></returns> public VEPixel LatLongToPixel(VELatLong position) { var result = WebBrowser.InvokeScript(this.GetType().Name + "LatLongToPixel", position.Latitude, position.Longitude); if (result.ToString() != String.Empty) { var results = result.ToString().Split(','); return(new VEPixel(Convert.ToInt32(results[0]), Convert.ToInt32(results[1]))); } return(null); }
public VEShape(VEShapeType type, VELatLong latLong) { if (type == VEShapeType.Pushpin) { this.type = type; this.points = new List <VELatLong>(); points.Add(latLong); } else { throw new Exception("This constructor only works for VEShapeType.Pushpin"); } }
/// <summary> /// Sets center of the map to (lat,long). /// </summary> /// <param name="position"></param> public void SetCenter(VELatLong position) { WebBrowser.InvokeScript(this.GetType().Name + "SetCenter", position.Latitude, position.Longitude); }
/// <summary> /// Pans the map to specified (lat,lon). /// </summary> /// <param name="position"></param> public void PanToLatLong(VELatLong position) { WebBrowser.InvokeScript(this.GetType().Name + "PanToLatLong", position.Latitude, position.Longitude); }
/// <summary> /// Converts a (lat,long) couple to their corresponding pixels on the map viewer. /// </summary> /// <param name="position"></param> /// <returns></returns> public VEPixel LatLongToPixel(VELatLong position) { var result = WebBrowser.InvokeScript(this.GetType().Name + "LatLongToPixel", position.Latitude, position.Longitude); if (result.ToString() != String.Empty) { var results = result.ToString().Split(','); return new VEPixel(Convert.ToInt32(results[0]), Convert.ToInt32(results[1])); } return null; }