npm install geomap import GeoMap from 'geomap';
// Initialize the map
const map = new GeoMap('map-container', {
center: [40.7128, -74.0060],
zoom: 12,
tiles: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
});
// Add a marker
map.addMarker([40.7128, -74.0060], {
title: 'New York',
popup: 'Welcome to NYC!'
});
// Add a layer
map.addLayer('buildings', {
visible: true,
opacity: 0.8
});
// Enable dragging
map.enableDragging();