2018-12-17 : 15:43
2018-12-06 : 10:53
2018-12-05 : 10:00
2018-12-04 : 15:14
2018-11-30 : 17:00
2019-01-18 : 11:13
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.