I've got a Google Maps object with a Fusion Tables layer on it. I'm trying to make it so that when you click the FT layer, you'll see a marker where you click. I've written code that gets the latitude and longitude of where you click. I've also written code that's supposed to set up the location of the marker, but it doesn't work.
See below...
google.maps.event.addListener(layer,'click',function(e){
var clickedLatLng = {
lat: e['latLng']['B'],
lng: e['latLng']['k']
}
var myLatLng = new google.maps.LatLng(clickedLatLng['lat'],clickedLatLng['lng'])
var marker = new google.maps.Marker({
position: myLatLng,
map: gmap
});
marker.setMap(gmap);
});
How do I make it so that the marker appears?