basemaps icon indicating copy to clipboard operation
basemaps copied to clipboard

Generate basemap with richer/more specific tags/layers

Open adamcohenhillel opened this issue 9 months ago • 4 comments

I am looking for a way to generate a custom basemap with some specific tags that exists in OSM but doesn't exist in the Protomaps Basemap, for example -> tag:amenity=shelter (https://wiki.openstreetmap.org/wiki/Tag:amenity%3Dshelter)

Any resource on how to do that?

I guess I need to change/add something in tiles/src/main/java/com/protomaps/basemap/layers, but not sure what and how. Any help would be awesome!

Thank you

adamcohenhillel avatar May 01 '24 01:05 adamcohenhillel

Hi @adamcohenhillel. A good start can be to search for amenity for example here: https://github.com/search?q=repo%3Aprotomaps%2Fbasemaps%20amenity&type=code

Now it depends if you would like to add points or polygons. For points, you probably want to add it to the POI layer, for polygons, maybe the Landuse layer could be good. Let me know if you have further questions...

wipfli avatar May 01 '24 04:05 wipfli

@adamcohenhillel our long term goal is to make the basemap extensible for specific use cases, but there's no framework around that yet.

The easiest pathway is right now is to overlay OSM shelters as a GeoJSON or PMTiles dataset separately from the basemap, is there a reason you need it integrated directly into the basemap?

bdon avatar May 02 '24 06:05 bdon

Hey @bdon , thanks for the reply! It doesn't have to be integrated directly into the basemap, I can add a separate overlay. My use-case is basically add/remove different annotations to/from the map, based on a user clicking a button.

Do you have by any chance an example for how to add a simple overlay from OSM on the basemap? (either as a GeoJSON or PMTiles dataset, whatever is easier).

I am using the MapLibre GL

adamcohenhillel avatar May 15 '24 03:05 adamcohenhillel

for amenity=shelter you could grab GeoJSON from an Overpass API instance and then pass the GeoJSON into https://github.com/felt/tippecanoe to create PMTiles.

bdon avatar May 16 '24 08:05 bdon