basemaps icon indicating copy to clipboard operation
basemaps copied to clipboard

Add basic support for sprites

Open nvkelso opened this issue 10 months ago • 6 comments

Description

Adding a basic spritesheet (PNG and JSON config, referenced in the JSON style) would allow town icons and text to pair and collide together avoiding orphan townspot circle symbolizers on the map in the places layer. This would also allow for road shields in the roads layer.

A more advanced option is to add more sprites for the pois layer related to the dozens (and even hundreds) of existing and potential kind values there.

Unlike fonts, icons need to be tied with a map style – if a map style is black and white the icons should also be black and white, if a map style is color than color icons - and tileset major version to allow for additions to kind values.

nvkelso avatar Apr 18 '24 21:04 nvkelso

The results should be published into https://github.com/protomaps/basemaps-assets repo, but linked to style changes in this main basemaps repo.

nvkelso avatar Apr 18 '24 21:04 nvkelso

Because many poi layer kind values have the same effective min_zoom, Tilezen uses an additional collision_rank to add a deterministic order for label collisions. Using PlaneTiler we could use the collision rank but reimplement this as a tile based ordering honored by MapLibre (the collision rank property could be dropped once the tile feature ordering is achieved).

nvkelso avatar Apr 18 '24 22:04 nvkelso

Initial list for tileset v3.6:

pmap:kind: hospital, hotel, library, park, playground, police, post_office, school, stadium, supermarket, university, national_park, forest, station, restaurant, cafe, fast_food, zoo, attraction, fire_station, bank, college, golf_course, military

special icon cases (pmap:kind_detail) with fallback: restaurant: all fork+knife for now place_of_worship: christian, muslim, buddhist, hindu, shinto, jewish, taoist, sikh sport: soccer, tennis, basketball, baseball, swimming, equestrian, golf

townspots, generic shields

todo: airports? different station classes??

bdon avatar Apr 18 '24 22:04 bdon

Yes, airport would be great addition to the basic set :)

nvkelso avatar Apr 29 '24 19:04 nvkelso

I'm going to merge styles v3.0.0 with the minimum possible sprites (townspot only) and then make more additions in minor versions.

bdon avatar May 09 '24 08:05 bdon

Perhaps for later, I’d suggest museum as a nice basic one.

Looking forward to POI sprites and labels on the map! Those really help bring a map together.

RyanTG avatar Sep 28 '24 05:09 RyanTG