umap-project / umap

uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site.
https://umap-project.org
Other
1.2k stars 227 forks source link

Default map position #229

Closed stevage closed 1 year ago

stevage commented 9 years ago

It seems that every map defaults to a view over western Europe until you explicitly set it. This is, um, sub-optimal for 95% of the world :)

Suggestions:

yohanboniface commented 9 years ago

You know you can change it, right?

stevage commented 9 years ago

Yes. (Weird, I thought I added a line to the description saying, "Yes, I know you can change it". Heh.)

It may not seem so bad to you because the default is kind of reasonable for European users. But if the default was, say, Argentina, you'd see it's pretty bizarre.

yohanboniface commented 9 years ago

There are two things here. Firstly, the default center depends of the uMap instance, so as you can see the French instance defaults to somewhere in Europe, but the Swiss one defaults to Switzerland (http://umap.osm.ch/en/map/new/) and the Colombian one defaults to Colombia (http://umap.openstreetmap.co/en/map/new/) ;)

Secondly, that's true that any of those instance can be used by users from anywhere in the world. And true that no default center can match all users needs. So there is room for improvement here.

I don't really like the idea of saving the center while the use doesn't exactly means that.

Here are two other suggestions:

stevage commented 9 years ago

save a cookie each time a user save map position and use this position next time as default center

Yeah, but you'd have to track whether or not they had set an explicit position, which would override this.

Incidentally, this is the approach CartoDB takes, but not with no explicit positions. End users always see wherever you last panned to, which I find really poor UX.

Another approach: if no explicit position, set the initial view to the extent of all layers, zoomed out slightly.

yohanboniface commented 4 years ago

Work in progress cf #841

yohanboniface commented 1 year ago

Should have been done since then!