Socket
Socket
Sign inDemoInstall

@aptuitiv/google-maps-display

Package Overview
Dependencies
5
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @aptuitiv/google-maps-display

Library to help with displaying a Google map on a website with markers, overlays, tooltips, and other map elements.


Version published
Maintainers
1
Created

Changelog

Source

0.3.0 (February 6, 2024)

  • Added separate Loader object to load the map library.
  • Improved event handling when the map library isn't loaded yet.
  • Added support for on-time events on the Map and Marker objects.
  • Lots of code refactoring.
  • Added local site to for testing.
  • Expanded LatLng and LatLngBounds functionality.

Readme

Source

Google Map Display library

Library to help with displaying a Google map with markers, overlays, and custom buttons.

Inspired by Leaflet.

Install

Download from NPM.

npm install @aptuitiv/google-maps-display

You will find a copy of the files in node_modules/@aptuitiv/google-maps-display/dist.

The minified Javascript file is at node_modules/@aptuitiv/google-maps-display/dist/index.js;

Documentation

View the documentation.

Quick start

Add the script tag to load the library.

<script src="/google-map-display/index.js">

Or you can bundle it with your other Javascript code using Gulp, Webpack or some other build process. Add the script tag to load your code.

<script src="/my-bundled-code.js">

Add a div to hold the map. You can use any id value, we're using a value of "map".

<!-- The map will be displayed here -->
<div id="map" style="aspect-ratio: 3/2"></div>

Display the map

<script>
G.loader({ apiKey: 'Your-Api-Key', }).load().then(() => {
    const map = G.map('map', { center: { latitude: 48.864716, longitude: 2.3522 } });
    map.display();
});
</script>

See the documentation for more information.

FAQs

Last updated on 06 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc