OpenStreetMap 로고 OpenStreetMap

A Map Legend

SomeoneElse님이 English로 2017년 5월 29일에 게시함.

I’ve created a map legend for the map style that I use. It’s a set of map data that can be appended to a rendering database to create a map legend in a blank bit of map (actually in the middle of Australia).

There are currently two parts - linear features and POIs. As far as the map is concerned these are “real POIs” (though they’re never added to OSM itself of course - just added to the rendering database) so you need to zoom in to see some of the POIs such as the one for vending machines, which only appears in this map style from zoom level 19. You could use it with other map styles, but some of the features are dependent on this lua script.

Here’s a preview of what the “roads” part of the legend looks like:

roads

but to use it properly follow the link and move around.

이메일 아이콘 Bluesky 아이콘 Facebook 아이콘 LinkedIn 아이콘 마스토돈 아이콘 텔레그램 아이콘 X 아이콘

토론

2017년 5월 30일 06:51imagico님의 의견

Nice.

This approach however has one big issue - the data is designed for a certain zoom level and the legend does not work when you zoom away from it. For generating a legend this way for all zoom levels you would either need multiple instances of the data at different scales or cut together the legend from different pieces of the rendered map.

2017년 5월 30일 18:09SomeoneElse님의 의견

The “if you move away from it” issue is less of a problem with tabbed browsers everywhere these days; the bigger issue is that there is no one zoom level at which all of the map legend is sensibly visible! Another problem is agressive caching by e.g. mobile web browsers - it can be difficult to persuade an area to redisplay even if reendered on the server.

I’ll probably end up with black boxes around groups of legend items with a label that appears at all zoom levels (saying “zoom in to see more” or similar). It might even be worth having special rendered map features just for the legend (rather than misusing place=locality for some of the names as now).

Even as it is though, it’s hugely useful for QA - I spotted several errors such as “name not displayed” in the style only after I’d created the map legend. As it stands it’s probably only about 20% complete (or maybe 40% complete of style-unique features).

댓글을 남기려면 로그인하세요