Skip to content

LocationLayerPlugin custom annotation/marker.  #178

Closed

Description

@DejanRistic

Is it possible with this plugin to set the user location background/foreground to a specific drawable without relying on style?

We currently do this with the now deprecated setForegroundDrawable and setBackgroundDrawable methods on MyLocationViewSettings. The use case is pretty simple, for authenticated users we use their profile image as part of their location view. But it looks like with this new plugin there isn't a way to set these without just passing a full style. We currently wait on the profile image to load, then we turn it into a drawable and apply it as the foreground. I don't think there is a way to create a style programmatically and apply a drawable to it dynamically.

Maybe exposing the addBackgroundLayer and addForegroundLayer methods? I'm just curious if there is a different solution since the MyLocationViewSettings is marked deprecated but i don't see an equivalent for those yet.

Activity

  1. tobrun commented on Nov 21, 2017

    @tobrun
    Member

    Thank you for the report @DejanRistic, due to our setup underneath we prefer only exposing the style setter. This bulk setter reflects the limitiations with our setup the best. While it's technically feasible to expose individual setters, it's not ideal. Note that style concept doesn't work as expected, it's on the backlog for 0.3.0 to be fixed:

    redo apply style so the plugin calls into Layer.setProperties, should fix #87.

  2. added
    location-layer-plugin
    on Nov 21, 2017
  3. nikiairdates commented on Dec 7, 2017

    @nikiairdates

    Thanks for notice that this issue is really important and the change have to happen soon.

  4. cammace commented on Dec 22, 2017

    @cammace

    This issue seems to be a duplicate of #183 unless I'm missing something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    location-layer-plugin

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions