- Methods - addControls(controls-element): add map controls from DOM element
- attachEvent(name, callback): listen events
- listenEvent(name, callback): listen events
- clearMap(): clear selection, controls, geo layers and reset default configuration
- clearSelection(): clear selections both google elements and geo layers
- deleteSelectedShape(): clear selected shape/geo layer
- rotateSelectedMarker(degree): rotate marker/point (geo layer)
- loadGeoJson(geo-json-format, autoDraw): load geo layers
- initialize(): creating drawer tool
- setMap(google-map-instance): set map instance
- setEditMode(boolean): set edit mode flag state
- setOption(string, boolean): set tool's single option (check option description above)
- visible key: set visible flag value for logics and show/hide tool and elements
- enableSelection key: set selection flag for logics (prevent selection) and clear selection if false value
- setGeoOption(string, boolean): set geo layer option
- visibleArrows key: set visible value (boolean) to show/hide point arrows
Browser guide
Include this to link stylesheet and script
``html
`
`html
`
Change logs
- 2023-03-25 1.0.6
- Add options drawingButtonsSize may be sm, md - Updated buttons title from options
- Fixed event for creating button elements from template case.
- 2023-03-11 1.0.5
- Updated visible and optional additions options for GEO features
- Update styles: added .gmap-hidden class for hiding another elements on edit mode (.editMode class), addition .gmap-controls class for bootstrap button styles
- Added setGeoOption function for updating feature styles
- Updated google marker functions: resetArrowIconMarker`
- 2022-10-10 1.0.4
- Fix bugs and styles.
- Add arrow color picker
- Integrate create and remove events: arrow, polygon.
- Handle map element's data.
- Relocate structure, prototypes