javascript - how to update google map center when user scrolls -


After text "itemprop =" text ">

I enabled the following code to be used to put a marker in the center of Google Map and clicking on the marker show one Has been infowindow about the center coordinates. But when I scroll the map and then click on the marker, it shows the same coordinates. How to update that when I pan zoom / scroll / map it will show the updated center? Please help

  initialize the function () {var mapOptions = {zoom:. 14, center: new google.maps.LatLng (52.54, 98783, 13.425209099999961), mapTypeId: google.maps.MapTypeId.ROADMAP}; Map = new google.maps.Map (document.getElementById ('map_canvas'), map options); $ ('& Lt; div / & gt;') .. AddClass ('centerMarker') appendTo (map.getDiv ()) // (function () {var onclick .click to do something that = $ (this); if (! That.data ('win')) {that. Data ('win', new google.maps.InfoWindow ({content: myGeoCode (map.getCenter ())}). That.data ('win') bindTo ('position', map, 'center'); } That data ('win'). Open (map);}); } Google.maps.event.addDomListener (window, 'load', start); Function myGeoCode (latlng) {return is 'your tortoise' + latlng; }  

what are the bindto methods / etc? Do not look like you are using a standard marker ... anyway you can use the marker / infallow event to waste the unnecessary

  google.maps.event.addListener (Map, 'passive', function () {// assign map.getCenter () InfoWindow context})  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -