On Apr 22, 1:32 pm, Arvind Rangan <[email protected]> wrote:
>
> Using the drag and drop functionality to drop the marker.
> Markers are created on dragstop
> 1. Markers are created far from where the dragstop happens? can you please
> check if its code issue or what?
Well, you have
var markerPointx = this.left; // left+half the width;
var markerPointy = this.top ; // top + height;
where the code doesn't match the comment. left and top are *normally*
the top-left corner of the draggable object, so you need to move the
"effective" point to the business end of the marker, as the new marker
uses that location for positioning.
But the issue is that this.left and this.top do not represent the
point *in the map* -- they are the point *on the page*. So you need to
adjust them for where the map is on the page. That's why I said in my
last posts on the subject that positioning is not easy; and why my
example doesn't have any border around the map.
An alternative method (now that you are using a marker for dragging)
is to create a draggable marker, and on dragend use its geographical
position to add a permanent marker. That would be far easier as
everything is handled by the API.
> What should we set the sensor to be set to little confused with true or
> false.
Sensor should be true if you are using one or false if you are not.
You're not using a device to get the map user's location, so sensor
should be false.
--
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.