-
Notifications
You must be signed in to change notification settings - Fork 118
Description
I’m enjoying the ease of adding annotations to the map with the combination of the various AnnotationManager and Options classes, however I've run into a few problems that require the use of the Layer API. Seeing as the annotation plugin is a simpler, striped down version of this API, running into these types of issues is no surprise. I see a real benefit in the annotation plugin coexisting with the classic Layer API in a project, but this is made more difficult without being able to reference an AnnotationManger’s underlying Layer.
Example Problems:
-
SymbolOptions: .withIconSize() only accepts a static size as a float.
SymbolLayer: .setProperties() allows size to be defined as an Expression that scales the symbol based on the zoom level
(A different solution to this particular case is being tracked in Expression support #736) -
Dynamically inserting and removing layers with AnnotationManger is tricky to handle. AnnotationMangers support a constructor with a belowLayerId parameter which is difficult to use with automatically generated layer ids.
Adding extra properties to or rearranging the underlying layers would be trivial, but when using multiple AnnotationMangers (as per PR #941) it becomes cumbersome to keep track of which layers corresponds to which AnnotationManager.
Would it be possible to add a way to either:
a. Publicly reference the underlying Layer from an AnnotationManger
b. Set a custom Layer id from an AnnotationManger
c. Publicly reference the underlying layer’s automatically generated id from an AnnotationManger