On 4 November 2010 13:39, parky128 <[email protected]> wrote: > > Can you tell the draggable marker to stay within the bounds of the dom > element the map is contained within? And if so, can you get the marker to > appear relative to say the map type controls where they appear within the > dom element containing the map?
Why don't you try it? By all means start with my proof-of-concept page. Restricting the range of the dragging is probably possible, by having a drag event-handler and continually checking the object's position. Or perhaps -- once the map is created -- you can dynamically attach the <img> element to the map div instead of including it in the page itself. I only just thought of that. With my existing example I found the issue was the conversion done at var markerPoint = map.fromContainerPixelToLatLng(...); and that neither fromDivPixelToLatLng nor fromContainerPixelToLatLng produced the right result if the map was not 100%. Currently it works (with 100% and fromContainerPixelToLatLng), and that's enough for me and the example. -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
