fix hang on layer change
This commit is contained in:
parent
010a9aad21
commit
1a7ccdb45d
@ -1,5 +1,6 @@
|
|||||||
### Change Log for Node-RED Worldmap
|
### Change Log for Node-RED Worldmap
|
||||||
|
|
||||||
|
- v2.37.3 - Fix hang on layer change
|
||||||
- v2.37.2 - If custom layer is only layer then show it automatically. Issue #230
|
- v2.37.2 - If custom layer is only layer then show it automatically. Issue #230
|
||||||
- v2.37.1 - Warn (and drop) messages that are missing a payload. Issue #229
|
- v2.37.1 - Warn (and drop) messages that are missing a payload. Issue #229
|
||||||
- v2.37.0 - Allow fly instead of fit option when using command to move view window. (PR #225)
|
- v2.37.0 - Allow fly instead of fit option when using command to move view window. (PR #225)
|
||||||
|
@ -11,6 +11,7 @@ map web page for plotting "things" on.
|
|||||||
|
|
||||||
### Updates
|
### Updates
|
||||||
|
|
||||||
|
- v2.37.3 - Fix hang on layer change
|
||||||
- v2.37.2 - If custom layer is only layer then show it automatically. Issue #230
|
- v2.37.2 - If custom layer is only layer then show it automatically. Issue #230
|
||||||
- v2.37.1 - Warn (and drop) messages that are missing a payload. Issue #229
|
- v2.37.1 - Warn (and drop) messages that are missing a payload. Issue #229
|
||||||
- v2.37.0 - Allow fly instead of fit option when using command to move view window. (PR #225)
|
- v2.37.0 - Allow fly instead of fit option when using command to move view window. (PR #225)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-contrib-web-worldmap",
|
"name": "node-red-contrib-web-worldmap",
|
||||||
"version": "2.37.2",
|
"version": "2.37.3",
|
||||||
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@turf/bezier-spline": "~6.5.0",
|
"@turf/bezier-spline": "~6.5.0",
|
||||||
|
@ -389,7 +389,7 @@ var edgeAware = function() {
|
|||||||
|
|
||||||
var viewBounds = L.latLngBounds(map.options.crs.pointToLatLng(L.point(pSW.x - (pCenter.x - pSW.x ), pSW.y - (pCenter.y - pSW.y )), map.getZoom()) , map.options.crs.pointToLatLng(L.point(pNE.x + (pNE.x - pCenter.x) , pNE.y + (pNE.y - pCenter.y) ), map.getZoom()) );
|
var viewBounds = L.latLngBounds(map.options.crs.pointToLatLng(L.point(pSW.x - (pCenter.x - pSW.x ), pSW.y - (pCenter.y - pSW.y )), map.getZoom()) , map.options.crs.pointToLatLng(L.point(pNE.x + (pNE.x - pCenter.x) , pNE.y + (pNE.y - pCenter.y) ), map.getZoom()) );
|
||||||
for (var id in markers) {
|
for (var id in markers) {
|
||||||
if (allData[id].hasOwnProperty("SIDC")) {
|
if (allData[id] && allData[id].hasOwnProperty("SIDC")) {
|
||||||
markerLatLng = markers[id].getLatLng();
|
markerLatLng = markers[id].getLatLng();
|
||||||
if ( viewBounds.contains(markerLatLng) && !mapBounds.contains(markerLatLng) ) {
|
if ( viewBounds.contains(markerLatLng) && !mapBounds.contains(markerLatLng) ) {
|
||||||
var k = (markerLatLng.lat - mapBoundsCenter.lat) / (markerLatLng.lng - mapBoundsCenter.lng);
|
var k = (markerLatLng.lat - mapBoundsCenter.lat) / (markerLatLng.lng - mapBoundsCenter.lng);
|
||||||
|
Loading…
Reference in New Issue
Block a user