Hi,
The best solution is to use MVC techniques to bind the marker's position
property to the map's center property:
var marker = new google.maps.Marker({
map: map
});
marker.bindTo('position', map, 'center');
Hope this helps.
- Luke
On Thu, Apr 29, 2010 at 8:20 AM, mlvfd <[email protected]> wrote:
> The example at Google (http://code.google.com/p/gmaps-samples-v3/
> source/browse/trunk/draggable-markers/draggable-markers.html?
> spec=svn49&r=49) does almost exactly what I need. However, ror my
> application I would like the marker to stay right in the middle of the
> map (never moving). The user would drag the map underneath the marker
> to the "target" location. Then the listener would get the lat/lon for
> the marker once the drag was completed. Any help would be appreciated!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-maps-js-api-v3%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.