osmdroid

How can download map in osmdroid?

孤街醉人 提交于 2019-12-19 08:53:24
问题 All I have used osmdroid and i want to download map zip files from android app and than create offline map. Any one have more knowledge about osmdroid and offline map and navigation. 回答1: The easisest way is to download MOBAC, then run it and mark out an area you want, store the tiles in Osmdroid.zip format. When that's done, drop the zip file into the osmdroid folder on your device. 回答2: First of all you need to download Mobile Atlas Creator. This link is for the latest version of MOBAC 1-

OSMdroid add custom icons to ItemizedOverlay

不问归期 提交于 2019-12-18 13:32:34
问题 I am using ItemizedIconOverlay class and I'm currently displaying events on the map along with the user's position with the same default icon. How do I change the icon set for each overlay? Is there something similar to the google.maps example: drawable = getResources().getDrawable(R.drawable.marker); drawable3 = getResources().getDrawable(R.drawable.disruption); drawable2 = getResources().getDrawable(R.drawable.marker_me); itemizedOverlay = new MyItemizedOverlay(drawable, mapView);

Pinch to zoom with Osmdroid

纵然是瞬间 提交于 2019-12-18 13:08:17
问题 I've written a mapping application which has two activities, one activity displays a Google Maps view, the other displays the equivalent view using osmdroid 3.0.5 jar. Until now I've been testing on emulators only and the functionality is completely identical in terms of area shown and overlay data. Now I have run the app on a real Gingerbread device, I notice that the Google Maps activity seems to support pinch to zoom, whilst the Osmdroid one doesn't. I haven't written any code specific to

Open Street Map working offline android

孤人 提交于 2019-12-17 22:51:46
问题 I am a newbie to Open Street Map. I made some research and found that we can download and store the map into a folder. But i didn't find any tutorial or sample that provides offline Open Street Map. Can someone provide a step by step tutorial, a guide to implement offline open street map please. I am following this example http://android-coding.blogspot.com/2012/06/example-of-implementing-openstreetmap.html but now i want to make it available when there is no connection. 回答1: Like in the

Custom information bubble on tap for overlay items using osmdroid

一世执手 提交于 2019-12-17 20:09:07
问题 I'm using osmdroid on my new Android project (since I want to be able to use offline maps) but I encounter many difficulties to customize the look 'n feel of the information bubble assigned to an overlay item. Right now, I'm using an ItemizedOverlayWithFocus overlay to display my items; looking at its code, I noticed the whole thing was drawn in the onDrawFinished method so I tried to create my own custom overlay to override this method but this is pretty difficult to get a result. What I

No map displayed when using bounding box; setScrollableAreaLimitDouble

人走茶凉 提交于 2019-12-14 03:58:21
问题 Been wanting to display just one section of the world map. Made mbtiles for it as well. But I also want the user to not be able to move outside a limited area. Below is the code I ran using Bounding Box on the world map but nothing is displayed on the screen, both on an emulator and an actual android device. Please help. IMapController mapController = mapView.getController(); BoundingBox bounds = mapView.getBoundingBox(); mapView.setTileSource(TileSourceFactory.MAPNIK); mapView

optimize android code snippet - better design approach?

怎甘沉沦 提交于 2019-12-13 12:51:07
问题 I've this snippet of code which I would like to optimize it. I've a method which is been called regularly by the OSMdroid library to load tons of maptiles. This method directly invokes the filestream and load the bitmap directly and will return the bitmap once loaded on the main UI thread. Although I've managed to run in the background using AsyncTask with parallel executor. Sometimes with plenty number of overlays (itemized) in the mapview this snippet of code runs slower as GC_FO_ALLOC is

Osmdroid and marshmallow

蓝咒 提交于 2019-12-13 11:24:31
问题 I'm using osmdroid 5.2 lib in android 6.0 . I'm asking WRITE_EXTERNAL_STORAGE and ACCESS_COARSE / FINE_LOCATION permissions on realtime . But map not working: Unable to decode stream: java.io.FileNotFoundException: /storage/emulated/0/osmdroid/tiles/Mapnik/14/10079/5358.png.tile: open failed: EACCES (Permission denied) Map works only from the second run application. Can anyone help me? Thanks in advance. 回答1: You have to ask for the permissions before the mapview is loaded and displayed.

Why does CacheManager receives code 202 for MapQuest?

空扰寡人 提交于 2019-12-13 05:54:16
问题 I notice that it seems impossible to use the CacheManager with the tiles source MapQuest, it receives http code 202 and doesn't download the tiles. Do you know why? 回答1: Just ran across on this on the osm mailing list MapQuest is moving to a 100% cloud solution - the new infrastructure dictates that all tile access will require a key. Details on how to get keys, SDKs and general migration information is below: On Monday, July 11, 2016, our direct tile access to MapQuest legacy maps will be

MapView doesn't invalidate onProgressUpdated of Async Task

淺唱寂寞╮ 提交于 2019-12-13 02:57:34
问题 I'm using OSMdroid Mapview and using AsyncTask class to get some data, and I create overlays and try to redraw every time I get a msg. Unfortunately I'm able to get data from a client and I'm able to create overlays to in onProgressUpdated , I've even called invalidate(); But nothing seems to happen. Not sure what is the problem? Here's my AsyncTask : public class TaskManager extends AsyncTask<Void, GeoPoint, Void>{ ..... public TaskManager(Master master,MapView mapview) { //Construtor }