mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
1.1 KiB
1.1 KiB
uMap advanced usages
Preloading a map with data {: #preloading-data }
You can preload a map using the data
or the dataUrl
parameter:
- The
data
parameter must be URI encoded (using JavaScript’sencodeURIComponent()
for instance). - The
dataURL
parameter must link to an encoded URL (using JavaScript’sencodeURIComponent()
for instance).
You can add the dataFormat
parameter given the nature of your data:
geojson
(default)csv
gpx
georss
kml
osm
This example, using the data
parameter, will load a map with a marker
set on Niagara Falls from CSV formatted data:
That example, using the dataUrl
parameter, will load a map with
borders for Arles, dynamically fetched from
geo.api.gouv.fr in GeoJSON: