Hello,
Is there a way to export the coordinates / locations created with the mapping module?
The geoJson option of the bulk export is not working, the csv export neither, and I have no option to export from the leaflet map.
Any suggestion?
Thanks!
The Mapping module publishes an API endpoint where you can fetch features/markers:
- >= Mapping 2.0:
/api/mapping_features
- < Mapping 2.0:
/api/mapping_markers
See how to use the REST API here.
Another option is to install the OutputFormats module, which include links to output formats like JSON-LD and RDF/XML. The mapping data are under the “o-module-mapping:mapping” and “o-module-mapping:feature” keys.
Thank you Jim, for your answer. But actually the API endpoint doesn’t list all the markers, only 50, althrough I mapped more than 400 (visible in the leaflet map).
What is very strange is that the item 1234 appears in the /api/mapping_markers/1234. But it’s missing in the /api/mapping_markers/ endpoint.
Any idea with that?
But actually the API endpoint doesn’t list all the markers, only 50, althrough I mapped more than 400 (visible in the leaflet map).
The API paginates results like browse pages. You’ll need to use the Link
headers (see here) or the page
query parameter (see here) to see pages other than the first. You could also use the per_page
query parameter to increase the number of markers to, say, 500: ?per_page=500
What is very strange is that the item 1234 appears in the /api/mapping_markers/1234. But it’s missing in the /api/mapping_markers/ endpoint.
/api/mapping_markers/1234
points to the marker with the ID 1234, not the item. It must be a coincidence that marker 1234 aligns with item 1234.
Thanks a lot for the help. It’s working perfectly well!