Comments (19)
bump
from osmdroid.
+1
from osmdroid.
+1
from osmdroid.
+1
from osmdroid.
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.
from osmdroid.
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.
I agree with renepeinl.
from osmdroid.
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.
The above workaround works and solve big DPI problem but when I try to add an PathOverlay the line is not showing.
from osmdroid.
Try to disable hardware acceleration in manifest.
from osmdroid.
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.
+1
from osmdroid.
Please take a look at #81 where we have a potential solution ready for testing.
from osmdroid.
I have merged the fix_dpi_scaling branch. Call mMapView.setTilesScaledToDpi(true)
to turn on tile scaling. Report all issues to #81.
from osmdroid.
Hi!
mMapView.setTilesScaledToDpi(true)
solved problem with tiles. But what about map markers? They are still small.
from osmdroid.
@trofimchyk please create a new issue for markers
from osmdroid.
@neilboyd There is no bug with markers. I forgot to make my icons for each dpi. Sorry, my mistake :)
from osmdroid.
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.
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)
- Create mapSnapShot app crashed
- osmdroid-mapsforge: Unable to add marker and draw poly line on the map HOT 2
- How to support GCJ-02 HOT 7
- Cannot navigate to a fragment after clicking on a marker HOT 1
- .
- Custom ZoomIn and ZoomOut buttons. How to implement custom zoomOut/zoomIn buttons? HOT 2
- Map animating to previous state after a couple of seconds with Jetpack Compose HOT 1
- java.lang.NullPointerException: Attempt to invoke interface method 'boolean org.osmdroid.views.overlay.OverlayManager.add(java.lang.Object)' on a null object reference HOT 2
- IP tracker and ad in wiki HOT 3
- open street map don't display
- TileSourceFactory US aviation maps don't load any more
- Writing and reading data from the real time database for Osmdroid HOT 1
- delete markers
- Animating the movement of a cursor along a polyline with two colors codes: the completed part and the part to do ? HOT 1
- displaying the route and deleting the marker zi database HOT 1
- BingMapTileSource always crash HOT 2
- Some issues when initializing mapsforge
- Zoom changes ignored if performed while an animation is underway
- Issue: GroundOverlay bad placement when invalidate map
- GroundOverlay - Draw White Image on Android 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osmdroid.