Gets or sets a JavaScript function to be executed on the client when the mouse moves inside the map pane.

Namespace: Reimers.Google.Map
Assembly: Reimers.Google.Map (in Reimers.Google.Map.dll) Version: 5.3.95.699 (5.3.95.699)

Syntax

C#
[PersistenceModeAttribute(PersistenceMode.Attribute)]
public string OnMouseMove { get; set; }

Remarks

The code that executes in this handler can use the passed variable 'latlng' (case sensitive) to obtain the current location of the mouse pointer as a GLatLng object.

Examples

To fill a textbox with the coordinates use the following code:

CopyJScript.NET
document.getElementById('theClientsideIDofTheTextbox').value = 'Lat: ' + latlng.lat() + ', Lng: ' + latlng.lng();

To fill a div element with the coordinates use the following code:

CopyJScript.NET
document.getElementById('theClientsideIDofTheDiv').innerHTML = 'Lat: ' + latlng.lat() + ', Lng: ' + latlng.lng();

See Also