Skip to content

Commit

Permalink
Fix/hack geocoder error
Browse files Browse the repository at this point in the history
  • Loading branch information
frodrigo committed May 26, 2024
1 parent 4aae2e6 commit 3114c5f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion web/src/pages/map/map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
<script lang="ts">
import MaplibreGeocoder from '@maplibre/maplibre-gl-geocoder'
import {
GeolocateControl,
LngLatBounds,
Map,
Marker,
NavigationControl,
ScaleControl,
GeolocateControl,
} from 'maplibre-gl'
import Vue from 'vue'
Expand Down Expand Up @@ -78,6 +80,10 @@ export default Vue.extend({
const geocoderApi = {
forwardGeocode: async (config) => {
// Hack to add missing properties for [email protected]
this.map.LngLatBounds = LngLatBounds
this.map.Marker = Marker
const features = []
try {
const request = `https://nominatim.openstreetmap.org/search?q=${config.query}&format=geojson&polygon_geojson=1&addressdetails=1`
Expand Down

0 comments on commit 3114c5f

Please sign in to comment.