0

In my attribute table, I'm constructing a link that allows to call google maps and navigate to a position by car. I'm following the developer guides and my URLs look as follows: https://www.google.com/maps/dir/?api=1&destination=Long,Lat&travelmode=driving. These links work fine from within QGIS and also if I just copy paste them in the browser-windwo e.g. on a tablet - it opens the Browser or google maps and starts the navigation with the coordinates as the destination.

This is, how I construct the URL:

enter image description here

And this is the URL:

enter image description here

However, after the upload to QGIS Cloud, this link is broken after the "," between Lat/Long which is the standard format for the URL. Obviously this breaks the link and the navigation cannot be started.

How can I prevent QGIS Cloud from separating the URL after the "," ?

enter image description here

There are some questions that appear to be slightly realted but are ~7ish years old. Such as this one: x and y coordinates will only display [x],[y] when field calculator is used to make a url. However the main issue there is, to construct the link. My links seem to work well, but QGIS Cloud is not able to display it properly.

1 Answer 1

1

It's acutally quite simple. I just figured it out, but want to leave it here in case anyone else is running into this issue:

I was lacking the HTML-Encoding.

Instead of:

https://www.google.com/maps/dir/?api=1&destination=Long,Lat&travelmode=driving

I should have written:

https://www.google.com/maps/dir/?api=1&destination=Long%2CLat&travelmode=driving.

Hence replacing the , with %2C.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.