Skip to content
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

Map scale bar #84

Closed
devemux86 opened this issue Jul 20, 2016 · 10 comments
Closed

Map scale bar #84

devemux86 opened this issue Jul 20, 2016 · 10 comments
Milestone

Comments

@devemux86
Copy link
Collaborator

devemux86 commented Jul 20, 2016

VTM map scale bar is Mapsforge's old implementation.
It's not dpi aware and works only on Android.

A new implementation should work on all platforms with various unit adapters, like in Mapsforge.

Is having it as layer the best approach or a regular platform view / panel?

@andreynovikov
Copy link

Don't think making it a regular view is a good idea. Instead it should be implemented in vector and be drawn by GL like position indicator.

@devemux86
Copy link
Collaborator Author

Why is that?
External map components have usually nothing to do with internal map rendering.

@devemux86
Copy link
Collaborator Author

BTW painting a bitmap scale bar in GL is not vector rendering.

@andreynovikov
Copy link

I know, so I propose to make it true vector.

@Longri
Copy link

Longri commented Jul 20, 2016

but I think that map scale bar is no external map components

@devemux86
Copy link
Collaborator Author

devemux86 commented Jul 20, 2016

Map scale bar is actually a component placed on top of a map, e.g. like a location button.
It listens for map changes, it doesn't participate necessarily in map rendering or rotation / tilt.

If you have a true vector map scale bar, please submit a PR.
A true vector one should work on any platform from the start.

Currently the only working available is Mapsforge's and it involves bitmap rendering.

@devemux86
Copy link
Collaborator Author

devemux86 commented Jul 21, 2016

I integrated Mapsforge's scale bar (Android) in #88.
DPI aware, multiple units, smooth rendering, etc.

I deliberately kept separately the core scale bar classes from the bitmap renderer.
There is the new MapScaleBarLayer for that, see API in action at SimpleMapActivity.

For the rest platforms I need first to enrich VTM graphics API, see #92.

@andreynovikov
Copy link

As for me, looks a little bit over-scaled. Otherwise perfect.

@devemux86
Copy link
Collaborator Author

devemux86 commented Jul 22, 2016

And others in Mapsforge have found it small.
We can never satisfy all, I'll make the scale factor variable.

@devemux86 devemux86 added this to the 0.6.0 milestone Jul 26, 2016
@devemux86
Copy link
Collaborator Author

devemux86 commented Jul 28, 2016

After the needed Graphics API refactoring in #92.
The map scale bar moved in vtm module, being now a multi-platform implementation.

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

No branches or pull requests

3 participants