GeoServer added UTFGrid output for vector features starting from the 2.9-beta version. It is implemented as a WMS service output format.
After installing GeoServer 2.9-beta, adding a datastore with a PostGIS connection and publishing a layer that contains vector features, I can click the WMS UTFGrid
entry from the available formats list on the Layer Preview page in the admin UI and indeed get a UTFGrid representation of my data displayed in the browser.
How can I now integrate this as a UTFGrid layer into OpenLayers 3? The only resource that I could find on this topic is this official example. However, it uses ol.source.TileUTFGrid as the layer's source and passes a URL which ends in .json
. GeoServer, however, publishes a WMS
URL which expects further parameters such as request
, bbox
etc.
Simply passing the URL generated by the Layer Preview page gives Uncaught SyntaxError: Unexpected token :
in the browser's console.
What would be the correct way to include GeoServer's UTFGrid output as a layer?
No comments:
Post a Comment