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.
expose more style properties for annotations #1734
Can we expose exactly the set of properties that are in the style spec?
In C++, sure. We shouldn't do this all the way up in iOS because it would just crap up the delegate protocol, since that's where we configure these things (on a per-annotation basis).
@incanus I suppose I mean "stroke" in the Photoshop sense — an external casing around the filled line. Right now this requires duplicating the line and widening it, unless I'm missing something.
What about different colors or each shape point? Than there might be the possibility to make color gradients between each point to have something like heat maps for graphs.
Reopening: the runtime styling API (#837, #5626) has landed on iOS and macOS, but something directly compatible with the existing annotation API would be a boon for developers who have to use that API for various reasons.
Per #6172 (comment), support for additional annotation properties is mainly a matter of plumbing through style properties that can be applied to the symbol, line, or fill layer that the annotation adds to the style. We want to avoid a proliferation of methods on MGLMapViewDelegate; at the same time, MapKit’s MKOverlayRenderer class hierarchy may be a poor fit for our annotation implementation. Instead, we could introduce the idea of a prototype style layer: a single method on MGLMapViewDelegate, -mapView:prototypeStyleLayerForAnnotation: that returns an MGLStyleLayer object. The SDK would extract the underlying mbgl::style::Layer object and use it in mbgl::LineAnnotationImpl::updateStyle().
Activity
friedbunny commentedon Jun 16, 2015
"Line/fill image" could also be useful for specifying symbols, like arrows. CartoCSS supported this via
marker-type: arrow.Line stroke would also be nice to have.
jfirebaugh commentedon Jun 16, 2015
Can we expose exactly the set of properties that are in the style spec?
incanus commentedon Jul 1, 2015
In C++, sure. We shouldn't do this all the way up in iOS because it would just crap up the delegate protocol, since that's where we configure these things (on a per-annotation basis).
incanus commentedon Jul 2, 2015
BTW, this is in there for polylines already. For polygons, see #1737 for why we can't do this right now.
refs #1734: preparations for exposing more annotation style properties
friedbunny commentedon Jul 2, 2015
@incanus I suppose I mean "stroke" in the Photoshop sense — an external casing around the filled line. Right now this requires duplicating the line and widening it, unless I'm missing something.
incanus commentedon Jul 6, 2015
De-prioritizing this in light of #1839, which solves the immediate problem at hand.
webventil commentedon Aug 20, 2015
What about different colors or each shape point? Than there might be the possibility to make color gradients between each point to have something like heat maps for graphs.
incanus commentedon Aug 20, 2015
@webventil Interesting idea, but not yet supported in the renderer, let alone exposed. Mind opening a new ticket for the feature so we can track?
webventil commentedon Aug 21, 2015
I created a new issue for it (#2142).
2 remaining items
ljbade commentedon Oct 28, 2015
This ticket is superseeded by #837 which will allow the full range of style properties.
incanus commentedon Nov 4, 2015
@jfirebaugh Should we close this in favor of #837 then?
1ec5 commentedon Aug 26, 2016
Reopening: the runtime styling API (#837, #5626) has landed on iOS and macOS, but something directly compatible with the existing annotation API would be a boon for developers who have to use that API for various reasons.
Per #6172 (comment), support for additional annotation properties is mainly a matter of plumbing through style properties that can be applied to the symbol, line, or fill layer that the annotation adds to the style. We want to avoid a proliferation of methods on MGLMapViewDelegate; at the same time, MapKit’s MKOverlayRenderer class hierarchy may be a poor fit for our annotation implementation. Instead, we could introduce the idea of a prototype style layer: a single method on MGLMapViewDelegate,
-mapView:prototypeStyleLayerForAnnotation:that returns an MGLStyleLayer object. The SDK would extract the underlyingmbgl::style::Layerobject and use it inmbgl::LineAnnotationImpl::updateStyle().jfirebaugh commentedon Sep 27, 2016
Re-closing; I feel strongly that we should focus our limited resources on the runtime styling API.