Guest User

Untitled

a guest
Apr 23rd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. var simple = {
  2. "version": 8,
  3. "sources": {
  4. "osm": {
  5. "type": "vector",
  6. "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}"]
  7. //"tiles": ["http://TegolaServerHost:8082/maps/zoning/{z}/{x}/{y}.vector.pbf"]
  8. }
  9. },
  10. "layers": [
  11. {
  12. "id": "background",
  13. "type": "background",
  14. "paint": {
  15. "background-color": "#ffffff"
  16. }
  17. }, {
  18. "id": "buildings",
  19. "type": "fill",
  20. "source": "osm",
  21. "source-layer": "buildings",
  22. "filter": ["==", "$type", "Polygon"],
  23. "paint": {
  24. "fill-color": "#444443"
  25. }
  26. }
  27. ]
  28. };
  29.  
  30. var map = new mapboxgl.Map({
  31. container: 'map',
  32. style: simple,
  33. zoom: 13,
  34. pitch:50,
  35. center: [119.30603, 26.03024]
  36. });
Add Comment
Please, Sign In to add comment