-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UIMarker Can only be added to the map #2162
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #2162 +/- ##
==========================================
+ Coverage 83.75% 83.78% +0.03%
==========================================
Files 169 169
Lines 18748 18781 +33
==========================================
+ Hits 15702 15736 +34
+ Misses 3046 3045 -1 ☔ View full report in Codecov by Sentry. |
src/geometry/Geometry.js
Outdated
@@ -92,6 +92,7 @@ class Geometry extends JSONAble(Eventable(Handlerable(Class))) { | |||
if (!isNil(id)) { | |||
this.setId(id); | |||
} | |||
this.isGeometry = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isGeometry和下面的isUI,isLayer都没有用到,应该删除掉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
故意加的,方便后续快速判断一个对象是图层,是图形,还是hi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个设计不是很好,感觉更应该用 instanceof 来判断
src/layer/OverlayLayer.js
Outdated
@@ -258,6 +263,11 @@ class OverlayLayer extends Layer { | |||
} | |||
} | |||
} | |||
// geojson to Geometry may be null | |||
if (!geo) { | |||
console.error(geo, 'is null'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
提示也应该写成:
console.error(geo, ' is not invalid geometry to add to layer(' + this.getId() + ') at index:' + i);
fix #2161