-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Get user's current coordinates from browser #98
Comments
Thanks for the enhancement request. For Maps this is relatively easy to do. However for Semantic Maps some serious work is needed to make such a feature work properly, as the query would need to be aware of the location. |
But if we hade something like {{CURRENTLOCATION}} that results in the current coordinates, it would be easy, both for maps and semantic maps... |
Sure... however how would this work? Wikitext is evaluated on the server and does not depend on the user. Both of these things prevent you from getting information from the clients browser. |
According to [0], "Using HTML Geolocation.. to get the user's position."
|
That gets you the information in the clients browser, not on the server side. So I still don't see how this can work for Semantic Maps. |
For me, it requires a few extensions to make it work, including Widgets and UrlGetParameters. The Widgets is used to make button to request geolocation, and put it on the url string, and then directs to a new page where the lat lngs in the url parameters are parsed and the queried. See http://www.transitunlimited.org/Main_Page for the first button. |
I guess WhatsNearby makes this feature available. |
Also I could create options for SemanticMediaWiki/SemanticMaps#52 like |
Well, the reason I didn't put it into SM directly was mainly for privacy reasons. A users makes a concious decision about being traceable if it is not disabled. |
I'm all for respecting to users choice not to be traced. I don't understand why this is linked to putting it in SM or not. Anyway I will focus on different things for now. |
We have the WhatsNearby extension mentioned earlier in this thread. I have not fully understood why Maps should be extended rather than using WhatsNearby to do the job. Does WhatsNearby actually do the job? @nischayn22 FYI |
Haven't really followed the previous thread, but one challenge for WhatsNearby is: how could we achieve an interface with more sliders than just the location? The filtered result format would be a possiblity, but currently, it is either a map view for the filtered format or WhatsNearby that cannot add more filters....
So yes, WhatsNearby is great and works, but its always better to have things integrated...
…----- Am 23. Jan 2017 um 22:59 schrieb Karsten Hoffmeyer <notifications@github.com>:
We have the WhatsNearby extension mentioned earlier in this thread. I have not
fully understood why Maps should be extended rather than using WhatsNearby to
do the job. Does WhatsNearby actually do the job?
@nischayn22 FYI
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub , or mute the thread .
|
Looks like this is developing in a melange of things which should or could be addressed after the originating question is answered. |
Closing since this is presumably handled by WhatsNearby. If not and there is still demand for this, please create a new issue. |
It should be possible to get the current location of a user (the user's browser) via JavaScript:
https://www.mediawiki.org/wiki/API:Showing_nearby_wiki_information#How_to_get_geographic_coordinates
This can then be used e. g. in Semantic Maps queries, or also simply in Maps, centering a map around a current location or displaying the current location on a map.
http://semantic-mediawiki.org/wiki/Semantic_Maps_examples/Distance_query - here the distance query is done with a fixed coordinate, it would be great if we could do:
[[Has coordinates::{{CURRENTLOCATION}} (0.3 km)]]
The text was updated successfully, but these errors were encountered: