2018-05-29 : 10:00
2018-05-27 : 23:17
2018-04-23 : 18:03
2018-04-06 : 14:55
2018-03-24 : 14:41
2018-09-25 : 01:30
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.