Archive for April, 2017
Creating a new Hot OSM map
Using Tegola and Tegola-OSM I’ve been working on approximating the HOT OSM map style in Mapbox GL. Using the handy CartoCSS available for this style, by-eye comparisons with the raster tile map, and personal interpretation for the 3d building elements, we’ve got this going:
View the demo live here. It’ll be a bit slow and not so great at zoom 4, but we are working on that. I mean, it’s the OSM data of the entire world styled at all zoom levels (plus a bit of natural earth data for admin boundaries and more to come) so there’s a huge amount of data to work with here and lots of things to work out to get right.
If you aren’t familiar with vector tile maps, note that you can shift the pitch (tilt) via Ctrl + left-click + drag. That’s something that we cartographic consultants need to start teaching our clients. Also, different parts of the GL spec are operational on desktop vs iOS vs Android so depending on your device your results will vary a bit at this time.
Maputnik, for the most part, makes it “easy” to style a map as long as you have an endpoint like Tegola serving up some good data (the Tegola endpoint is still very much under development and is undergoing some optimizations and doesn’t have every single map item we’d like to have quite yet).
I say “easy” in quotes because as with everything there is still a learning curve and, as with everything, it is still under development as well. There are a few things that have to be added to the style.json by hand so anything beyond its interface capabilities will require knowledge of json.
Like the data-driven styling on the buildings in this map. You can see an example of that in the image above where the hospital building (type=hospital) is a bit reddish compared to the other buildings. In Maputnik this style still looks like all the buildings except the hospitals and schools are black whereas live it looks the way it is supposed to. Thus I await with eagerness the incorporation of all the cool new things available in the GL spec.
Here’s that bit of code for the building tilt data-driven styling. You can see the “default” property isn’t used and instead, mysteriously, the empty quote does the job for providing the default gray color.
One of the more interesting style choices that came up was where to put the road labels. Google maps puts road labels above 3d buildings when you view on your mobile device and tilt (two finger swipe). This might be ideal for a small amount of screen real estate when you’re using the map for navigation but I think that on larger screens and with different map purposes the street labels can look cleaner when they are beneath the 3d buildings. Take a look at this thread for some opinions on this:
How do we feel about labels floating above extruded buildings? pic.twitter.com/zpSrVuDCgU
— Gretchen Peterson (@PetersonGIS) April 18, 2017
————————————————————————————————————
Styling and stuff, Maputnik, WYSIWYG, osm, all the things except chocolate. https://t.co/Bhxm9zgGRs.
— Gretchen Peterson (@PetersonGIS) April 27, 2017
Great work as always @PetersonGIS Have you seen the @awesomeposm style, subtle changes for field data collection https://t.co/xjnDznikde https://t.co/BRGX41ZFJT
— Dale Kunce (@calimapnerd) April 27, 2017
@calimapnerd @awesomeposm No but I’ll definitely check it out. Thanks!
— Gretchen Peterson (@PetersonGIS) April 27, 2017
@PetersonGIS Wow – nice work! Some thoughts: initial view with no bldg borders and hard 1px shadows is too mazy/abstract. Antialiasing would really help.
— Tom Chadwin (@tomchadwin) April 27, 2017
@PetersonGIS @awesomeposm work is incomplete and yours is better _obviously_ but its our standard for now.
— Dale Kunce (@calimapnerd) April 27, 2017
Fun. New. Exciting! And Stuff. https://t.co/bkzjiY0ieu
— David Puckett (@BrightRain) April 27, 2017
Map Take-Aways
Posted by G.P. in Best Practices on April 20, 2017
One key to cartographic success is employing a deft mixture of subtle and forthright elements in order to achieve that most difficult of harmonizations: effortless yet highly informative communication. Here’s an example that came up in my twitter thread just a few moments ago:
Fun read from @TheInTowner about the creation of DC’s 1950 Comprehensive Plan. #ThrowbackThursday https://t.co/lKhmzOr73w pic.twitter.com/yeDtAAnKRH
— NCPC (@NCPCgov) April 20, 2017
Here we see several elements that help to achieve the right balance:
- Masked basemap: focuses reader attention on the area of interest while also providing geographic context.
- Gray titling: “DISTRICT OF COLUMBIA” is in a light gray color, which minimizes its appearance despite its being diffused across the legend box. You see this often with titles in all-caps.
- Black titling: “LAND USE PLAN” is what the map author really wants you to read first, so this is both in black and all-caps.
- Legend box in light gray: since the light-gray text elements could blend with the light-gray masked basemap, the legend box is needed in this case, but it is kept subtle.
- Bold colors for the landuses: landuse plan maps are notorious for their cartographic difficulty in that the combination of landuses and basemap information can make for an entirely cluttered aesthetic. Making the landuses the number one focus point was a good idea for this map.
- Polygon boundary colors in slightly darker shades: slightly darker polygon boundaries in the same hue as the polygons helps to define the boundaries of the polygons while not overwhelming the map. Black boundaries on all polygons would not have served well here.
Recent Comments