Remove Google Maps links from maps overview
This commit is contained in:
+3
-9
@@ -36,15 +36,9 @@ export default class extends Controller {
|
|||||||
for (let item of this.markersValue) {
|
for (let item of this.markersValue) {
|
||||||
const position = L.latLng(item.lat, item.lng)
|
const position = L.latLng(item.lat, item.lng)
|
||||||
const marker = L.marker(position)
|
const marker = L.marker(position)
|
||||||
if (item.externalLink) {
|
const popupContent = '<div data-rte-content=""><strong>' + item.name + '</strong><br>' + item.teaser +
|
||||||
marker.on('click', () => {
|
'<br><a href="' + item.uri + '">zu den Details</a></div>'
|
||||||
window.open(item.externalLink, '_blank')
|
marker.bindPopup(popupContent)
|
||||||
})
|
|
||||||
} else {
|
|
||||||
const popupContent = '<div data-rte-content=""><strong>' + item.name + '</strong><br>' + item.teaser +
|
|
||||||
'<br><a href="' + item.uri + '">zu den Details</a></div>'
|
|
||||||
marker.bindPopup(popupContent)
|
|
||||||
}
|
|
||||||
marker.addTo(this.map)
|
marker.addTo(this.map)
|
||||||
bounds.extend(position)
|
bounds.extend(position)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user