uMap advanced usages⚓︎
Preloading a map with 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: