I use MapsForge 0.8 to display maps in my Android app. When using online tiles (which are just bitmaps and not vector data that can be adjusted in the runtime renderer), the map is really tiny on my Hi-resolution device and I can't read anything.

I would like to scale the map and I have tried the following:

mapView.getModel().displayModel.setDefaultUserScaleFactor(2.0f);

And:

mapView.getModel().displayModel.setUserScaleFactor(2.0f);

But it does not change anything.How to make it display the map bigger?

Update:

And I don't mean zooming in. I mean scaling the current zoom level to make it readable on high-resolution devices. Imagine the screenshot above on a small smartphone - it is tiny. I can't even read the street names.

2nd Update

The current answers below do NOT answer the question. This is about scaling Online tiles which are BITMAPS - and NOT how to influence rendering the vector data.

Great answer but not what I was looking for. See my update please.
– juergen dJan 17 '17 at 11:49

After your update got your point.....You need to scale the map UI elements so that it can be readable while persisting the zoom level.
– Pravin DivraniyaJan 17 '17 at 13:10

Check this link . I think this is similar to your question and in enhancement. Also check this.
– Pravin DivraniyaJan 17 '17 at 13:46

When using the renderer - vector graphics that get rendered at runtime - then yes. This already works for maps I downloaded. But the online tiles - which are just bitmaps - are already as is. All I could do is scale the image tiles somehow. But not like you describe. Thanks anyway.
– juergen dJan 17 '17 at 20:02

1

Yes...I totally agree with you...This is not a simple thing and would require so much customization in existing library....I just found this method in library so though it will help you in R&D. hope you will find a way to do it.
– Pravin DivraniyaJan 19 '17 at 7:23

There are a lot of ways of 'scaling' in mapsforge.As it is shown in this example, you can try to .zoom() the mapViewPosition instead of scaling the Model directly.If that is what you're asking for, try the following:

When using the renderer - vector graphics that get rendered at runtime - then yes. This already works for maps I downloaded. But the online tiles - which are just bitmaps - are already as is. All I could do is scale the image tiles somehow. But not like you describe. Thanks anyway.
– juergen dJan 17 '17 at 20:02

When using the renderer - vector graphics that get rendered at runtime - then yes. This already works for maps I downloaded. But the online tiles - which are just bitmaps - are already as is. All I could do is scale the image tiles somehow. But not like you describe. Thanks anyway.
– juergen dJan 17 '17 at 20:01

I don't mean zooming in. I mean scaling the current zoom level to make
it readable on high-resolution devices.

This is just not a distinction that exists in reality.

What you're describing is basically a texture, so I will use the word 'texture' instead of 'bitmap'.

At any zoom level, a set amount of screen pixels get mapped to a particular real world area in meters. This is your map scale or "zoom level" - the thing in the corner of any map. For example, 10 pixels = 1km.

Your image has an area which it represents, say a 1km square in London, and a size in pixels, say 40x40.

When the software tries to draw your texture to the screen it needs to map the pixels of your texture to screen pixels. In our example, our zoom level is 10 pixels = 1km, so a 1km square on screen is 10x10 pixels. Our texture also represents a 1km square but has more pixels (40x40).

Because these values are different, we need to somehow make our texture smaller. This is called texture filtering, and can also be done to make a texture larger.

The reason your texture looks bad on a high-resolution device is down to how the filtering is behaving. You may be able to achieve acceptable results if you use some kind of mipmap, reducing the level of detail as the user zooms out. This would be analogous to how Google maps removes labels as you get further out.

You will never be able to see a high level of detail from a high zoom level. That's why the answer saying "just zoom in!" are technically right.

If you simply increase the area the texture applies to without equally scaling (zooming) the map, your texture and underlying map will get out of sync and that's definitely not desirable.