I need a help with the google api code to apply this concept but not
with draggable marker. I need the visitor can make zoom a move
controls to the desired place and then make click to update position.
Because when they use dragable markers go to the desired place and
lost the dragable marker in the process of making zoom. Thanks a lot

Form:

Latitude: <input class="required" type="text" name="latitude"
id="latitude" value="53.34870686020199" />
Longitude: <input class="required" type="text" name="longitude"
id="longitude" value="-6.267356872558594" />
<br /><br />
<div id="map" style="width: 600px; height: 420px"></div>

<!-- add your map api key here -->
<script type="text/javascript" src="http://maps.google.com/maps?
file=api&v=2&key="></script>

<script type="text/javascript">
<!--
if (GBrowserIsCompatible())
{
        // create map and add controls
        var map = new GMap2(document.getElementById("map"));
        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());

        // set centre point of map
        var centrePoint = new GLatLng('53.34870686020199',
'-6.267356872558594');
        map.setCenter(centrePoint, 14);

        // add a draggable marker
        var marker = new GMarker(centrePoint, {draggable: true});
        map.addOverlay(marker);

        // add a drag listener to the map
        GEvent.addListener(marker, "dragend", function() {
                var point = marker.getPoint();
                map.panTo(point);
                document.getElementById("latitude").value = point.lat();
                document.getElementById("longitude").value = point.lng();
    });
}
//-->
</script>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to