osmdroid

Osmdroid offline mode update tiles after zoom

心不动则不痛 提交于 2019-11-29 15:56:36
I'm developing an Android app that uses Osmdroid to display the maps in offline mode. I have an issue when I want to zoom in or out by pinching on the map or using the build-in zoomcontrols. When I zoom in the map tiles are not always correctly rendered and when I zoom out the sometimes there are some gray tiles in the map, sometimes everything is rendered OK. It's not related on the location displayed on the map. My map tiles are stored in an osmdroid zip-file with the Mapnik source in the folder /mnt/sdcard/osmdroid. I'm using osmdroid-3.0.7. So, any help is welcome. See my code below (my

Using osmdroid without getting access to external storage

荒凉一梦 提交于 2019-11-29 13:53:23
In my app I am using osmdroid for working with map. Map tiles are downloaded and kept in /storage/osmdroid . The application requires permissions WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE . If I deny access to storage, map is not shown. Is any way to show map without access to phone memory? https://github.com/osmdroid/osmdroid/wiki/FAQ Fresh off the wiki press. Yes you can change the location to application private storage, in which case it should work just fine. Pro tip: set these before loading any map views. OpenStreetMapTileProviderConstants.setCachePath(...)

Limit Scrolling on offline maps, in Android

本秂侑毒 提交于 2019-11-29 10:01:24
问题 I got these piece of codes or patches from osmdroid, and I decided to ask for your help guys because i don't have the enough knowledge to combine these codes to come up with on a solution on my problem, Scrolling limit on an offline map. I searched across the web, and modified tutorials. Honestly I tried to modify these codes but i have not found any progress. Basically I have an offline map from mapnik, and a few overlays. I don't know where to properly place these set of codes. Your ideas

OSMDroid PathOverlay

泪湿孤枕 提交于 2019-11-29 09:27:38
问题 Today I'm looking forward of how to use PathOverlay in OSMDroid. I can't find any explanation of how it works. I need to create a suggested route (not like navigation system), just a stroke begining at a point, do a "circuit" and then return to the starting point. Just like this (drawn in google maps): I'm here to ask what's the correct way to do this, specifying a custom path, doing the turns I want. Thanks! 回答1: It will draw a series of straight lines for you on top of the map, so you need

Adding Overlay to OSMDROID

∥☆過路亽.° 提交于 2019-11-28 19:43:48
I have been struggling with this long time. I am trying to add Overlay on my map. I am using the open source OSMdroid. but all I get by the example is a straight red line from one corner to another. My target is to add some icon where my geoPoint is set. here is my code: package osmdemo.demo; import java.util.List; import microsoft.mappoint.TileSystem; import org.osmdroid.tileprovider.tilesource.TileSourceFactory; import org.osmdroid.util.GeoPoint; import org.osmdroid.views.MapController; import org.osmdroid.views.MapView; import org.osmdroid.views.MapView.Projection; import org.osmdroid.views

No map shown in osmdroid

亡梦爱人 提交于 2019-11-28 11:06:09
问题 I tried to make an osmdroid project using Android Studio but any map is shown. I have just a blanck grid. In my xml file I put the folowing code : <?xml version="1.0" encoding="utf-8" ?> <LinearLayout xmlns:android="..." android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <org.osmdroid.views.MapView android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" tilesource="Mapnik" /> </LinearLayout> in my

Using osmdroid without getting access to external storage

断了今生、忘了曾经 提交于 2019-11-28 08:11:31
问题 In my app I am using osmdroid for working with map. Map tiles are downloaded and kept in /storage/osmdroid . The application requires permissions WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE . If I deny access to storage, map is not shown. Is any way to show map without access to phone memory? 回答1: https://github.com/osmdroid/osmdroid/wiki/FAQ Fresh off the wiki press. Yes you can change the location to application private storage, in which case it should work just fine. Pro tip: set

Osmdroid and Mapnik tile provider no longer working

南笙酒味 提交于 2019-11-28 00:14:29
I have a developed, deployed and previously successful application which uses Osmdroid to load tiles from the default tile provider which is Mapnik mMapView.setTileSource(TileSourceFactory.DEFAULT_TILE_SOURCE); or mMapView.setTileSource(TileSourceFactory.MAPNIK); Until recently (maybe since today) the tiles on real devices (a phone and a tablet) do not load anymore. I am using osmdroid version 3.0.5. If I try the latest 4.0 version in a small sample project on an emulator, I see '403 forbidden responses' in the logcat when trying to download maptiles. If I switch the tile source to mMapView

RoadManager for osmdroid error

穿精又带淫゛_ 提交于 2019-11-27 23:10:53
I am following a tutorial here https://code.google.com/p/osmbonuspack/wiki/Tutorial_1 but I have encountered an error that it doesn't show the correct route correctly. It just shows a straight line from Point A to Point B. What I want to achieve is to show the correct route from these points. I'm guessing the error is that it doesn't recognize any nodes to go through. A similar question has been also asked and I am assuming I have the same problem if I haven't explained my question well. Similar question can be found here: OSMDroid Routing problems when following a tutorial Here is a part of

Osmdroid and Mapnik tile provider no longer working

一世执手 提交于 2019-11-26 21:39:23
问题 I have a developed, deployed and previously successful application which uses Osmdroid to load tiles from the default tile provider which is Mapnik mMapView.setTileSource(TileSourceFactory.DEFAULT_TILE_SOURCE); or mMapView.setTileSource(TileSourceFactory.MAPNIK); Until recently (maybe since today) the tiles on real devices (a phone and a tablet) do not load anymore. I am using osmdroid version 3.0.5. If I try the latest 4.0 version in a small sample project on an emulator, I see '403