All Projects → Raruto → leaflet-kmz

Raruto / leaflet-kmz

Licence: GPL-3.0 license
A KMZ file loader for Leaflet Maps

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to leaflet-kmz

Mapbox.js
Mapbox JavaScript API, a Leaflet Plugin
Stars: ✭ 1,819 (+5412.12%)
Mutual labels:  leaflet, mapbox
LocationMapViewer
Android App to view Locations in a map with support for gpx, kml and kmz data
Stars: ✭ 31 (-6.06%)
Mutual labels:  kml, kmz
qgis-kmltools-plugin
Fast KML Import and Export Plugin for QGIS
Stars: ✭ 45 (+36.36%)
Mutual labels:  kml, kmz
kirby-locator
A simple map & geolocation field, built on top of open-source services and Mapbox. Kirby 3 only.
Stars: ✭ 83 (+151.52%)
Mutual labels:  leaflet, mapbox
Leaflet Locatecontrol
A leaflet control to geolocate the user.
Stars: ✭ 539 (+1533.33%)
Mutual labels:  leaflet, mapbox
gpxstudio.github.io
The online GPX file editor
Stars: ✭ 233 (+606.06%)
Mutual labels:  leaflet, mapbox
web-maps-wcag-evaluation
Manual accessibility evaluation of popular web map tools.
Stars: ✭ 28 (-15.15%)
Mutual labels:  leaflet, mapbox
Leaflet Geoman
🍂🗺️ The most powerful leaflet plugin for drawing and editing geometry layers
Stars: ✭ 1,088 (+3196.97%)
Mutual labels:  leaflet, mapbox
fishfrymap
Fish Fry Map project repository
Stars: ✭ 14 (-57.58%)
Mutual labels:  leaflet, mapbox
georaster-layer-for-leaflet
Display GeoTIFFs and soon other types of raster on your Leaflet Map
Stars: ✭ 168 (+409.09%)
Mutual labels:  leaflet
swap
A Solver for the Wavelength Assignment Problem (RWA) in WDM networks
Stars: ✭ 27 (-18.18%)
Mutual labels:  leaflet
Leaflet Example
🗺 An example of how to use Leaflet to create an interactive map.
Stars: ✭ 41 (+24.24%)
Mutual labels:  leaflet
food-oasis-la
This is a website with a map of food sources in Los Angeles, and list of resources about food deserts and health, published with Jekyll and GitHub Pages.
Stars: ✭ 24 (-27.27%)
Mutual labels:  mapbox
Delphi OSMMap
Visual control for Delphi and Lazarus to display OSM map
Stars: ✭ 27 (-18.18%)
Mutual labels:  mapbox
ProjectLockdown
Project Lockdown (an initiative from The IO Foundation) is a civic tech, interactive platform providing an overview of the state of Human and Digital Rights around the globe. It evaluates policies obtained from official sources that may impact their observance. It provides, among other tools, a layered map interface that allows for a visual repr…
Stars: ✭ 34 (+3.03%)
Mutual labels:  mapbox
react-mapboxgl
Declarative React components for mapbox-gl-js.
Stars: ✭ 15 (-54.55%)
Mutual labels:  mapbox
Path.Drag.js
Add dragging capability to Leaflet paths.
Stars: ✭ 21 (-36.36%)
Mutual labels:  leaflet
protomaps.js
Lightweight vector map rendering, labeling and symbology for the web
Stars: ✭ 359 (+987.88%)
Mutual labels:  leaflet
papyruscs
PapyrusCS renders maps of Minecraft: Bedrock Edition worlds using C#, LevelDB and leaflet.
Stars: ✭ 221 (+569.7%)
Mutual labels:  leaflet
leaflet-react-track-player
This is plugin for react-leaflet. It create player for control of track. 🍃🌎⚔
Stars: ✭ 21 (-36.36%)
Mutual labels:  leaflet

leaflet-kmz

NPM version License

A KMZ file loader for Leaflet Maps

For a working example see one of the following demos:


How to use

  1. include CSS & JavaScript
    <head>
    ...
    <style> html, body, #map { height: 100%; width: 100%; padding: 0; margin: 0; } </style>
    <!-- Leaflet (JS/CSS) -->
    <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css">
    <script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
    <!-- Leaflet-KMZ -->
    <script src="https://unpkg.com/leaflet-kmz@latest/dist/leaflet-kmz.js"></script>
    ...
    </head>
  2. choose a div container used for the slippy map
    <body>
    ...
      <div id="map"></div>
    ...
    </body>
  3. create your first simple “leaflet-kmz” slippy map
    <script>
      var map = L.map('map', {
        preferCanvas: true // recommended when loading large layers.
      });
      map.setView(new L.LatLng(43.5978, 12.7059), 5);
    
      var OpenTopoMap = L.tileLayer('https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png', {
        maxZoom: 17,
        attribution: 'Map data: &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: &copy; <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)',
        opacity: 0.90
      });
      OpenTopoMap.addTo(map);
    
      // Instantiate KMZ layer (async)
      var kmz = L.kmzLayer().addTo(map);
    
      kmz.on('load', function(e) {
        control.addOverlay(e.layer, e.name);
        // e.layer.addTo(map);
      });
    
      // Add remote KMZ files as layers (NB if they are 3rd-party servers, they MUST have CORS enabled)
      kmz.load('https://raruto.github.io/leaflet-kmz/examples/regions.kmz');
      kmz.load('https://raruto.github.io/leaflet-kmz/examples/capitals.kmz');
      kmz.load('https://raruto.github.io/leaflet-kmz/examples/globe.kmz');
    
      var control = L.control.layers(null, null, { collapsed:false }).addTo(map);
    </script>

Notes:

  • supported file formats: .kmz, .kml
  • to be able to use Google files (eg. through Google My Maps) you MUST use a valid third-party kml proxy server

Compatibile with: [email protected], [email protected], @tmcw/[email protected]


Contributors: A-Lurker, BrandonXiang, Raruto

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].