You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Styling, as shapes in the same layer get the same styling.
However, performance is a concern here. Adding 10,000 similarly-styled shapes means 10,000 more style layers, which means 10,000 more GL draw calls. 🚨 NOT TENABLE 🚨
If we introduced the concept of a shape group for identically-styled shapes, a consumer could add 10,000 blue polylines to the map and incur 1 style layer and 1 draw call.
We would still support mapView.addAnnotation(polyline) like MapKit, with the understanding that it's more efficient to add many shapes with the groups API instead.
If we are liking the looks of this, we should mock out what this Cocoa API looks like exactly, including styling configuration, how it interacts (if at all) with eventual layer reordering, and removal/other management.
Sounds like the performance gains would be worth the divergence/complexity. Having a built-in construct for managing groups of annotations is also a friendly addition in general.
Would this also carry over into marker annotations? If so, we should be careful not to make this layer grouping too easily confused with our eventual support for clustering.
I think it might be worth waiting until data driven styling is implemented before worrying about this. Data driven styling will change the way this problem looks. I don't think the first implementation of shapes needs to be able to support thousands or even hundreds of shapes.
This was my first inclination in talking with @kkaefer as well since adding this API can be classified as "works now, gets faster / more performant later", much like the R-tree stuff in #1694.
Activity
incanus commentedon Jun 10, 2015
If we are liking the looks of this, we should mock out what this Cocoa API looks like exactly, including styling configuration, how it interacts (if at all) with eventual layer reordering, and removal/other management.
1ec5 commentedon Jun 10, 2015
Sure, why not?
incanus commentedon Jun 10, 2015
Only because it's unlike Apple's API and may raise questions as to when or when not to use it. The answer to that is:
friedbunny commentedon Jun 10, 2015
Sounds like the performance gains would be worth the divergence/complexity. Having a built-in construct for managing groups of annotations is also a friendly addition in general.
Would this also carry over into marker annotations? If so, we should be careful not to make this layer grouping too easily confused with our eventual support for clustering.
mb12 commentedon Jun 10, 2015
This optimization is not needed for lines. LineBucket in gl-native is actually a MultiLine.
ansis commentedon Jun 11, 2015
I think it might be worth waiting until data driven styling is implemented before worrying about this. Data driven styling will change the way this problem looks. I don't think the first implementation of shapes needs to be able to support thousands or even hundreds of shapes.
jfirebaugh commentedon Jun 11, 2015
+1 to what @ansis said. With data driven styles we will have more optimization options for transparently combining multiple layers into one draw call.
incanus commentedon Jun 11, 2015
This was my first inclination in talking with @kkaefer as well since adding this API can be classified as "works now, gets faster / more performant later", much like the R-tree stuff in #1694.
Let's put this on the b3 milestone then.
jfirebaugh commentedon Oct 29, 2015
Working towards #837 instead.