Renaming of getGetFeatureInfoUrl and getGetLegendGraphicUrl

This commit is contained in:
Simon Seyock
2019-09-18 10:38:34 +02:00
parent 10326d0e81
commit b2885e86fb
9 changed files with 30 additions and 26 deletions

View File

@@ -29,7 +29,7 @@ const map = new Map({
map.on('singleclick', function(evt) {
document.getElementById('info').innerHTML = '';
const viewResolution = /** @type {number} */ (view.getResolution());
const url = wmsSource.getGetFeatureInfoUrl(
const url = wmsSource.getFeatureInfoUrl(
evt.coordinate, viewResolution, 'EPSG:3857',
{'INFO_FORMAT': 'text/html'});
if (url) {

View File

@@ -29,7 +29,7 @@ const map = new Map({
map.on('singleclick', function(evt) {
document.getElementById('info').innerHTML = '';
const viewResolution = /** @type {number} */ (view.getResolution());
const url = wmsSource.getGetFeatureInfoUrl(
const url = wmsSource.getFeatureInfoUrl(
evt.coordinate, viewResolution, 'EPSG:3857',
{'INFO_FORMAT': 'text/html'});
if (url) {

View File

@@ -4,11 +4,11 @@ title: WMS GetLegendGraphic
shortdesc: Example of a WMS GetLegendGraphic.
docs: >
WMS supports the [getLegendGraphic request](https://docs.geoserver.org/latest/en/user/services/wms/get_legend_graphic/index.html).
This example demonstrates the use of the `getGetLegendGraphicUrl` method.
This example demonstrates the use of the `getLegendUrl` method.
As a legend can be responsive to the scale it is updated on every change of the resolution.
tags: "GetLegendGraphic, getGetLegendGraphicURL, WMS"
tags: "GetLegendGraphic, getLegendUrl, WMS"
---
<div id="map" class="map"></div>
Legend:

View File

@@ -12,7 +12,7 @@ const wmsSource = new ImageWMS({
});
const updateLegend = function(resolution) {
const graphicUrl = wmsSource.getGetLegendGraphicUrl(resolution);
const graphicUrl = wmsSource.getLegendUrl(resolution);
const img = document.getElementById('legend');
img.src = graphicUrl;
};