Skip to content
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.

BitmapRenderer isn't working? #131

Open
AAverin opened this issue Nov 26, 2014 · 2 comments
Open

BitmapRenderer isn't working? #131

AAverin opened this issue Nov 26, 2014 · 2 comments
Labels

Comments

@AAverin
Copy link

AAverin commented Nov 26, 2014

I'm playing around with MapScaleBar class here: https://github.com/opensciencemap/vtm/blob/master/vtm-android/src/org/oscim/android/MapScaleBar.java

I copied it to my project and probably went through every line of code already, but can't seem to figure out why nothing is displaying on the screen.
Striping all code and leaving only plain bitmap filled with red color also shows nothing, so I suspect MapScaleBar itself isn't a problem, but BitmapRenderer might be.
I didn't find BitmapRenderer being used anywhere else in the library, so probably it wasn't checked.

As soon as VectorTileRednerer is working, I suspect that BitmapBucket is ok, but something isn't right in BitmapRenderer. I'll keep digging myself, but maybe you already aware of the issue?

@hjanetzek hjanetzek added the bug label Nov 26, 2014
@hjanetzek
Copy link
Member

yea, sorry - I saw the problem before and forgot to mark it.. I'll have a look.

Though the MapScaleBar is more or less a test-case for a platform independent HUD using BitmapRenderer. If you only want a scale-bar overlay for android it would probably make more sense to implement it as an android View.

@AAverin
Copy link
Author

AAverin commented Nov 26, 2014

I thought to make it as a map element to be able to access map zoom values and position to reflect the scaling properly.
I managed to get it displaying once - I guess you override 'render' method and forgot to add GL initizalization and other stuff. But that worked only once for me and then scaling disappeared again.

Even though it might be doable using generic android View, such rendering example can help out building more elements.
I know I'll need a cool-looking Location marker that will be able to reflect location accuracy, for example, and it would be good to have a plain layer that is just able to render what I draw using Canvas on a Bitmap.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants