uMap advanced usages⚓︎
Preloading a map with data⚓︎
You can preload a map using the data or the dataUrl parameter:
- The
dataparameter must be URI encoded (using JavaScript’sencodeURIComponent()for instance). - The
dataURLparameter 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)csvgpxgeorsskmlosm
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: