Skip to content

Commit 47e667d

Browse files
[fix]mapbox经纬网加id review by songym
1 parent 083533a commit 47e667d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mapboxgl/overlay/GraticuleLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const defaultOptions = {
8484
};
8585
export class GraticuleLayer {
8686
constructor(options) {
87-
this.id = options.layerID ? options.layerID : CommonUtil.createUniqueID('graticuleLayer_');
87+
this.id = options && options.layerID ? options.layerID : CommonUtil.createUniqueID('graticuleLayer_');
8888
this.sourceId = this.id;
8989
this.canvasId = this.id;
9090
this.options = options;

0 commit comments

Comments
 (0)