@aptuitiv/gmaps
v0.31.0
Published
Library to help with displaying a Google map on a website with markers, overlays, tooltips, and other map elements.
Downloads
721
Readme
@aptuitiv/gmaps
Gmaps makes it easier to display a Google map on a page and add markers, overlays, and other elements to it.
Install
Download from NPM.
npm install @aptuitiv/gmapsBrowser support
The library is built for ES2022 so that it can use private class fields, which are much faster and use less memory than the WeakMaps that older builds needed to replace them with. This matters most on phones and on maps with a lot of markers or polylines.
This needs one of the following, all released in 2021 or earlier.
| Browser | Version | |---------|---------| | Safari (including iOS) | 15 | | Chrome | 84 | | Edge | 84 | | Firefox | 90 |
If you need to support older browsers, the library can be converted for them with your own build tools.
Documentation
Credit
Inspired by Leaflet.
Development
TLDR: run this to build and watch the code
npm run watch-allBuilding and watching the code involves three parts.
- The Javascript code
- The CSS code
- The local server to test the code
Run the Javascript code only with npm run watch.
Run the CSS code only with npm run css-watch.
Run the local server with npm run site-serve.
Run all of them at once with npm run watch-all. This is our recommended method of working on the code as it'll watch the Javascript, the CSS, run the local site.
