-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open in external app/site with coordinates. #1076
Comments
Feature branch pushed. |
Looking forward to trying it out, seems like a nice addition! I agree that the icon seems correct here, but we will need to handle the conflict between this and the other plugin using it (by finding something better for the other one I guess). |
A small suggestion: perhaps a |
A small but good suggestion 👍 |
Would this icon be wrong for "Dela"? Maybe the "Dela" tool will have additional Share-methods in the future. For example Share on instagram, share on facebook etc etc. Just thinking... |
I agree, the icon you suggest is way better for the Anchor plugin than the current one. Feel free to change! |
This looks really good. Regarding Admin: perhaps it would make it easier if Admin provided some presets to some of the more common services (Google Maps, OpenStreetMap, Google StreetView)? This would make it very easy to enabled the preferred services. |
Sure, I'll se if I can find a good sollution for this. |
We've had a discussion about this a few months ago.
Anyways I've made a POC that my collegues liked. Basically it's all coded (well not in the AdminUI).
We need to be able to open a link with the currently centered coordinates applied. So a dynamic link will be generated.
The generated url will simply just open in a new tab/window what clicked.
In config a link will look like this (Example Google street view):
https://maps.google.com/?q=&layer=c&cbll={y|EPSG:4326|4},{x|EPSG:4326|4}
The string
{y|EPSG:4326|4}
in the link will be replaced with the Y-coordinate from Hajk.The string
{x|EPSG:4326|4}
in the link will be replaced with the X-coordinate from Hajk.The coordinate will be converted from EPSG:XXXX to EPSG:4326 thats the projection that Google uses as input.
And finally we cut the coordinate to 4 decimals. (4 is also default).
So the object in the url has this format:
It is also possible to use
{zoom}
in the urls which is useful if you link to another Hajk-map (In our case, Geodatabanken).Here is some other configuration examples (Also, see screenshot):
Screenshot:
One issue is the icon used to toggle the menu, it is also used for "Share/Dela". But the icon is mostly used as a "Open in external application"-icon.
Let me know your thoughts!
I will soon push my code to a feature branch.
The text was updated successfully, but these errors were encountered: