You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Places: Improve details of the default world map #2998
As a user of the free Community Edition, I would like to have more detail included in the basic world map so that I can better browse my pictures by location.
Since more than 95% of users opt for our completely free version without signing up as a sponsor, we unfortunately can no longer offer the high-quality commercial maps to everyone. Kindly note that they were also not listed as a free feature in our overview in the past, but were still available for evaluation purposes.
To improve the situation, it would be possible to add more details like cities and lakes to the basic maps. The only problem is that we don't have the resources to do that due to our large backlog of feature requests. So this would be a perfect task for contributors! ❤️
We are aware that advanced users could register "non-commercial test accounts" instead, but we think that would not be completely fair and MapTiler could then no longer offer them to those in need. Keep in mind that we have many more users than other open source projects that might encourage their users to do this. Likewise, using the OpenSteetMap development API is discouraged for consumer applications like ours, although some projects do it anyway. See our FAQ: https://docs.photoprism.app/getting-started/faq/#are-the-keys-for-using-interactive-world-maps-provided-free-of-charge
We also created the existing GeoJSON file from public data. I can't remember the exact steps, but maybe there are hints in the Git commit messages or old GitHub comments. Probably downloaded individual files specifying the land, borders, and sea, and then merged them using a command line tool.
There are many websites and repos to choose from (but always check the license before downloading):
changed the title [-]Places: Improve the level of detail of the basic world map[/-][+]Places: Improve the level of detail of the included offline world map[/+]on Dec 15, 2022
Hi, I think it would be nice to add a "Custom tileserver URL" option :) that way everyone can host their own tileserver e.g. only for their country
Also, I have some experience with OpenStreetMap, I'll try to generate a geojson that's feasible for this kind of use, but it may be hard to fit a map of the whole world into a few MB :)
Reacted by Josh Taillon, Daniel, Christos Sidiropoulos and Ronald Bynoe
Hi, I think it would be nice to add a "Custom tileserver URL" option :) that way everyone can host their own tileserver e.g. only for their country
Generally yes, although hosting custom maps is a bit advanced. Considering all the other feature requests, we can't make this our highest priority. Feel free to remind us later next year! 😉
Also, I have some experience with OpenStreetMap, I'll try to generate a geojson that's feasible for this kind of use, but it may be hard to fit a map of the whole world into a few MB :)
Thanks, that's awesome! The JSON is not so big anymore when it is gzip compressed. Maybe there is also a way to use multiple files for lazy loading? This is the UI library we use: https://maplibre.org/
I replaced the file and tested it but could not see any cities. So I assume that either the code must be changed or the layer is not visible for some reason?
Honestly, I don't know how to make the geojson working with photoprism :(
However, I'm currently experimenting with vector tiles, and here's what I found out so far:
mbtiles file for Poland with MAX_ZOOM=7 takes 13.8MB, can be overzoomed quite reasonably
If I'm estimating correctly, mbtiles file for the whole planet would take about 650MB. It seams reasonable to ship with photoprism / as a additional download
Unfortunately, in order to generate a mbtiles file it's required to import OSM files into a postgresql database
The import process takes quite some time (haven't measured it unfortunately)
After the import, tiles can be quickly regenerated (270s for Poland on i7-3770 w/ 16G of RAM)
I'll try to create tiles for a bigger area (Europe probably), if that works out reasonably I'll try to create a whole planet :)
@lapo-luchini I can imagine that a locally hosted option might be preferable for a few users who have particularly high privacy requirements, don't need too much detail and frequent updates, have enough storage, don't use the maps from the public internet, or optionally have an internet connection with high-speed upload, their own CDN, or host their instance with a cloud provider (in which case the privacy advantage is somewhat mitigated). Note that we don't make money from advertising or selling data to advertisers, so we neither have a team to analyze your data nor customers to buy it. IMHO this should impact the choices and tradeoffs you want to make.
Edit: That being said, you are of course welcome to fork and customize our software for your own needs, including to use other maps.
I'm so glad this was finally addressed in community edition. The map was the main feature I chose photoprism over alternatives and that bare map before, without any names or features, was completely useless.
@HeikoGr The map style selector we added in #2106 is only visible if your instance got a valid maps key from us, e.g. because you signed up as a member. The free default map (see screenshot below) is loaded from our CDN, so you don't need access to the MapTiler API.
Activity
filipnyquist commentedon Dec 13, 2022
I know that Naturalearth provide some public domain maps , might be worth look into https://github.com/nvkelso/natural-earth-vector
lastzero commentedon Dec 13, 2022
We also created the existing GeoJSON file from public data. I can't remember the exact steps, but maybe there are hints in the Git commit messages or old GitHub comments. Probably downloaded individual files specifying the land, borders, and sea, and then merged them using a command line tool.
There are many websites and repos to choose from (but always check the license before downloading):
👉 it might be worth automating this with a script so that it can be easily updated/improved later without having to start from scratch (again)
lastzero commentedon Dec 15, 2022
For more clarity, we have renamed the included offline maps to "Low Resolution" in the "Settings" drop-down menu (previously "Basic").
[-]Places: Improve the level of detail of the basic world map[/-][+]Places: Improve the level of detail of the included offline world map[/+]maciejla commentedon Dec 30, 2022
Hi, I think it would be nice to add a "Custom tileserver URL" option :) that way everyone can host their own tileserver e.g. only for their country
Also, I have some experience with OpenStreetMap, I'll try to generate a geojson that's feasible for this kind of use, but it may be hard to fit a map of the whole world into a few MB :)
lastzero commentedon Dec 30, 2022
Generally yes, although hosting custom maps is a bit advanced. Considering all the other feature requests, we can't make this our highest priority. Feel free to remind us later next year! 😉
Thanks, that's awesome! The JSON is not so big anymore when it is gzip compressed. Maybe there is also a way to use multiple files for lazy loading? This is the UI library we use: https://maplibre.org/
maciejla commentedon Dec 30, 2022
Good news 1 - I was able to add some city names (
place=cityin OSM) without drastically changing the file size (1.6MB, 380KB gzipped)Bad news 1 - I don't think it's possible to go much further with one single geojson file
Bad news 2 - I don't know how to do it better
Good news 2 - I'm willing to learn how to do it :)
So, I'm publishing the resulting geojson here - feel free to use it if you want :)
I'll try to figure out some kind of lazy loading now :)
(sorry for sending it in a zip, github doesn't accept json in issues for some reason)
world2.zip
maciejla commentedon Dec 30, 2022
My workflow in short:
then delete osm id's, as they aren't needed in this case:
then merge with the existing file:
then minify:
lastzero commentedon Dec 30, 2022
Thanks! I'll replace the file and add a script with the commands when I have a bit of time 💐
lastzero commentedon Dec 31, 2022
I replaced the file and tested it but could not see any cities. So I assume that either the code must be changed or the layer is not visible for some reason?
maciejla commentedon Dec 31, 2022
Whoops, my fault. I'll try to fix that now :)
maciejla commentedon Jan 9, 2023
Honestly, I don't know how to make the geojson working with photoprism :(
However, I'm currently experimenting with vector tiles, and here's what I found out so far:
I'll try to create tiles for a bigger area (Europe probably), if that works out reasonably I'll try to create a whole planet :)
51 remaining items
lastzero commentedon Jun 6, 2023
@lapo-luchini I can imagine that a locally hosted option might be preferable for a few users who have particularly high privacy requirements, don't need too much detail and frequent updates, have enough storage, don't use the maps from the public internet, or optionally have an internet connection with high-speed upload, their own CDN, or host their instance with a cloud provider (in which case the privacy advantage is somewhat mitigated). Note that we don't make money from advertising or selling data to advertisers, so we neither have a team to analyze your data nor customers to buy it. IMHO this should impact the choices and tradeoffs you want to make.
Edit: That being said, you are of course welcome to fork and customize our software for your own needs, including to use other maps.
lastzero commentedon Jun 7, 2023
Final testing for the upcoming release has started and the release notes have been updated to document all changes:
Jeff254 commentedon Jun 7, 2023
loulou91 commentedon Jun 8, 2023
Thanks you so much for this really great improvement of the CE edition!
For me it's a welcome gift ;-)
gitinthebus commentedon Sep 26, 2023
I'm so glad this was finally addressed in community edition. The map was the main feature I chose photoprism over alternatives and that bare map before, without any names or features, was completely useless.
HeikoGr commentedon Nov 9, 2023
I was curious if you have updated the maps recently and discovered that you now use api.maptiler.com instead of your own maps-server since #2106
@lastzero
to avoid an unnecesary invoice from maptiler:
was this by accident or a planned change?
lastzero commentedon Nov 10, 2023
@HeikoGr The map style selector we added in #2106 is only visible if your instance got a valid maps key from us, e.g. because you signed up as a member. The free default map (see screenshot below) is loaded from our CDN, so you don't need access to the MapTiler API.
HeikoGr commentedon Nov 10, 2023
I see. I thought the "default" in the selector was the old low res geo.json (because my browser wasn't fast enough with rendering).