- Style via TileMill
- Export to .mbtiles (2 things included: raster images and UTFGrid teaser)
- 3 Implementation Options
- Expensive if very large
- Upload .mbtiles to MapBox and a TileJSON is created for you (bundles raster images and UTFGrid teaser together)
- MBTiles server implementation like TileStream (Tested: Mac OS X 10.6, Ubuntu 10.04, Ubuntu 11.04, Dependency: node 0.8.x, At least 613MB memory, Ubuntu install guide or here or VM or gotchas)
- Server needed
- Would need to examine options within this
- Potentially not dealing with splitting mbtiles (raster images and UTFGrid teaser)
- I believe you have to make a TileJSON yourself
- Thematic Mapping Blog Tutorial - uses mbtiles-php
- Server needed
- Last hack resort help
- Deal with splitting mbtiles (raster images and UTFGrid teaser)
- handle
gzip
encoding viagzip
ormbutil
libraries, usewax
, make sure grid coordinates are like OSM
- handle
- Tiles on disk are notoriously difficult to manage.
- Requires installing
Git
,Python >= 2.6
- I believe you have to make both a TileJSON and gridLayer yourself
?????
- Build Site (HTML / CSS / JavaScript)
- Upload Site
UTFGrid example and docs - is how Internews Afghanistan map created JSON objects based on mouseover. Baked into TileMill as the teaser interactivity.
- Use create_utfgrids as the mbutil built-into TileMill hasn't been updated to the current Mapbox.js library
- If using mbutil to create UTFGrids, must use 0.2.0 version and add
--grid_callback=""
MBTiles - SQLite spec to query individual rendered map tiles exported from TileMill, has 2 elements: raster tile imagery and UTFGrid interactivity. Mapbox.js automates display of teaser interactivity using tooltips via L.mapbox.gridLayer()
. But MBTiles is just a SQLite specification not actually storing the imagery but a string reference to it. Read more here...
- If Option 2 or 3, what how does
L.mapbox.gridLayer()
in Mapbox.js work? Is it a big JSON that returns little JSONs (i.e. what I saw from Internews)? How are they divided?
- I'm under the impression that it would be possible to pull out the UTFGrid info and have it appear wherever you want it to, not appearing in the status quo tooltip...
- gridLayer question and spec
2 Sources of Interactivity (GeoJSON and TileJSON) in 1 Panel will be very difficult to do.
Have all UTFGrid teaser interactivity done in TileMill
GeoJSON interactivity either in...
- PopUps
- Overlap the UTFGrid teaser Tooltip
GeoJSON Marker from URL - How We Could Import the GeoJSON directly from geojson.io (via a gist), if not directly loading it in the site directory
Geocoder - Nicer Looking than Past Library
Layers - Nice Addition to Show How Background / Layers Can Be Different, Less Clunky Looking
Custom Legend - Done Before But Reminder
Open PopUp Programmatically - As List of Government Actions
Interactive Image Slideshow - A Solution for GeoJSON Marker Interactivity, if double interactivity (GeoJSON and TileJSON) gets too hairy
L.mapbox.gridControl()
- follow allows for the tooltip to move
L.mapbox.gridLayer()
- assign UTFGrid layer from TileJSON
Map UI: Layer and UTFGrid Switcher
Leaflet.utfgrid - JavaScript extension to implement UTFGrid - example and another with tutorial
Internews Afghanistan Map - pass JSON on mouseover to drawer (i.e. data['id']), involves generating a UTFGrid grid.json
Cross-Domain Content - to use for either GeoJSON content popup
Billion Ton Update Biomass Production by County
Hurrican Irene Twitter Activity
d3-metatable - for JSON objects of varying schemas
TileMill Examples by springmeyer
GitHub Template for Internews-like Map
Export mbtiles to Linux tile directory
JSONView - pretty printing of JSON for testing
Google Charts via Mapbox.js - An example from this thread
wboykinm from GeoSprocket in Vermont