try something like that

google.maps.event.addListener(map, 'click', function(event) {
      addMarker(event.latLng);
    });

function admarker(latLng){
var marker = new google.maps.Marker({
                position: latLng,
                map: map,
                title: "blub",
                bouncy: true,
                draggable: true
              })
marker.setIcon(iconForMarker);
}

done
On 3 Feb., 12:49, John <john.vanlu...@hotmail.com> wrote:
> Hi Paulo/Rossko,
>
> Thanks  for your responses!
> Sorry if I mess things up but I'm quite a rookie...........
>
> @Rossko: I don't get a javascript error when I click the add marker. What
> I'm trying to achieve is that I can add a marker only if the add marker
> button is selected. The next step would be to store the marker in de
> database. I already made a script to to that (and it works fine, 
> see:http://www.houdstadsweidengroen.nl/maps/map_add3nw3.html) but I want to
> integrate several api v3 functionalities in one script.
>
> Cheers,
>
> John

-- 
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 google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to