New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marker not taking into account the visibility and alpha display parameters #1185

Closed
monsieurtanuki opened this Issue Nov 3, 2018 · 2 comments

Comments

Projects
None yet
1 participant
@monsieurtanuki
Collaborator

monsieurtanuki commented Nov 3, 2018

Issue Type

  • Bug

Description and/or steps/code to reproduce the problem

  • create a Marker
  • use marker.setVisibility(false);
  • unexpectedly, the marker is still visible
  • for the record, there's no actual "visibility" member in Marker, just an alpha parameter (whose value is set to 0 for invisibility)

The issue comes from a recent optimization using the canvas.drawBitmap(icon,...) syntax - the previous syntax was icon.draw(canvas).
The new syntax doesn't take into account the icon's alpha parameter, and needs a Paint parameter with the corresponding alpha.
I'm about to PR.

Version of osmdroid the issue relates to:

6.0.3 (not released yet)

monsieurtanuki added a commit that referenced this issue Nov 3, 2018

bug/#1185 - Marker correct display with alpha parameter
Impacted class:
* `Marker`: new `Paint` member, used in the alpha display; edited method `drawAt` in order to take into account the alpha display parameter in the new `BitmapDrawable` display possibility; unrelated comments refactoring
@monsieurtanuki

This comment has been minimized.

Collaborator

monsieurtanuki commented Nov 3, 2018

PR'ed in #1186

monsieurtanuki added a commit that referenced this issue Nov 3, 2018

Merge pull request #1186 from osmdroid/bug/#1185
bug/#1185 - Marker correct display with alpha parameter
@monsieurtanuki

This comment has been minimized.

Collaborator

monsieurtanuki commented Nov 3, 2018

#1186 merged

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