Closed gravitystorm closed 9 years ago
Very good point about colors!
This will need a rework of the system, because at the moment I'm using raw geojson built by Mapnik, and features have lost the layer name at this stage.
@springmeyer is adding the layer name to the features when in __all__
mode somehow conceivable in node-mapnik? Or maybe I'm just not taking the problem from the correct perspective?
@gravitystorm side note (I know it doesn't cover the issue): have you seen that from the "Inspect" panel you can choose to show only one layer?
@springmeyer is adding the layer name to the features when in all mode somehow conceivable in node-mapnik?
Possible yes, but...
Or maybe I'm just not taking the problem from the correct perspective?
To solve this problem overall I would recommend using the xray functionality directly or via https://github.com/mojodna/tilelive-xray. It will be faster than using geojson as an intermediary.
Oh, nice, thanks for the hint, Dane :)
So I've implemented a simple XRayTile
following the very nice idea suggested (I've already weighted up in the past the possibility to pull in the tilelive suite, but for now I prefer a lighter way).
For the record, basically, here how it works:
query
method of the vectortiles to handle the map popup; this function allows to get the features that intersects a lat/lng point from a tileAll this is allowed thanks to Mapnik vector tiles, which is really an amazing step forward. So this is one more good reason we should build up a monument to @springmeyer. Dane, thanks! :)
Very nice! works a treat.
In the inspection view, all the data is the same (orange) colour. It would be helpful to colour each layer seperately, so that it's easier to tell which layer different features are coming from.
mapbox-studio has a great "xray" behaviour that generates colours automatically for each layer. It also fills in polygons, draws and labels point features.