angular-openlayers-directive icon indicating copy to clipboard operation
angular-openlayers-directive copied to clipboard

Getting the URL of a WMS (getGetFeatureInfoUrl)

Open marcelobisi opened this issue 9 years ago • 1 comments

Hi. any idea how getGetFeatureInfoUrl use within a marker ? tks

marcelobisi avatar Feb 22 '16 15:02 marcelobisi

That is a specific geoserver feature, that have format something like in pure javascript :

var location = new ol.source.TileWMS({url: 'http://myurl', params: {'LAYERS: 'table'}, serverType: 'geoserver'});
var viewResolution = view.getResolution();
var getFeature = location.getGetFeatureInfoUrl(
      evt.coordinate, viewResolution, 'EPSG:3857',
      {'INFO_FORMAT': 'application/json'});

I could get the data evt.coordinate from singleclick, but dont have any idea how to use getResolution() and getGetFeatureInfoUrl() function to work

zuhrasofyan avatar Aug 29 '16 07:08 zuhrasofyan