Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

expose more style properties for annotations #1734

Closed
incanus opened this issue Jun 16, 2015 · 14 comments
Closed

expose more style properties for annotations #1734

incanus opened this issue Jun 16, 2015 · 14 comments
Labels
feature iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS MapKit parity For feature parity with MapKit on iOS or macOS runtime styling Tangram parity For feature parity with Tangram ES

Comments

@incanus
Copy link
Contributor

incanus commented Jun 16, 2015

Shape annotations need to support more features in the exposed API.

Definite:

  • line join
  • line cap
  • line dash

Maybe:

  • line/fill image
  • translate (for putting lines next to roads? e.g. multiple transit line colors)
  • antialias off?

@friedbunny

@friedbunny
Copy link
Contributor

"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
Copy link
Contributor

Can we expose exactly the set of properties that are in the style spec?

@incanus
Copy link
Contributor Author

incanus commented Jul 1, 2015

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 incanus added this to the iOS Beta 3 milestone Jul 1, 2015
@incanus incanus self-assigned this Jul 1, 2015
@incanus
Copy link
Contributor Author

incanus commented Jul 2, 2015

Line stroke would also be nice to have.

BTW, this is in there for polylines already. For polygons, see #1737 for why we can't do this right now.

@friedbunny
Copy link
Contributor

@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
Copy link
Contributor Author

incanus commented Jul 6, 2015

De-prioritizing this in light of #1839, which solves the immediate problem at hand.

@webventil
Copy link

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
Copy link
Contributor Author

incanus commented 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
Copy link

I created a new issue for it (#2142).

@jfirebaugh
Copy link
Contributor

Updating title to reflect that this is not specific to shape annotations -- markers could also benefit from style properties like icon-size and icon-rotate.

@jfirebaugh jfirebaugh changed the title expose more shape style properties expose more style properties for annotations Oct 14, 2015
@ljbade
Copy link
Contributor

ljbade commented Oct 28, 2015

This ticket is superseeded by #837 which will allow the full range of style properties.

@incanus incanus added the P0 label Nov 4, 2015
@incanus
Copy link
Contributor Author

incanus commented Nov 4, 2015

@jfirebaugh Should we close this in favor of #837 then?

@1ec5 1ec5 added MapKit parity For feature parity with MapKit on iOS or macOS runtime styling labels Aug 26, 2016
@1ec5
Copy link
Contributor

1ec5 commented 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 underlying mbgl::style::Layer object and use it in mbgl::LineAnnotationImpl::updateStyle().

@jfirebaugh
Copy link
Contributor

Re-closing; I feel strongly that we should focus our limited resources on the runtime styling API.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS MapKit parity For feature parity with MapKit on iOS or macOS runtime styling Tangram parity For feature parity with Tangram ES
Projects
None yet
Development

No branches or pull requests

6 participants