Skip to content

Commit

Permalink
*** Version 2.6.8 ***
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrinegateau committed Oct 21, 2021
1 parent 030a9f4 commit e0c1bc6
Show file tree
Hide file tree
Showing 26 changed files with 82 additions and 42 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@types/leaflet": "^1.5.19",
"@types/leaflet.markercluster": "^1.4.3",
"boosted": "^4.6.0",
"iotmapmanager": "^2.6.7",
"iotmapmanager": "^2.6.8",
"leaflet": "^1.6.0",
"leaflet.markercluster": "^1.4.1",
"zone.js": "^0.11.3"
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/css/map.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/css/markers.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/css/popup.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/css/tabs.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/import_png.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iotmapmanager",
"version": "2.6.7",
"version": "2.6.8",
"description": "Manage markers, clusters, user marker or paths on IotMaps",
"main": "dist/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# IotMapManager V2.6.7
# IotMapManager V2.6.8

This library provides management of markers dedicated to projects using mapping.
## use
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/src/iot-map-area-manager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/src/iot-map-area.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/src/iot-map-cluster-manager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/src/iot-map-cluster.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/src/iot-map-common-svg.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name: IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/src/iot-map-config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/src/iot-map-icons.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/src/iot-map-manager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/src/iot-map-marker-manager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
21 changes: 13 additions & 8 deletions src/iotMapManager/src/iot-map-marker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down Expand Up @@ -51,11 +51,6 @@ export class IotMapMarker extends IotMapDisplay {
this.selected = selected
this.setIcon(getMarkerIcon(this.data, this.config, selected))
this.setZIndexOffset((selected) ? 100 : 0)

// if (this.selected && this.data.popup !== undefined) {
// // move map if marker is too close to the edge
// this.shiftMap()
// }
}

public getData (): IotMarker {
Expand Down Expand Up @@ -122,18 +117,24 @@ export class IotMapMarker extends IotMapDisplay {
const northEastPos = this.map.getIotMap().latLngToLayerPoint(mapBounds.getNorthEast())
const southWestPos = this.map.getIotMap().latLngToLayerPoint(mapBounds.getSouthWest())

let needToshift = false

// top
if (eltPos.y - northEastPos.y < 200) {
const shift = 200 - (eltPos.y - northEastPos.y)
northEastPos.y -= shift
southWestPos.y -= shift

needToshift = true
}

// left
if (eltPos.x - southWestPos.x < 150) {
const shift = 150 - (eltPos.x - southWestPos.x)
northEastPos.x -= shift
southWestPos.x -= shift

needToshift = true
}

// bottom - no need to shift
Expand All @@ -142,10 +143,14 @@ export class IotMapMarker extends IotMapDisplay {
const shift = 150 - (northEastPos.x - eltPos.x)
northEastPos.x += shift
southWestPos.x += shift

needToshift = true
}

const newMapBounds = L.latLngBounds(this.map.getIotMap().layerPointToLatLng(southWestPos), this.map.getIotMap().layerPointToLatLng(northEastPos))
this.map.getIotMap().flyToBounds(newMapBounds)
if (needToshift) {
const newMapBounds = L.latLngBounds(this.map.getIotMap().layerPointToLatLng(southWestPos), this.map.getIotMap().layerPointToLatLng(northEastPos))
this.map.getIotMap().flyToBounds(newMapBounds)
}
}
}
}
2 changes: 1 addition & 1 deletion src/iotMapManager/src/iot-map-path-manager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/src/iot-map-path.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/src/iot-map-types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/src/iot-map-user-marker-manager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
2 changes: 1 addition & 1 deletion src/iotMapManager/src/iot-map-user-marker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Software Name : IotMapManager
* Version: 2.6.7
* Version: 2.6.8
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
Expand Down
51 changes: 43 additions & 8 deletions src/map/map.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,48 @@ export class MapComponent implements AfterViewInit {
},
inner: {
label: 'H'
},
popup: {
title: 'S1',
body: 'body de s1'
}
},
{
id: 's1bis',
location: {
lat: 44.895,
lng: 4.870
},
template: 'square',
status: 'test', // 'warning',
tab: {
content: '<span class="iotmap-icons-vehicle"></span>'
},
inner: {
label: 'H'
},
popup: {
title: 'S1bis',
body: 'body de s1bis'
}
},
{
id: 's1ter',
location: {
lat: 44.895,
lng: 4.870
},
template: 'square',
status: 'test', // 'warning',
tab: {
content: '<span class="iotmap-icons-vehicle"></span>'
},
inner: {
label: 'H'
},
popup: {
title: 'S1ter',
body: 'body de s1ter'
}
},
{
Expand Down Expand Up @@ -630,7 +672,7 @@ export class MapComponent implements AfterViewInit {
}
},
map: {
externalClustering: true,
externalClustering: false,
layerControl: true,
exclusiveLayers: false
},
Expand Down Expand Up @@ -665,13 +707,6 @@ export class MapComponent implements AfterViewInit {
console.log('map bounds changed: [' + coord.getNorthEast().lat + ', ' + coord.getNorthEast().lng + '] / [' + coord.getSouthWest().lat + ', ' + coord.getSouthWest().lng + ']')
}

this.commonIotMap.onEltClick = (id) => {
console.log('click on ' + id + ' !')

setTimeout(() => {
this.iotMapMarkerManager.updateMarker(id, { popup: { title: 'Update', body: 'Popup mise à jour' } })
}, 3000)
}
this.commonIotMap.init('iotMap')
this.iotMapMarkerManager.addMarkers(this.markersList)
this.iotMapClusterManager.addClusters(this.clustersList)
Expand Down

0 comments on commit e0c1bc6

Please sign in to comment.