hi,
i have a sample app and trying to get it to create a marker when user clicks on the map. The code I use on the load event of the page is:
//make object from the page map
var map = Appery('googlemap_5');
//add a click listener with function to place a marker at the event's latlong
google.maps.event.addListener(map, 'click', function(e) {
placeMarker(e.latLng, map);
map.refresh();
alert('1');
});
//code to actually place the marker
function placeMarker(position, map) {
var marker = new google.maps.Marker({
position: position,
map: map
});
map.options.mapElement.gmap('addMarker',marker);
map.panTo(position);
map.options.mapElement.gmap("refresh");
}
however when i test it, it does nothing when I click on the map (do not know if it is important but the cursor's icon when i am over the map is the pan hand)
I would appreciate any suggestions, comments or help
rgrds