osmdroid

How do you implement OverlayItem to be draggable? (Using ItemizedIconOverlays if possible)

柔情痞子 提交于 2019-12-13 02:09:51
问题 I have POIs showing up on the map, using OverlayItem and ItemizedIconOverlay (an ItemizedIconOverlay list of OverlayItems). I want to be able to drag these markers around and place them different locations on a map. How would you do this on on osmdroid? I am using OSMDroid 3.0.5 回答1: Check out this SO question Unable to implement onTouchEvent (Drag & Drop) with Osmdroid You can also check Osmdroid issue 225 where they talk about this. 来源: https://stackoverflow.com/questions/7407338/how-do-you

How to handle long press on a map, using OSMDroid / OSMBonusPack in Android?

限于喜欢 提交于 2019-12-12 15:13:37
问题 I am trying to create a simple application with maps, on Android. I am using OSMDroid's MapView to render the basic OpenStreet Map mapview. I have a custom MapActivity that implements the MapEventsReceiver interface (from OSMBonusPack). In my activity's onCreate() , I create a MapEventsOverlay , I add it to the mapView . The problem is, longPressHelper() and singleTapUpHelper() are never called. See my code below. public abstract class CustomMap extends BaseActivity implements

Using Offline of Open Street Map in my app

时光毁灭记忆、已成空白 提交于 2019-12-12 05:17:34
问题 I already import open street map Library(link of GitHub) in my application and it works completely true but i want to have this map in offline mode(when internet connection is not available user can work with the map). I saw this but i couldn't get it. please help me , thank you for your time. 回答1: First of all, welcome to osmdroid. There's a wealth of documentation on the wiki at https://github.com/osmdroid/osmdroid/wiki In fact, there's a whole article on offline maps at https://github.com

I get an error on getInstance() method even though i followed the osmdroid documentation correctly

浪尽此生 提交于 2019-12-12 04:57:23
问题 getInstance() shows an error after following the doc correctly. but i need to know what version to be used here: dependencies { compile 'org.osmdroid:osmdroid-android:(INSERT_VERSION_HERE):release@aar' } LINK https://github.com/osmdroid/osmdroid/wiki/How-to-use-the-osmdroid-library#main-activity Any help? 回答1: Use the latest version in a way specified at the documentation here : compile 'org.osmdroid:osmdroid-android:5.6.5' You can always check which version is the latest on github. 来源: https

Is it possible to get speed limit data using OSMBonusPack?

自闭症网瘾萝莉.ら 提交于 2019-12-12 04:48:23
问题 I've been trying to develop speed limit application & have tried many different approaches to get done . I have used Overpass APIs & it did good but it did not have speed limit information for few of locations around Europe & also installed Velociraptor which uses OSM map & HERE Maps APIs still they failed to get data . Here is screenshot of Velociraptor app : Screenshot Image . Yesterday I came across osmbonuspack & it looks promising as it allows us to choose from 3 best routing services

OpenStreetMap POIs with Nominatim - error

∥☆過路亽.° 提交于 2019-12-12 04:31:54
问题 I'm using this tutorial: https://github.com/MKergall/osmbonuspack/wiki/Tutorial_2 I set this Code in my Project: NominatimPOIProvider poiProvider = new NominatimPOIProvider(); ArrayList<POI> pois = poiProvider.getPOICloseTo(startPoint, "cinema", 50, 0.1); But I get some Errors: NominatimPOIProvider (String) in NominatimPOIProvider cannot be applied to () and java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/Request$Builder; at org.osmdroid.bonuspack.utils.HttpConnection.doGet

Compass not working properly in osmdroid

非 Y 不嫁゛ 提交于 2019-12-12 04:28:21
问题 I am using a plasio turbo x to test my osmdroid sample. I am also testing using a moto g. In moto g the map rotation which is according to the compass head up is working fine, but in plasio one the compass starts to spin and map also spins, they don't get stable. You can see the logcat here(it is very big, stackoverflow not letting me add it here). Following is my class in which I have used compass: public class MainActivity extends FragmentActivity implements LocationListener,

OSMdroid MapView Reads SDcard state if mounted before load of MapView

∥☆過路亽.° 提交于 2019-12-11 17:54:40
问题 I see the load messages when loading OSMdroid mapview that if not loading tiles online, then automatically it shifts to look at sdcard mount state and its folder ../osmdroid 05-15 16:26:47.462: I/org.osmdroid.views.MapView(4366): Using tile source: org.osmdroid.tileprovider.tilesource.XYTileSource@427c0bb8 05-15 16:26:47.472: I/org.osmdroid.tileprovider.modules.MapTileFileStorageProviderBase(4366): sdcard state: mounted 05-15 16:26:47.472: I/org.osmdroid.tileprovider.modules

Add Legenda to OSMdroid mapview with Pop-Up

时光毁灭记忆、已成空白 提交于 2019-12-11 15:06:25
问题 I have a map with custom tiles and I need to add an optional legenda to the site explaining the color code of the custom map. I have now tried to achieve what I want by triggering a toast showing an image via a menu. But now I learnt that toast is only displaying 3.5 seconds max, but I would need something that stays overlayed onto the map until it's being tapped onto. Thus also does not disappear as the map in the background is being moved. EDIT: Here is my attempt to use an pop-up. But once

Android - How to improve osmdroid offline map performance in term of reponse time

旧时模样 提交于 2019-12-11 14:38:23
问题 Now, I'm using my offline map osmdroid MapQuest (.zip file). However, the delay action time is not very good. Like: Map View Initialiation Time, Action Zoom Time ... Are there some solution to improve its performance? (like unzip .zip file or something else?) Thanks. 回答1: You stand a lot better chance with something like the GEMF format that is explicitly designed for the job at hand rather than ZIP. For big files it's way better. It is what I recommend for my users. 来源: https://stackoverflow