locana-co / PGRestAPI

Node.js REST API for PostGres Spatial Entities. AKA: SpatialServer
Apache License 2.0
436 stars 75 forks source link

zoom level for vector tile #136

Open redheli opened 8 years ago

redheli commented 8 years ago

Hi,

vector tile source is posgGIS, : url: 'http://localhost:3001/services/postgis/cleantech3/geom/vector-tiles/{z}/{x}/{y}.pbf?fields=name'

at zoom level <=18 , everything ok.

from zoom level 19, layer disappear.

any idea?

redheli commented 8 years ago

I solved the problem. add zoomMax at layer options, as blow

var pbfSource = new L.TileLayer.PBFSource({ url: 'http://localhost:3001/services/postgis/xxx/geom/vector-tiles/{z}/{x}/{y}.pbf?fields=name', debug: false, maxZoom: 22, minZoom: 6, clickableLayers: [], getIDForLayerFeature: function(feature) { return ""; } });