Skip to content

Instantly share code, notes, and snippets.

@CaptainN
Created June 28, 2013 16:51
Show Gist options
  • Save CaptainN/5886163 to your computer and use it in GitHub Desktop.
Save CaptainN/5886163 to your computer and use it in GitHub Desktop.
a backfill for the deprecated google.maps.MarkerImage
// Backfill deprecated MarkerImage
function MarkerImage(url, size, origin, anchor, scaledSize)
{
if (console && console.warn)
console.warn("google.maps.MarkerImage is deprecated. Use a vanilla JS Object.");
this.anchor = anchor;
this.origin = origin;
this.scaledSize = scaledSize;
this.size = size;
this.url = url;
}
google.maps.MarkerImage = MarkerImage;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment