MapPropertyChangedEventArgs
Namespace: Wisej.Web.Ext.GoogleMaps
Assembly: Wisej.Web.Ext.GoogleMaps (4.1.0.0)
Provides data for the MapPropertyChanged event.
- C#
- VB.NET
public class MapPropertyChangedEventArgs : EventArgs
Public Class MapPropertyChangedEventArgs
Inherits EventArgs
Constructors
MapPropertyChangedEventArgs(e)
Initializes an instance of the MapPropertyChangedEventArgs class.
| Name | Type | Description |
|---|---|---|
| e | WidgetEventArgs | The event data from the client. |
Throws:
- ArgumentNullException e is null.
Properties
Name
String: Returns the name of the property that has changed.
One of "zoom", "tilt", "mapTypeId", "center", "bounds", "heading" or "projection".
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
| Name | Description |
|---|---|
| MapPropertyChangedEventHandler | Represents the method that will handle the MapPropertyChanged event of a GoogleMap control. |