On another thread it suggests to use

if (submitmarkerx) map.removeOverlay(submitmarkerx);

This doesnt work on when i put it on the listener event


On Jan 22, 11:01 am, Ivan <[email protected]> wrote:
> http://www.belizemapia.com/index4.htmlis the page but it requires
> registration. Its quick and easy - beta stage so bear
>
> Please assist. I thought i could explain shortly with the 2 code
> snippets that are involved.
>
> On Jan 22, 10:50 am, "[email protected]" <[email protected]>
> wrote:
>
>
>
> > On Jan 22, 8:24 am, Ivan <[email protected]> wrote:
>
> > > Not the reply i was looking for.
>
> > Then maybe you should follow the posting guidelines.  A link to a map
> > that shows the problem tends to get help pretty quickly.
>
> > > Can you assist?
>
> > I would expect I could.  But I may have spent all the time I am
> > willing to volunteer on this thread on things you aren't interested
> > in.
>
> >   -- Larry
>
> > > On Jan 22, 10:18 am, marcelo <[email protected]> wrote:
>
> > > > You got a reply in your other thread, and it's still 
> > > > good:http://groups.google.com/group/Google-Maps-API/browse_thread/thread/b...
>
> > > > Please read and 
> > > > follow:http://groups.google.com/group/Google-Maps-API/web/suggested-posting-...
>
> > > > --
> > > > Marcelo -http://maps.forum.nu
> > > > --
>
> > > > On Jan 22, 5:11 pm, Ivan <[email protected]> wrote:
>
> > > > > Hi All,
>
> > > > > I have the dilema in the code execution of the submit function. I have
> > > > > a link on my page that should create only on marker if clicked.
> > > > > However if the link is clicked more than once and then clicked on the
> > > > > map it displays the markers amounted to the times it was clicked. Can
> > > > > anyone assist as to why this is happening with the 2 functions below?
>
> > > > > function submit(){
>
> > > > > var submitfile;
> > > > > map.clearOverlays();
>
> > > > > document.getElementById("mapwindow").innerHTML =  '';
> > > > > map.getDragObject().setDraggableCursor("crosshair");
>
> > > > > var submit = GEvent.addListener(map, "click", function(submitmarkerx,
> > > > > point) {
>
> > > > > if (language=='english'){
>
> > > > > submitfile = 'http://www.mysite.com/php/submitplaceform.php'
> > > > > submitfilex = 'http://www.mysite.com/upload/index.html'}
>
> > > > > else if(language=='espanol'){
> > > > > submitfile = 'http://www.mysite.com/upload/indexesp.php'
>
> > > > > }
>
> > > > > var submitmarkerx = createsubmitMarker(point,'<div>Please enter
> > > > > details for this location on the left side bar and click on save to
> > > > > add your place</div>');
>
> > > > > map.addOverlay(submitmarkerx);
>
> > > > > GEvent.addListener(map, "infowindowclose", 
> > > > > function(){map.removeOverlay
> > > > > (submitmarkerx); map.getDragObject().setDraggableCursor("auto");});
> > > > > GEvent.removeListener(submit);
>
> > > > > });
>
> > > > > GEvent.addListener(map, "infowindowclose", 
> > > > > function(){map.clearOverlays
> > > > > ()
>
> > > > > });
> > > > > }
>
> > > > > function createsubmitMarker(point,html) {
>
> > > > > var icon = new GIcon();
> > > > > icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";;
> > > > > icon.shadow = "http://labs.google.com/ridefinder/images/
> > > > > mm_20_shadow.png";
> > > > > icon.iconSize = new GSize(12, 20);
> > > > > icon.shadowSize = new GSize(22, 20);
> > > > > icon.iconAnchor = new GPoint(6, 20);
> > > > > icon.infoWindowAnchor = new GPoint(5, 1);
>
> > > > > var homemarker = new GMarker(point,{icon:icon, draggable: true});
> > > > > GEvent.addListener(homemarker, "click", function()
> > > > > {homemarker.openInfoWindowHtml(html);});
> > > > > return homemarker;
>
> > > > > }- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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