Skip to content

Commit

Permalink
fix typo: ol wms source has method getGetFeatureInfoUrl, not `getFe…
Browse files Browse the repository at this point in the history
…atureInfoUrl` (#6)
  • Loading branch information
ghettovoice committed Nov 6, 2018
1 parent 4fd5675 commit 9db380a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/_coverpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<img class="logo" src="/_media/logo.svg" data-origin="_media/logo.svg" alt="VueLayers Logo" />

# VueLayers <small>v0.10.19</small>
# VueLayers <small>v0.10.20</small>

> Web map [Vue](https://vuejs.org/ "Vue Homepage") components with the power of [OpenLayers](https://openlayers.org/ "OpenLayers Homepage")
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vuelayers",
"fullname": "VueLayers",
"version": "0.10.19",
"version": "0.10.20",
"description": "Web map Vue components with the power of OpenLayers",
"author": "Vladimir Vershinin <[email protected]>",
"main": "lib/index.js",
Expand Down
5 changes: 3 additions & 2 deletions src/mixin/wms-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ const methods = {

resolution || (resolution = this.$view.getResolution())
projection || (projection = this.projection)
params = { ...this.allParams, ...params }

return this.$source.getFeatureInfoUrl(
return this.$source.getGetFeatureInfoUrl(
coordinate,
resolution,
projection,
{ ...this.cleanExtParams, ...params },
params,
)
},
}
Expand Down
28 changes: 16 additions & 12 deletions test/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div style="height: 100%">

<vl-map v-if="showMap" ref="map" @created="log('created', $event)" @mounted="log('mounted', $event)"
@destroyed="log('destroyed', $event)" @singleclick="clickCoord = $event.coordinate"
@destroyed="log('destroyed', $event)" @singleclick="clickCoord = $event.coordinate" @click="onMapClick"
data-projection="EPSG:4326">
<vl-view ref="view" ident="view" :center.sync="center" :zoom.sync="zoom" :rotation.sync="rotation">
<vl-overlay slot-scope="view" v-if="view.center" :position="view.center">
Expand Down Expand Up @@ -36,7 +36,7 @@

<vl-layer-group>
<vl-layer-tile id="wms">
<vl-source-wms url="https://ahocevar.com/geoserver/wms" layers="topp:states" :ext-params="{ TILED: true }" server-type="geoserver"/>
<vl-source-wms ref="wmsSource" url="https://ahocevar.com/geoserver/wms" layers="topp:states" :ext-params="{ TILED: true }" server-type="geoserver"/>
</vl-layer-tile>
<vl-layer-image id="wms-image">
<vl-source-image-wms url="https://ahocevar.com/geoserver/wms" layers="topp:states" server-type="geoserver"/>
Expand All @@ -50,16 +50,16 @@
</vl-layer-vector>
</vl-layer-group>

<vl-layer-tile>
<vl-source-arcgis-rest url="https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer"></vl-source-arcgis-rest>
</vl-layer-tile>
<!--<vl-layer-tile>-->
<!--<vl-source-arcgis-rest url="https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer"></vl-source-arcgis-rest>-->
<!--</vl-layer-tile>-->

<vl-layer-tile>
<vl-source-bing-maps api-key="qwerty" imagery-set="RoadOnDemand"></vl-source-bing-maps>
</vl-layer-tile>
<vl-layer-tile>
<vl-source-bingmaps api-key="qwerty" imagery-set="RoadOnDemand"></vl-source-bingmaps>
</vl-layer-tile>
<!--<vl-layer-tile>-->
<!--<vl-source-bing-maps api-key="qwerty" imagery-set="RoadOnDemand"></vl-source-bing-maps>-->
<!--</vl-layer-tile>-->
<!--<vl-layer-tile>-->
<!--<vl-source-bingmaps api-key="qwerty" imagery-set="RoadOnDemand"></vl-source-bingmaps>-->
<!--</vl-layer-tile>-->

<vl-interaction-select ident="select" @select="log('select', $event)" @unselect="log('unselect', $event)" :features.sync="selectedFeatures"/>

Expand All @@ -80,7 +80,7 @@
<script>
import { findPointOnSurface } from '@/ol-ext/geom'
import { loadingBBox } from '@/ol-ext/load-strategy'
import { addProj, createProj } from '@/ol-ext/proj'
import { addProj, createProj, pointFromLonLat } from '@/ol-ext/proj'
import { createStyle } from '@/ol-ext/style'
import { random, range } from 'lodash/fp'
import ScaleLine from 'ol/control/scaleline'
Expand Down Expand Up @@ -205,6 +205,10 @@
return [style]
}
},
onMapClick (evt) {
let coordinate = pointFromLonLat(evt.coordinate, 'EPSG:3857')
console.log(coordinate, this.$refs.wmsSource.getFeatureInfoUrl(coordinate))
},
}
let x = 1024 * 10000
Expand Down

0 comments on commit 9db380a

Please sign in to comment.