osmdroid

OSMDroid zip - how to add custom maps?

蓝咒 提交于 2019-12-02 01:13:35
I am using OSMdroid's MapView and I am planning to add custom maps. I cannot convert them via MOBAC, I need to find out the format preferrences and characteristics. Have you seem some information about it? I have been looking for it for weeks but no luck. Do you mean the tile format? I belive this is a good reference. 来源: https://stackoverflow.com/questions/9094076/osmdroid-zip-how-to-add-custom-maps

Adding ItemizedOverlay to my mapview

≡放荡痞女 提交于 2019-12-02 00:39:48
i am develpoing a map application with osm. i want to create some marker on my mapview. im using the folowwing code: this.mMyLocationOverlay = new ItemizedOverlay<OverlayItem>(this, items, new ItemizedOverlay.OnItemGestureListener<OverlayItem>() { @Override public boolean onItemSingleTapUp(final int index, final OverlayItem item) { Toast.makeText( SampleWithMinimapItemizedoverlay.this, "Item '" + item.mTitle + "' (index=" + index + ") got single tapped up", Toast.LENGTH_LONG).show(); return true; // We 'handled' this event. } @Override public boolean onItemLongPress(final int index, final

User-Agent for osmdroid

吃可爱长大的小学妹 提交于 2019-12-01 18:35:35
I tried to put the user agent (cf https://github.com/osmdroid/osmdroid/wiki/Important-notes-on-using-osmdroid-in-your-app ), but when I put the line OpenStreetMapTileProviderConstants.setUserAgentValue(BuildConfig.APPLICATION_ID); Android studio is telling me that setUserAgentValue is depreciated. What can I do to solve that ? For now when I run the app I have a grid with no map. Thanks you very much in advance ! spy It's deprecated because it's been moved to another location which consolidates all configuration settings for osmdroid. Try the following Configuration.getInstance()

OSMDroid: Adding a marker when user taps on map

非 Y 不嫁゛ 提交于 2019-12-01 18:30:47
I want to display a marker on map where user taps on map. Also this should not infect double tap for zooming and/or moving Mapview . I am using osmdroid-android-4.0.jar Look at OSMBonusPack MapEventsOverlay/MapEventsReceiver: http://code.google.com/p/osmbonuspack/source/browse/trunk/OSMBonusPack/src/org/osmdroid/bonuspack/overlays/MapEventsOverlay.java You create a MapEventsOverlay, you add it to the maps overlay, and you pass it a MapEventsReceiver in which you implement your own singleTapUpHelper code. 来源: https://stackoverflow.com/questions/20946715/osmdroid-adding-a-marker-when-user-taps

OSMDroid: Adding a marker when user taps on map

夙愿已清 提交于 2019-12-01 17:37:19
问题 I want to display a marker on map where user taps on map. Also this should not infect double tap for zooming and/or moving Mapview . I am using osmdroid-android-4.0.jar 回答1: Look at OSMBonusPack MapEventsOverlay/MapEventsReceiver: http://code.google.com/p/osmbonuspack/source/browse/trunk/OSMBonusPack/src/org/osmdroid/bonuspack/overlays/MapEventsOverlay.java You create a MapEventsOverlay, you add it to the maps overlay, and you pass it a MapEventsReceiver in which you implement your own

adding Overlay to a MapView in osmdroid

删除回忆录丶 提交于 2019-12-01 17:09:00
I am writing a simple android application using osmdroid that work online an offline untill now I am able to display the map (online and offline), and I want to add overlay (markers) on the map, I had search for simple example for using overlay in osmdroid and I tried some of them but they didn't work, so I want any example for adding overlay or marcker using osmdroid Martin Pearman Look at the ItemizedIconOverlay class. There's a few examples on the internet if you search, an example has been posted on Stack Overflow here: Adding Overylay to OSMDROID public class mapcode extends Activity {

adding Overlay to a MapView in osmdroid

核能气质少年 提交于 2019-12-01 17:05:35
问题 I am writing a simple android application using osmdroid that work online an offline untill now I am able to display the map (online and offline), and I want to add overlay (markers) on the map, I had search for simple example for using overlay in osmdroid and I tried some of them but they didn't work, so I want any example for adding overlay or marcker using osmdroid 回答1: Look at the ItemizedIconOverlay class. There's a few examples on the internet if you search, an example has been posted

Streetnames openstreetmaps more readable on Android

一个人想着一个人 提交于 2019-12-01 14:46:58
I've build an Android APP with offline map data using Openstreetmaps and OsmDroid. On a device with MDPI 320x480 pixels the map looks OK, but on a device with a HDPI screen with 480x800 pixels the street names are small and a little bit harder to read them. My map data till zoom level 18, the maximum I could download and use with Mapnik tile source, is loaded as a zip-file from the SD-Card. My local maps are from a defined region of Brussels (Belgium). A screenshot of an MDPI device with 320x480 pixels: A screenshot of an HDPI device with 480x800 pixels: If you see these views in the app on

OSMDroid how to make external provider work together with local?

情到浓时终转凉″ 提交于 2019-12-01 14:30:47
So I've finally gotten osmdroid working with a local directory but I'd like to load tiles from Mapnik when they are missing locally. I'm not sure what I'm missing. My implementation is as follows: private MapView mapView = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.osm_map); mapView = (MapView) findViewById(R.id.mapview); mapView.setBuiltInZoomControls(true); mapView.setMultiTouchControls(true); MapController mapController = mapView.getController(); mapController.setZoom(5); GeoPoint point2 = new GeoPoint

OSMDroid how to make external provider work together with local?

∥☆過路亽.° 提交于 2019-12-01 13:24:50
问题 So I've finally gotten osmdroid working with a local directory but I'd like to load tiles from Mapnik when they are missing locally. I'm not sure what I'm missing. My implementation is as follows: private MapView mapView = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.osm_map); mapView = (MapView) findViewById(R.id.mapview); mapView.setBuiltInZoomControls(true); mapView.setMultiTouchControls(true); MapController