Hi,

I found it!

'''''''
var newpoint;
var txt;
setmarker = function() {
        status = 'newtree';
        var marker = new GMarker(mmap.getCenter(),{draggable:true});
        mmap.addOverlay(marker);
        marker.openInfoWindowHtml('<div>Description of this new tree</
div><textarea id="txt"></textarea>',{redraw:true});
        marker.enableDragging();
        GEvent.addListener(marker, "dragstart", function() {
                  txt = $F('txt');
              mmap.closeInfoWindow();
        });
        GEvent.addListener(marker, "dragend", function(p) {
                marker.openInfoWindowHtml('<textarea 
id="txt">'+txt+'</textarea>',
{redraw:true});

                newpoint=p;
                log(p);
        });

}
''''''''''

On 13 Mai, 15:50, Kontaktschmied <[email protected]>
wrote:
> Hi folks,
>
> goal is to move a new marker with his popup window.
> Here is the test site:http://tools.webmasterei.com/arboretum/Please lokking 
> for „tanne“
> and choose any tree and then click to „add new tree“
>
> If I drag the red marker the windows keep in his position??
>
> Here is the code:
>
> var newpoint;
> setmarker = function() {
>         status = 'newtree';
>         var marker = new GMarker(mmap.getCenter(),{draggable:true});
>         mmap.addOverlay(marker);
>         marker.openInfoWindowHtml('<textarea id="txt"></textarea>',
> {redraw:true});
>         GEvent.addListener(marker, "dragend", function(p) {
>                 marker.redraw('force');
>                 newpoint=p; //save position global
>         });
>
> }
>
> Any ideas?
>
> Rainer
--~--~---------~--~----~------------~-------~--~----~
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