Skip to main content

MapPropertyChangedEventArgs

Namespace: Wisej.Web.Ext.GoogleMaps

Assembly: Wisej.Web.Ext.GoogleMaps (4.1.0.0)

Provides data for the MapPropertyChanged event.

public class MapPropertyChangedEventArgs : EventArgs

Constructors​

Instance member MapPropertyChangedEventArgs(e)​

Initializes an instance of the MapPropertyChangedEventArgs class.

NameTypeDescription
eWidgetEventArgsThe event data from the client.

Throws:

Properties​

Instance member Name​

String: Returns the name of the property that has changed.

One of "zoom", "tilt", "mapTypeId", "center", "bounds", "heading" or "projection".

Instance member Value​

Object: Returns the new value of the property.

The type depends on Name: a LatLng for "center", a LatLngBounds for "bounds", a number for "zoom", "tilt" and "heading", and a string for "mapTypeId". It can be null when the client cannot serialize the value.

Example:

Tracking the zoom level and the center of the map:

private void googleMap1_MapPropertyChanged(object sender, MapPropertyChangedEventArgs e)
{
switch (e.Name)
{
case "zoom":
this.labelZoom.Text = "Zoom: " + Convert.ToInt32(e.Value);
break;

case "center":
var center = (LatLng)e.Value;
this.labelCenter.Text = $"{center.Lat:F4}, {center.Lng:F4}";
break;
}
}

Used By​

NameDescription
MapPropertyChangedEventHandlerRepresents the method that will handle the MapPropertyChanged event of a GoogleMap control.