Comments (3)
FYI I am currently having to add custom tile sources by using the built in ResourceProxy but without having to change the actual osmdroid source. It means I have to chose a built in resource string and override it, which I think is very messy:
final ITileSource sj_tileSource = new XYTileSource("Nautical Raster Norway", ResourceProxy.string.fiets_nl, 0, 17, 256, ".jpg",
new String[] {"http://..."});
TileSourceFactory.addTileSource(sj_tileSource);
final ITileSource no_tileSource = new XYTileSource("Maps Norway", ResourceProxy.string.base_nl, 0, 17, 256, ".jpg",
new String[] {"http://..."});
TileSourceFactory.addTileSource(no_tileSource);
final ITileSource topo_tileSource = new XYTileSource("Topo Raster Norway", ResourceProxy.string.roads_nl, 0, 17, 256, ".jpg",
new String[] {"http://..."});
TileSourceFactory.addTileSource(topo_tileSource);
And then in my res/strings/tile_sources.xml:
... Nautical Raster Norway Maps Norway Topo Raster Norway ... "from osmdroid.
It looks like the ResourceProxy strings actually determine what directory downloaded tiles are stored in within /sdcard/osmdroid/tiles. I agree, this should be adjustable for anyone bringing in a custom tile source
from osmdroid.
Correction, resource proxy "string" is not actually used for ITileSources. I just removed the reference to it in master and it will be gone in the next release. What determines the download folder? the "name" that is set for the map provider.
More over, I just added a few examples to both the wiki and the source code for USGS map sources. Fair warning, the example source doesn't use the standard slippy map format ZXY, but rather ZYX. See https://github.com/osmdroid/osmdroid/wiki/How-to-use-the-osmdroid-library#tile-providers-vs-tile-source
To reiterate, the ResourceProxy.string for map source is not used! Just pick one and go for it. Feel free to reopen if there are more questions or open a new ticket.
from osmdroid.
Related Issues (20)
- 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
- Map View throwing Error as Too many receivers, total of 1000, registered HOT 1
- CPU usage continually between 30 and 40% when on a closed network HOT 2
- Proposal for new location indicator (puck) HOT 1
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.