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
Looking in vtiles, I think we need to add some OSM-based country and state names, since we currently have only NE stuff at that level, as shown here where we have an OHM polygon for Egyptian Sudan:
But the only point locations on which we could hang labels are place_points at the town and villagle level:
I think what needs to happen is changes at the vtiles level, then we can style those.
but I know such changes, which maybe also require a purge and rerendering of all tiles, are expensive and we may well need to batch these and be more systematic about it.
@danrademacher@tsinn could I suggest we look at the Mapbox Locator Overlay? It's used in iD and other tools now. It's a vector tile source of basic data like place names and I think major roads from OSM.
Since we can add a vector tile layer easily on the front-end, I'd recommend we use this and see if we can just filter for place names. This also ensures that we get updates to names from OSM and don't have to building a pipeline/workflow for that.
@geohacker This sounds easy to implement, but how would we make this time-aware? The reason we removed NE labels was to make sure we don't name countries that didn't exist at whatever point we are looking at in the timeslider. So in the example in the issue, Egyptian Sudan would now be Sudan. So with data from OHM we would see country names change over time, which is the goal
@danrademacher oh! how did I miss that, yes then we would have to add these as country and place points into OHM with start and end date. If there's an open data set with labels and dates, we could consider importing into OHM but otherwise, this would have to be manual.
I was imagining we might be able to derive label points from centroids of country polygons and then use the name attribute for the label. this has all manner of cartographic limitations, but maybe is good enough and gives control of the content and presence of labels (if not placement) to OHM editors
@danrademacher I did think about that approach but that would likely be a bit of weird wrangle on the tiles, I can definitely give it a shot. If you feel like testing the hypothesis, you can add the country_polygon as a symbol layer and use the name attribute for text.
@danrademacher great, I have a feeling it would be ok. I think the tricky part would be positioning. Let me know what you find and we can figure out some approaches. Thanks so much!
@jeffreyameyer I was referring to positioning the label if we are using the name attribute of the polygon. Usually it'll be at the geographic center, but Mapbox GL can offer a range of best options. If we want to create place / country points, then we'll rely entirely on the position what the mapper adds.
you probably still need a fallback in case there is no label but the label node may help mappers to make sure the label goes to where it is supposed to?
Activity
geohacker commentedon Aug 14, 2020
@danrademacher @tsinn could I suggest we look at the Mapbox Locator Overlay? It's used in iD and other tools now. It's a vector tile source of basic data like place names and I think major roads from OSM.
Since we can add a vector tile layer easily on the front-end, I'd recommend we use this and see if we can just filter for place names. This also ensures that we get updates to names from OSM and don't have to building a pipeline/workflow for that.
Details here - https://raw.githubusercontent.com/osmlab/editor-layer-index/gh-pages/sources/world/LocatorOverlay.geojson
danrademacher commentedon Aug 14, 2020
@geohacker This sounds easy to implement, but how would we make this time-aware? The reason we removed NE labels was to make sure we don't name countries that didn't exist at whatever point we are looking at in the timeslider. So in the example in the issue, Egyptian Sudan would now be Sudan. So with data from OHM we would see country names change over time, which is the goal
geohacker commentedon Aug 14, 2020
@danrademacher oh! how did I miss that, yes then we would have to add these as country and place points into OHM with start and end date. If there's an open data set with labels and dates, we could consider importing into OHM but otherwise, this would have to be manual.
danrademacher commentedon Aug 14, 2020
I was imagining we might be able to derive label points from centroids of country polygons and then use the name attribute for the label. this has all manner of cartographic limitations, but maybe is good enough and gives control of the content and presence of labels (if not placement) to OHM editors
geohacker commentedon Aug 14, 2020
@danrademacher I did think about that approach but that would likely be a bit of weird wrangle on the tiles, I can definitely give it a shot. If you feel like testing the hypothesis, you can add the
country_polygonas asymbollayer and use thenameattribute for text.danrademacher commentedon Aug 14, 2020
Ah ok maybe we'll try that on the style side and see how badly it fails!
geohacker commentedon Aug 14, 2020
@danrademacher great, I have a feeling it would be ok. I think the tricky part would be positioning. Let me know what you find and we can figure out some approaches. Thanks so much!
jeffreyameyer commentedon Aug 17, 2020
Should we worry about positioning or just leave it to mappers for positioning?
geohacker commentedon Aug 18, 2020
@jeffreyameyer I was referring to positioning the label if we are using the
nameattribute of the polygon. Usually it'll be at the geographic center, but Mapbox GL can offer a range of best options. If we want to create place / country points, then we'll rely entirely on the position what the mapper adds.geohacker commentedon Aug 18, 2020
@danrademacher unassigned me and sanjay for the moment, let us know when you have had a chance to test the approach we discussed above.
hroest commentedon Aug 19, 2020
@geohacker we could also ask people to use a label node, as in here: https://www.openhistoricalmap.org/relation/2690950 (see
Node Zanzibar Protectorate (2090249079) as label)you probably still need a fallback in case there is no label but the label node may help mappers to make sure the label goes to where it is supposed to?
tsinn commentedon Aug 25, 2020
Yeah, this could be tricky, but we're going to begin by using the
nameattribute of the polygon. We'll see what we're able to do with Maputnik.hroest commentedon Sep 3, 2020
we now have country names! Great 👍
However, there are some places that now have too many country names:
Maine:

or Zanzibar:

https://www.openhistoricalmap.org/#map=11/-6.2996/39.3462&layers=O
I dont think we need quite as many instasnces of the name of the country...
jeffreyameyer commentedon Jan 22, 2021
Suggest we close this ticket or rename it to focus on the positioning / frequency of rendering of polygon names.
Make sense?
Review of current cartography in mbgl-timeslider
First 2021 map style updates
Map style updates
Merge pull request #37 from OpenHistoricalMap/staging