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

Add basic support for sprites #238

Open
nvkelso opened this issue Apr 18, 2024 · 6 comments
Open

Add basic support for sprites #238

nvkelso opened this issue Apr 18, 2024 · 6 comments

Comments

@nvkelso
Copy link
Collaborator

nvkelso commented Apr 18, 2024

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
Copy link
Collaborator Author

nvkelso commented Apr 18, 2024

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

@nvkelso
Copy link
Collaborator Author

nvkelso commented Apr 18, 2024

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).

@bdon
Copy link
Member

bdon commented Apr 18, 2024

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??

@nvkelso
Copy link
Collaborator Author

nvkelso commented Apr 29, 2024

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

bdon added a commit that referenced this issue May 8, 2024
* Initial sprite generation code. [#238, #167]

* update townspot themes [#167]

* support 1x and 2x ratios

* pin pmtiles dependency; fix style diffing when changing themes
bdon added a commit that referenced this issue May 9, 2024
* Townspots are rendered as part of the symbol layer and require a theme-specific spritesheet.
* Deployments of basemaps style v3.0.0 requires specifying a sprite MapLibre style property just like fontstacks.
bdon added a commit that referenced this issue May 9, 2024
* Townspots are rendered as part of the symbol layer and require a theme-specific spritesheet.
* Deployments of basemaps style v3.0.0 requires specifying a sprite MapLibre style property just like fontstacks.
@bdon
Copy link
Member

bdon commented May 9, 2024

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 added a commit that referenced this issue May 10, 2024
* Townspots are rendered as part of the symbol layer and require a theme-specific spritesheet.
* Deployments of basemaps style v3.0.0 requires specifying a sprite MapLibre style property just like fontstacks.
bdon added a commit that referenced this issue May 10, 2024
* Townspots are rendered as part of the symbol layer and require a theme-specific spritesheet.
* Deployments of basemaps style v3.0.0 requires specifying a sprite MapLibre style property just like fontstacks.
bdon added a commit that referenced this issue May 10, 2024
* remove unused city_circle and city_circle_stroke theme variables. [#238]

* styles v3.0.0: Introduce spritesheets [#238, #167]

* Townspots are rendered as part of the symbol layer and require a theme-specific spritesheet.
* Deployments of basemaps style v3.0.0 requires specifying a sprite MapLibre style property just like fontstacks.

* update changelog copy
@RyanTG
Copy link

RyanTG commented Sep 28, 2024

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.

bdon added a commit that referenced this issue Oct 9, 2024
bdon added a commit that referenced this issue Oct 9, 2024
* major green sprites [#238]

* fix townspots
bdon added a commit that referenced this issue Oct 10, 2024
remove dedicated peaks layer
add poi object to themes [#238]
bdon added a commit that referenced this issue Oct 10, 2024
limit to 4 kinds of green icons for now
bdon added a commit that referenced this issue Oct 10, 2024
bdon added a commit that referenced this issue Oct 10, 2024
bdon added a commit that referenced this issue Oct 10, 2024
* cleanup base layers; add landuse kind=runway
* make halos more consistent
* change light waterway labels to blue
* remove dedicated peaks layer
* add poi object to themes [#238]
* add main sprites layer [#238] limit to 4 kinds of green icons for now
* point sprites at v4 [#238]
* add beach and zoo [#238]
* styles 4.1.0; CHANGELOG
alexandresoro pushed a commit to alexandresoro/ouca that referenced this issue Oct 10, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [protomaps-themes-base](https://github.com/protomaps/basemaps) | dependencies | minor | [`4.0.1` -> `4.1.0`](https://renovatebot.com/diffs/npm/protomaps-themes-base/4.0.1/4.1.0) |

---

### Release Notes

<details>
<summary>protomaps/basemaps (protomaps-themes-base)</summary>

### [`v4.1.0`](https://github.com/protomaps/basemaps/blob/HEAD/CHANGELOG.md#Styles-v410)

[Compare Source](protomaps/basemaps@468df9f...8ec42aa)

-   add icon sprites for six green kinds \[[#&#8203;238](protomaps/basemaps#238)]
-   point v4 styles at v4 sprites assets URL
-   change light theme water color to blue instead of white for contrast
-   consistent halo size across layers
-   add landuse `kind=runway`

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMTUuMSIsInVwZGF0ZWRJblZlciI6IjM4LjExNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: https://git.tristess.app/alexandresoro/ouca/pulls/211
Reviewed-by: Alexandre Soro <[email protected]>
Co-authored-by: renovate <[email protected]>
Co-committed-by: renovate <[email protected]>
bdon added a commit that referenced this issue Oct 23, 2024
* adjust light earth color
* adjust POI text scaling at z17+
bdon added a commit that referenced this issue Oct 23, 2024
* * add initial set of lapis and slategray icons. [#238]
* adjust light earth color
* adjust POI text scaling at z17+
alexandresoro pushed a commit to alexandresoro/ouca that referenced this issue Oct 24, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [protomaps-themes-base](https://github.com/protomaps/basemaps) | dependencies | minor | [`4.1.0` -> `4.2.0`](https://renovatebot.com/diffs/npm/protomaps-themes-base/4.1.0/4.2.0) |

---

### Release Notes

<details>
<summary>protomaps/basemaps (protomaps-themes-base)</summary>

### [`v4.2.0`](https://github.com/protomaps/basemaps/blob/HEAD/CHANGELOG.md#Styles-v420)

[Compare Source](protomaps/basemaps@8ec42aa...1de7755)

-   add icons for a few lapis and slategray POIs \[[#&#8203;238](protomaps/basemaps#238), [#&#8203;163](protomaps/basemaps#163)]
-   adjust light theme earth color
-   add fonts and landcover as optional properties of `Theme` interface

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMzAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEzMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: https://git.tristess.app/alexandresoro/ouca/pulls/264
Reviewed-by: Alexandre Soro <[email protected]>
Co-authored-by: renovate <[email protected]>
Co-committed-by: renovate <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants