Open bbest opened 6 years ago
Shiny alternative:
input$map_bounds
Leaflet Vector Tiles // Speaker Deck
NOTE: RStudio/leaflet is still on leaflet 0.7, which does not support vector tiles, but close to migrating...
https://github.com/AmericanRedCross/GeoForce
This is the front-end JavaScript application that utilizes AngularJS, Leaflet, and Bootstrap.
var style_highlighted = new ol.style.Style({
fill: new ol.style.Fill({
color: 'yellow'
}),
stroke: new ol.style.Stroke({
color: '#880000',
width: 1
})
});
//...
function simpleStyle(feature) {
if (feature.get("region_un") == "Africa") {
return style_highlighted;
}
return style_simple;
}
Vector tile output with Africa highlighted
Leaflet.MapboxVectorTile/configuration.md at master · SpatialServer/Leaflet.MapboxVectorTile
commit https://github.com/bbest/terrapulse/commit/199922b424dfce630d5905f5b54dc82716ee3adf#diff-5e15f604c40ccd66afb0ce7e9d2d44f5 - MapBoxVectorTiles for Summit test app working: vectortiles/app.R
http://t-rex.tileserver.ch/ Create and serve your own vector tiles
This likes the way to go in future:
The Mapzen vector tile server uses the familiar slippy tile zoom/x/y URL format:
http://tile.mapzen.com/mapzen/vector/v1/{layers}/{z}/{x}/{y}.{format}?api_key={api_key}
Note: uses standard {y}
, not {-y}
like GeoServer, which means don't need {-y}
tms hack in Leaflet.MapboxVectorTile like I implemented in https://github.com/bbest/leaflet.extras.
MAPS - Vector tiles & display
Efficiently handle many/big polygons with WMS and SLD in GeoServer.
Use GeoServer to efficiently handle many/big polygons with many vertices so GUI doesn't send individual vertices to client, which for polygons with many vertices becomes unwieldy and slow. The fastest way I know is to overlay a WMS png, which could be styled with a style layer descriptor (SLD).