Drag-and-Drop support for formats that read arraybuffer sources Add TextDecoder to polyfills Add custom Drag-and-Drop examples for KMZ and MVT Add sample download and KML styles option to existing example Test arraybuffer and constructed formats
30 lines
1.0 KiB
HTML
30 lines
1.0 KiB
HTML
---
|
|
layout: example.html
|
|
title: Drag-and-Drop
|
|
shortdesc: Example of using the drag-and-drop interaction.
|
|
docs: >
|
|
Example of using the drag-and-drop interaction. Drag and drop GPX, GeoJSON, IGC, KML, or TopoJSON files on to the map. There is no projection transform support, so this will only work with data in EPSG:4326 and EPSG:3857.
|
|
tags: "drag-and-drop, gpx, geojson, igc, kml, topojson, maptiler"
|
|
cloak:
|
|
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
|
|
value: Get your own API key at https://www.maptiler.com/cloud/
|
|
---
|
|
<div id="map" class="map"></div>
|
|
<div><input type="checkbox" id="extractstyles" checked /> Extract styles from KML</div>
|
|
<br />
|
|
<div>
|
|
<a id="download" download></a>
|
|
Download samples:
|
|
<button id="download-gpx">GPX</button>
|
|
|
|
<button id="download-geojson">GeoJSON</button>
|
|
|
|
<button id="download-igc">IGC</button>
|
|
|
|
<button id="download-kml">KML</button>
|
|
|
|
<button id="download-topojson">TopoJSON</button>
|
|
</div>
|
|
<br />
|
|
<div id="info"> </div>
|