|
|
@ -14,7 +14,7 @@ |
|
|
/// limitations under the License.
|
|
|
/// limitations under the License.
|
|
|
///
|
|
|
///
|
|
|
|
|
|
|
|
|
import L, { LatLngExpression, LatLngTuple, LeafletMouseEvent } from 'leaflet'; |
|
|
import L, { LatLngExpression, LeafletMouseEvent } from 'leaflet'; |
|
|
import { createTooltip, parseWithTranslation, safeExecute } from './maps-utils'; |
|
|
import { createTooltip, parseWithTranslation, safeExecute } from './maps-utils'; |
|
|
import { FormattedData, PolygonSettings } from './map-models'; |
|
|
import { FormattedData, PolygonSettings } from './map-models'; |
|
|
|
|
|
|
|
|
@ -61,7 +61,7 @@ export class Polygon { |
|
|
this.tooltip.setContent(parseWithTranslation.parseTemplate(pattern, data, true)); |
|
|
this.tooltip.setContent(parseWithTranslation.parseTemplate(pattern, data, true)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
updatePolygon(data: LatLngTuple[], dataSources: FormattedData[], settings: PolygonSettings) { |
|
|
updatePolygon(data: FormattedData, dataSources: FormattedData[], settings: PolygonSettings) { |
|
|
this.data = data; |
|
|
this.data = data; |
|
|
this.dataSources = dataSources; |
|
|
this.dataSources = dataSources; |
|
|
this.leafletPoly.setLatLngs(data[this.settings.polygonKeyName]); |
|
|
this.leafletPoly.setLatLngs(data[this.settings.polygonKeyName]); |
|
|
|