2018-11-19 : 13:59
2018-11-16 : 10:00
2018-11-15 : 19:25
2018-11-15 : 16:01
2018-11-15 : 13:23
2018-11-20 : 11:05
To provide some context as to what a custom HTML map marker is we should start with the basics. A typical Google Map Marker is generally represented by a pin.
The API allows this marker to be customized in a variety of ways. It can be scaled, rotated, dragged and even replaced with custom images.
Therefore the solution is to not use a Marker object. Instead, we use a custom Overlay object.
An Overlay, as described by the documentation, is an object on the map that is tied to latitude and longitude coordinates. Overlays are most commonly used for adding a custom image on top of the map.
The following is based on a well-hidden Google Maps demo.
To provide this functionality we have created a simple Custom Marker object that can be used to insert custom HTML in place of an overlay. A demo including this class is accessible here.