Skip to content
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

Show marker on map after searching for coordinates #7435

Open
carstenhag opened this issue Mar 15, 2020 · 17 comments
Open

Show marker on map after searching for coordinates #7435

carstenhag opened this issue Mar 15, 2020 · 17 comments
Labels
considering Not Actionable - still considering if this is something we want usability An issue with ease-of-use or design

Comments

@carstenhag
Copy link

carstenhag commented Mar 15, 2020

After searching for a specific location, ID should show a location marker on the specifc location. Currently, it just zooms in somewhat, but it's unclear where exactly the coordinate is from.

My usecase is: I take a photo, then extract the coordinates and search with them on ID, for example 48.304564,10.9553521. I then want to tag the node I took a photo from at the specific location.

Google Maps shows a location marker after searching with coordinates:

chrome_d1s8b51cs2

ID, as said, just zooms in and leaves me with a big area to locate the thing I want to tag:

m4quSr2eql

@quincylvania quincylvania added considering Not Actionable - still considering if this is something we want usability An issue with ease-of-use or design labels Mar 15, 2020
@jidanni
Copy link
Contributor

jidanni commented Mar 20, 2020

Not allowed, according to #6830 #4197 #4218 #6173 #5117 #3088 etc. etc. etc.

@carstenhag
Copy link
Author

Okay, so I read some of these. Clearly I was there because I took the picture. I can tell whether the found location was along my trip or is in China (or in the Atlantic sea, wherever the mixed up coordinates would put me at).

@carstenhag
Copy link
Author

That's exactly why we don't show a marker - Because there is no map feature there to edit. iD is an editor, not a search engine, so we only draw markers where things are.

Clearly there is a search field, so the point is moot imo. The search is there for orientation. An editor needs orientation, else I would put amenities in the wrong city? Seems like an excuse to me, imo.

@jidanni
Copy link
Contributor

jidanni commented Mar 21, 2020

Maybe there could be an independently distributed plugin for this. Alas I read iD is "usable directly in the browser without plugins"...

@jidanni
Copy link
Contributor

jidanni commented Mar 21, 2020

It seems this is a perfect candidate for a simple plugin. Plugins were mentioned in #1392 #3836 #1391 .

@jidanni
Copy link
Contributor

jidanni commented Nov 30, 2020

Today I devised a test:

Does the (frustratingly "invisible/nonexistent" coordinate search result) marker stay at the center of the screen as one
zooms in with the + button, or does it drift to the side?

To do this experiment, we

  1. Take the coordinates of a known point,

24.1843080, 120.8723690

  1. Tinker with them a little (else the search function recognizes the
    point, ruining the experiment.)

24.1843081, 120.8723691

  1. Put them in the search box, and click on the "Location" provided.

27316-0

Indeed, no drift observed all the way to the maximum zoom level.

@jidanni
Copy link
Contributor

jidanni commented May 2, 2021

Hack to search for exact coordinate position and actually see where it is (instead of just "somewhere in the center of the screen")!: #4197 (comment) .

@tekeroth-snapcode
Copy link

I dont understand these comments and "we dont do this". If someone searches for a specific coordinate, why not show it on the map? It has nothing to do with editing the map, or dragging nodes or anything like it. It is just a question of showing the exact coordinate on the map.

How is this a problem?

@1ec5
Copy link
Collaborator

1ec5 commented Apr 26, 2023

It has nothing to do with editing the map, or dragging nodes or anything like it. It is just a question of showing the exact coordinate on the map.

The original post and most of the linked issues have been explicit that this is about editing the map. In any event, you can triangulate your cursor over the desired coordinate interactively, by enabling the Measurement panel and observing the coordinates as you move the cursor around the center of the map. If you need to repeat this process many times for many coordinates that come from something like EXIF data (as described above) or a GPS trace, you can add a GPX or GeoJSON file as a custom data layer using the Map Data panel.

@tekeroth-snapcode
Copy link

Hello, and thanks for the reply!
The creator of this thread mentioned not a thing about editing the map, if you read the post. He simply says that there is no map marker when searching for a coordinate. And he is right.

It is a basic use case that when you add a coordinate, that that position is shown on the map. Not in edit mode, but in the normal search/view mode.

The suggestion you have, to "triangulate your cursor", is frankly not a solution. The simple, straightforward solution is of course to show the coordinate with a map marker, just like google does. This is a no-brainer, and I cannot understand why the OSM admins are so against it. It truly baffles me.

@1ec5
Copy link
Collaborator

1ec5 commented Apr 27, 2023

My usecase is: I take a photo, then extract the coordinates and search with them on ID, for example 48.304564,10.9553521. I then want to tag the node I took a photo from at the specific location.

@1ec5
Copy link
Collaborator

1ec5 commented Apr 27, 2023

The suggestion you have, to "triangulate your cursor", is frankly not a solution. The simple, straightforward solution is of course to show the coordinate with a map marker, just like google does. This is a no-brainer, and I cannot understand why the OSM admins are so against it. It truly baffles me.

This issue remains open, in case someone comes along contributing a fix. I don’t know who you’re referring to as the OSM admins against this idea, but what I suggested was a workaround, in case the lack of this marker was impeding your edits somehow.

@carstenhag
Copy link
Author

As the issue creator, maybe I can clarify:

Yes, I want the marker to be shown both on the read-only and the editing parts.

No, I will not blindly use the found location to create a node. I will still use common sense, trying to find an existing node/way. If nothing's there yet, I will use common sense such as using the satellite map or only creating a note with the image.

@tekeroth-snapcode
Copy link

Alright, he talks about ID, I admit, I dont know what that is, I guess the editor then.

But in any case, the primary missing feature is in the view/search-mode. But I would also guess, it is missing in the edit mode too. Several issues have been on this, it seems, and some ppl (above) says:

Not allowed, according to #6830 #4197 #4218 #6173 #5117 #3088 etc. etc. etc.

This is in my opinion completely wrong. Of course the map should show a marker where the coordinate is, as you have entered them. Both in read-only and edit mode.

The funnies thing is that OSM shows the coordinates in the "Search Results" on the left, and if you hover the mouse over the coordinate, it shows up on map, but only if you hover 🤣 Oh why oh why? It is almost like an insult ;-)

@1ec5
Copy link
Collaborator

1ec5 commented Apr 27, 2023

This repository is about OpenStreetMap’s Web-based editor, iD. A separate project, openstreetmap-website, is responsible for the “read-only mode”. (iD is actually a frame embedded inside that website.) There are some issues about how the website’s coordinate-based search result doesn’t do anything except on hover: openstreetmap/openstreetmap-website#2197 openstreetmap/openstreetmap-website#3827.

One of the reasons nothing has happened on this front is that there has been a steady stream of strident, at times counterproductive lobbying for a coordinate-based editing tool over the years. Even though that isn’t quite what’s being requested here, the tenor of those requests has previously dissuaded people from contributing to this area of the codebase.

In case anyone is interested in designing a working solution for a transient marker when searching (but not editing), here’s where the sidebar detects that the search terms are a coordinate pair and displays the coordinate pair as a search result:

var locationMatch = sexagesimal.pair(q.toUpperCase()) || q.match(/^(-?\d+\.?\d*)\s+(-?\d+\.?\d*)$/);
if (locationMatch) {
var loc = [Number(locationMatch[0]), Number(locationMatch[1])];
result.push({
id: -1,
geometry: 'point',
type: t('inspector.location'),
name: dmsCoordinatePair([loc[1], loc[0]]),
location: loc
});
}

Here’s where the sidebar reacts to the cursor hovering over the search result, highlighting and unhighlighting it:

function mouseover(d3_event, d) {
if (d.id === -1) return;
utilHighlightEntities([d.id], true, context);
}
function mouseout(d3_event, d) {
if (d.id === -1) return;
utilHighlightEntities([d.id], false, context);
}

@tekeroth-snapcode
Copy link

Thank you very much for the input, I appreciate it.

I also found that @jidanni found a workaround:
openstreetmap/openstreetmap-website#2197 (comment)

@jidanni
Copy link
Contributor

jidanni commented Apr 29, 2023

Yes but my workaround for the website makes it even more maddening for iD:
There I am looking at the exact position on the website, but there's no way to somehow transport that marker to iD!!! !! !!!! !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
considering Not Actionable - still considering if this is something we want usability An issue with ease-of-use or design
Projects
None yet
Development

No branches or pull requests

5 participants