javascript - How do I customize the behavior of the base Google Map's place markers? -
i've been working google maps api, , while can add , customize own markers , info windows, base map has these default markers display these info windows when clicked (picture below).
is there way remove behavior or implement own (to make them more consistent behavior of markers application adds) when clicking on these locations?
for example, it'd nice able add own marker upon clicking these markers. like:
defaultmarker.addlistener("click", function () { mymarker = new google.maps.marker({ ... }); });
except... don't know of way grab these default markers.
apologies if has been answered before, or if i've missed basic entirely, couldn't find documentation these "default markers", lack of better terminology.
the current release version 3.24 of maps javascript api has property clickableicons in map options object:
https://developers.google.com/maps/documentation/javascript/reference#mapoptions
you can use property turn off clickable icons on maps setting clickableicons property false. exists setclickableicons() method.
please @ example: http://jsbin.com/liyamecoqa/edit?html,output