- attivita
- gestione degli script sul server - creato websocket per interagire con gli script del server.
This commit is contained in:
16
src/utils/leaflet-extensions.ts
Normal file
16
src/utils/leaflet-extensions.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import L from 'leaflet';
|
||||
|
||||
// Estendi il prototipo del marker
|
||||
L.Marker.prototype._animateZoom = function (opt: { zoom: number; center: L.LatLng }) {
|
||||
// Assicurati che _map esista
|
||||
if (!this._map) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Calcola la nuova posizione del marker
|
||||
const pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round();
|
||||
|
||||
// Imposta la posizione del marker
|
||||
this._setPos(pos);
|
||||
};
|
||||
Reference in New Issue
Block a user