emplexed / gs-mvt

Geoserver WMS Extension for delivering Mapnik Vector Tiles
Apache License 2.0
62 stars 14 forks source link

JSON as format for Slippy Map Tiles Request #10

Open BMo-design opened 8 years ago

BMo-design commented 8 years ago

Hi,

thanks for this great plugin @stefan0722. I have a short question: Is it possible to add the ".json" format to the Slippy Map Tiles feature? That extension would help me a lot to use our geoserver in the same way like http://tile.openstreetmap.us/vectiles-buildings/{z}/{x}/{y}.json'.

Best regards Benedikt

emplexed commented 8 years ago

Hi,

First a question, with .json you would expect GeoJSON Output?

I think it would be possible but it is a bit more then just registering a new output mapping in the applicationContext.xml. The Slippy Map Tiles controller creates an WMS Request out of the Slippy Map URL and forwards the request to Geoservers WMS endpoint. As much as i know the WMS Endpoint dosn´t support GeoJSON out of the Box. So i quess a solution could be to create a Wrapper around the WFS GeoJSON Output Format which fits the WMS Output Format Interfaces.

BMo-design commented 8 years ago

Hi, thanks for the fast reply. Yes my first idea was to use geojson (e.g. http://tile.openstreetmap.us/vectiles-buildings/13/4390/2854.json).

Anyway, I figured out that your plugin supports binary pbf vector data. Do you have an example or a demo that shows how I can use the binary vector data of your project with frameworks like tangram or mapbox gl?

Mapbox typically add layers with: map.addSource('RPD_Parks', { type: 'vector', url: 'mapbox://mapbox.3o7ubwm8' }); Do you have experience how I can replace that with a geoserver url?