Get started with googlemaps-js-api-loader CDN

Apache-2.0 licensed

Libraries Google Maps APIs: googlemaps-js-api-loader - asynchronous loading, lightweight management.

Tags:
  • google
  • maps

Stable version

Copied!

How to start using googlemaps-js-api-loader CDN


const { loadMap, Map, Marker } = require('google-maps-api-loader');

loadMap((google) => {
  const map = new Map('map-container', {
    center: { lat: 40.7128, lng: -74.0060 },
    zoom: 12,
  });

  new Marker({
    position: { lat: 40.7128, lng: -74.0060 },
    map,
  });
});
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions