|
@@ -106,7 +106,6 @@ L.Hash.prototype.update = function() {
|
|
|
* Map component handles the whole map and associated widgets.
|
|
|
*/
|
|
|
class MyMap extends Component {
|
|
|
- static map;
|
|
|
constructor() {
|
|
|
super();
|
|
|
|
|
@@ -473,7 +472,13 @@ class MyMap extends Component {
|
|
|
|
|
|
window.mapUUID = this.props.uuid;
|
|
|
|
|
|
- MyMap.map = this.elem.leafletElement;
|
|
|
+ //静态只读map
|
|
|
+ Object.defineProperty(MyMap, 'map', {
|
|
|
+ value: this.elem.leafletElement,
|
|
|
+ writable: false,
|
|
|
+ enumerable: false,
|
|
|
+ configurable: false
|
|
|
+ });
|
|
|
|
|
|
// URL hash for map
|
|
|
this._mapHash = new L.Hash(this.elem.leafletElement);
|