With OSM I can use mLat and mLon to create a link that opens a map with a marker on the given coordinates:

https://www.openstreetmap.org/?mlat=39.9155&mlon=4.1745

How can I do the same with a map that I created with uMap?

I tried several combinations like:

http://umap.openstreetmap.fr/en/map/dummy-map_123456/?mlat=39.9155&mlon=4.1745

but nothing seems to work.

Any suggestions?

asked 18 Jan, 01:16

Palthe's gravatar image

Palthe
112
accept rate: 0%


I don't think it works that way. What you could do is to create a marker in a data layer and then specify that data layer and/or feature in the URL. Go to the share panel and explore the iframe export options there to see how it is done.

permanent link

answered 18 Jan, 11:53

TZorn's gravatar image

TZorn
8.2k439158
accept rate: 14%

Thanks for your reply. Do you mean I could add my custom uMap as a data-layer to OSM and then use the OSM-URL with mLat and mLon? I will have a look at it.

let me explain the background of my question:

I have on-line photo-albums and I have custom uMaps where you can see the GPS-tracks of the walks I made during which I took the photo's.

With a script I extract the GPS-data from a photo and then construct the URL to a mapping website. This link is presented to the user as a button next to the photo. When the user clicks on the button he gets a map with a marker on the position where the photo was taken.

This works fine with OSM (and OpenTopoMap and Google maps), but not with my custom uMaps. I can create a link to my custom uMap where the map is initially centered on the photo-location, but there is no visual indication. So when you pan or zoom on the map you loose track of the location. Compare these two links:

https://www.openstreetmap.org/?mlat=39.57989&mlon=3.39616#map=17/39.57989/3.39616

http://umap.openstreetmap.fr/en/map/2020-08-mallorca_498917#17/39.57989/3.39616

(18 Jan, 15:05) Palthe

Do you mean I could add my custom uMap as a data-layer to OSM and then use the OSM-URL with mLat and mLon? I will have a look at it.

No, I was suggesting to create a data object in uMap (similar to your GPS tracks) and link to them. You'd have to create a data point for every image location and then point to it with the url parameter feature= and the view area at the end of the url. It could look like this: umap.openstreetmap.fr/de/map/flondor_1?scaleControl=false&...&feature=t3#10/50.9054/3.4477

If you have many photos this would become a bit cumbersome I guess. Maybe it's easier to forget uMap and build your map with Leaflet or OpenLayers.

(18 Jan, 16:04) TZorn

OK. Maybe I will send a feature request to uMap to add the mLat/mLon option. But I think I can make a script in my photo-album software that exports all GPS-data from the photo's to a GPX-file, which I can import in my uMap. But then my uMap will be cluttered with photo-markers... So this could indeed be a good time to start with Leaflet, which I already downloaded some time ago. Thanks anyway for your help and suggestions!

(18 Jan, 16:41) Palthe

You just need to put online you pictures and create a list (tipically csv) that contains something like:

lat,lon,url
40.33,13.2,http://myphotobucket.org/pic0010.jpg
40.32,13.3,http://myphotobucket.org/pic0011.jpg

then, when import the above list in umap. To create automatically the list, consider there are some utilities like imagemagik.

If you named at least the columns "lat" and "lon", you should get the map populated with markers; then, if you appropriately compile popup content (see inline help) you can create links to pictures and display at full or lower sizes.

permanent link

answered 21 Jan, 13:26

Cascafico's gravatar image

Cascafico
1444611
accept rate: 0%

1

Thanks for your suggestion, but that is not what I want. See my comment on the first answer ("let me explain the background of my question:"). I need to create a link to my custom uMap that opens the map and shows just one, temporary marker on the coordinates as given in the URL. Your suggestion works the other way around: when I click on a marker on my uMap, it opens a popup with the photo. I already created a script that exports such a file (in GEOJASON format) from my online photo-album. But most of the time I don't want to have permanent markers for all my photos on the map. But I appreciate your answer: I did not know that uMap can also import csv-files. That will make my script much easier.

(21 Jan, 14:33) Palthe
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×233
×128
×88
×35
×7

question asked: 18 Jan, 01:16

question was seen: 174 times

last updated: 21 Jan, 14:41

powered by OSQA