Giter Site home page Giter Site logo

Comments (19)

dawidhyzy avatar dawidhyzy commented on June 26, 2024

bump

from osmdroid.

xserxses avatar xserxses commented on June 26, 2024

+1

from osmdroid.

michalkachel avatar michalkachel commented on June 26, 2024

+1

from osmdroid.

renepeinl avatar renepeinl commented on June 26, 2024

+1

from osmdroid.

devemux86 avatar devemux86 commented on June 26, 2024

It's worth mentioning that the tile providers have also to publish tiles at higher resolutions / tile sizes in order to be usable at high dpi devices.
e.g. Mapbox provides 'retina' raster tiles for use.
Or else if we try to scale the tile images at the map view, then they can become blurry.

Emux
Cruiser - Atlas

from osmdroid.

renepeinl avatar renepeinl commented on June 26, 2024

Don't you think it is better they would be blurry than being unreadable due to small font size?
You could provide it as an option that can be turned on and off so that the user or developer can decide what's better for him.

from osmdroid.

ziem avatar ziem commented on June 26, 2024

I agree with renepeinl.

from osmdroid.

legraphista avatar legraphista commented on June 26, 2024

There is an easy workaround for this issue:

final float scale = getBaseContext().getResources().getDisplayMetrics().density;
final int newScale = (int) (256 * scale);
String[] OSMSource = new String[2];
OSMSource[0] = "http://a.tile.openstreetmap.org/";
OSMSource[1] = "http://b.tile.openstreetmap.org/";  
XYTileSource MapSource = new XYTileSource(
        "OSM",
        null,
        1,
        18,
        newScale,
        ".png",
        OSMSource
);
map.setTileSource(MapSource);

Hope it helps!

from osmdroid.

ToninoTarsi avatar ToninoTarsi commented on June 26, 2024

The above workaround works and solve big DPI problem but when I try to add an PathOverlay the line is not showing.

from osmdroid.

ziem avatar ziem commented on June 26, 2024

Try to disable hardware acceleration in manifest.

from osmdroid.

Positronic-Brain avatar Positronic-Brain commented on June 26, 2024

It might be being drawn somewhere else in the map. I used to experience a similar issue with MyLocationNewOverlay and this workaround, but then I realized the Overlay was being drawn - it was just that it was being drawn somewhere in Antarctica. I documented this in Issue #68 "User location not rendered correctly when using non-standard size tile source"

from osmdroid.

GaMsh avatar GaMsh commented on June 26, 2024

+1

from osmdroid.

kurtzmarc avatar kurtzmarc commented on June 26, 2024

Please take a look at #81 where we have a potential solution ready for testing.

from osmdroid.

kurtzmarc avatar kurtzmarc commented on June 26, 2024

I have merged the fix_dpi_scaling branch. Call mMapView.setTilesScaledToDpi(true) to turn on tile scaling. Report all issues to #81.

from osmdroid.

trofimchyk avatar trofimchyk commented on June 26, 2024

Hi!
mMapView.setTilesScaledToDpi(true) solved problem with tiles. But what about map markers? They are still small.

from osmdroid.

neilboyd avatar neilboyd commented on June 26, 2024

@trofimchyk please create a new issue for markers

from osmdroid.

trofimchyk avatar trofimchyk commented on June 26, 2024

@neilboyd There is no bug with markers. I forgot to make my icons for each dpi. Sorry, my mistake :)

from osmdroid.

rpeinl avatar rpeinl commented on June 26, 2024

Thanks a lot for the fix. I just verified that
mMapView.setTilesScaledToDpi(true)
did work for me as well. Version 4.3 also fixed the issue that setCenter did not center around the coordinates, but made the given coordinates the left upper corner.
Why is there now binary distribution of osmdroid 5.x any more? I just found a sources.jar, but not the "real" jar with compiled classes.

from osmdroid.

spyhunter99 avatar spyhunter99 commented on June 26, 2024

osmdroid >=5.0 is an android archive. I'm not sure why there's such as push back on this. It's the android way to include resource files along with java code. You can still download the AAR on maven central.

from osmdroid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.