Reputation: 7479
Is it possible to display HTML instead of an image as a Google Maps Marker ?
What is the best way to do so? I imagine that something like an invisible marker and a custom info-window might play a role in achieving this
Upvotes: 3
Views: 2725
Reputation: 1908
You might want to check this out: https://github.com/jonyt/gmaps-div-overlay
DivOverlay is a very simple container for HTML to be shown over a Google Map at any position. All it does is calculate margins from the map bounds so its entire contents are within the map. Take a look at the demo. The constructor takes 3 arguments: the HTML container, the map to attach to and the position of the overlay. DivOverlay has only two functions: show() and hide(). Should be self-explanatory.
Upvotes: 0
Reputation: 4133
You can use OverlayView
class to create custom overlays with html elements - https://developers.google.com/maps/documentation/javascript/overlays#CustomOverlays
Simple example - http://jsfiddle.net/BCr2B/
Upvotes: 6