|
@ -32,7 +32,8 @@ export default class extends Controller { |
|
|
'info': L.divIcon({ html: iconHtml, className: 'svg-icon text-info', iconSize: [16, 16], iconAnchor: [8, 16], }), |
|
|
'info': L.divIcon({ html: iconHtml, className: 'svg-icon text-info', iconSize: [16, 16], iconAnchor: [8, 16], }), |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
var geojsons, _this = this, map = L.map(this.element); |
|
|
|
|
|
|
|
|
var geojsons, _this = this, map = L.map(this.element.querySelector('#map')); |
|
|
|
|
|
this.mapInstance = map; |
|
|
|
|
|
|
|
|
// Commence par déclarer le fond de carte classique OSM par défaut
|
|
|
// Commence par déclarer le fond de carte classique OSM par défaut
|
|
|
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { |
|
|
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { |
|
@ -158,4 +159,15 @@ export default class extends Controller { |
|
|
// visibles
|
|
|
// visibles
|
|
|
map.fitBounds(taskLayer.getBounds()); |
|
|
map.fitBounds(taskLayer.getBounds()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
openInOsm() { |
|
|
|
|
|
const url = "https://www.openstreetmap.org/#map="+this.mapInstance.getZoom()+"/"+this.mapInstance.getCenter().lat+"/"+this.mapInstance.getCenter().lng; |
|
|
|
|
|
window.open(url, '_blank'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
openInPanoramax() { |
|
|
|
|
|
const url = "https://api.panoramax.xyz/#focus=map&map="+this.mapInstance.getZoom()+"/"+this.mapInstance.getCenter().lat+"/"+this.mapInstance.getCenter().lng; |
|
|
|
|
|
window.open(url, '_blank'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |