Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var simple = {
- "version": 8,
- "sources": {
- "osm": {
- "type": "vector",
- "tiles": ["http://localhost:8080/geoserver/gwc/service/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=putian:buildings&STYLE=&TILEMATRIX=EPSG:900913:{z}&TILEMATRIXSET=EPSG:900913&FORMAT=application/x-protobuf;type=mapbox-vector&TILECOL={x}&TILEROW={y}"]
- //"tiles": ["http://TegolaServerHost:8082/maps/zoning/{z}/{x}/{y}.vector.pbf"]
- }
- },
- "layers": [
- {
- "id": "background",
- "type": "background",
- "paint": {
- "background-color": "#ffffff"
- }
- }, {
- "id": "buildings",
- "type": "fill",
- "source": "osm",
- "source-layer": "buildings",
- "filter": ["==", "$type", "Polygon"],
- "paint": {
- "fill-color": "#444443"
- }
- }
- ]
- };
- var map = new mapboxgl.Map({
- container: 'map',
- style: simple,
- zoom: 13,
- pitch:50,
- center: [119.30603, 26.03024]
- });
Add Comment
Please, Sign In to add comment