This project is read-only.

mouse over map control and display mouses current lat long

Jun 25, 2012 at 3:10 AM
Edited Jun 25, 2012 at 3:11 AM

I am currently using your map  control (awsome control btw) and would like to display the mouse's current postion as it moves over the map in two textboxes.

I found this code: to add updating two textblocks as the mouse moves over the map control to a google maps v3 map and have it working but I would rather use your control, but do not know how to get the same behaviour from your control:


Any ideas?


<script type="text/javascript">

var map;
function mapa()
var opts = {'center': new google.maps.LatLng(26.12295, -80.17122),
'zoom':11, 'mapTypeId': google.maps.MapTypeId.ROADMAP }
map = new google.maps.Map(document.getElementById('mapdiv'),opts);

google.maps.event.addListener(map,'click',function(event) {
document.getElementById('latlongclicked').value = + ', ' + event.latLng.lng()

google.maps.event.addListener(map,'mousemove',function(event) {
document.getElementById('latspan').innerHTML =
document.getElementById('lngspan').innerHTML = event.latLng.lng()
document.getElementById('latlong').innerHTML = + ', ' + event.latLng.lng()