google maps programming hints
Some of those hints are probably already a hundred times on the internet already, but I wanted to write them down, just in case:
- a marker really takes a LatLng object.
- a click event (left click) has a LatLng parameter.
- a right click event has a pixel parameter. Hence, to create a marker from this, one has to convert (using the map’s method)
- a click event on a marker provides the marker as parameter (if this is a map-registered event) but…
- ... if the click event was bound to the marker, use
this.