> this link http://www.geopeche.fr/ajouter_spot.html
>
> I must have just One marker ! so when I search 2 country the old
> marker don't disappear.

You have defined a global 'marker' at the beginning of your map script
    var marker;
and a function placeMarker() that would place or reposition it as
needed.

But your codeAddress() function defines a new local marker
    var marker = new google.maps.Marker();
that you don't need at all.
codeAddress() places that new marker
     marker.setPosition(results[0].geometry.location);
     marker.setMap(map);
instead of using placeMarker() to control the global one.

-- 
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.

Reply via email to