0
votes

what event name for google maps to touch initialize marker, to appear title or description? google.maps.event.addListener(marker, 'touchstart', <<< code here: is event name correct? var marker = new google.maps.Marker(markerOptions);

var infoWindowOptions = {
    content: content,
    position: latlong
};

var infoWindow = new google.maps.InfoWindow(infoWindowOptions);

google.maps.event.addListener(marker, 'touchstart', function(event) {
    event.stopPropagation();   //  'click touchstart'['click',] 
    event.preventDefault();
    if(event.handled !== true) {
        // Do your magic
    infoWindow.open(map);
        event.handled = true;   
    }
});
1

1 Answers

1
votes

No, the event name 'touchstart' is not supported. You have a list of available events here: https://developers.google.com/maps/documentation/javascript/reference#Marker