Skip to content

Instantly share code, notes, and snippets.

@loyalvares
loyalvares / DeleteOverlayButton.js
Last active November 20, 2021 11:53
This is a custom library to add a Delete Button ( x mark) to a Google Maps v3 Circle or Polygon when drawn. This is the working JSFiddle link [ https://jsfiddle.net/foobarbazz/vn763fu7/ ] to see it in action.
/**
* author: Loy Alvares
* This utility was written to handle deletion of circles and polygons in Google Maps V3.
*
* Also thanks to Chris Veness for the distance calculation formulae from pointA to pointB
* ( Latitude/Longitude spherical geodesy formulae & scripts )
at http://www.movable-type.co.uk/scripts/latlong.html
(c) Chris Veness 2002-2010
*/