osmdroid

Streetnames openstreetmaps more readable on Android

孤者浪人 提交于 2019-12-01 13:19:45
问题 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

Add marker to OSMdroid 5.5 map

强颜欢笑 提交于 2019-12-01 11:15:13
I want to add markers to my OSMdroid map. I am using OSMdroid version 5.5 . The official tutorial suggests the following code: //your items ArrayList<OverlayItem> items = new ArrayList<OverlayItem>(); items.add(new OverlayItem("Title", "Description", new GeoPoint(0.0d,0.0d))); // Lat/Lon decimal degrees //the overlay ItemizedOverlayWithFocus<OverlayItem> mOverlay = new ItemizedOverlayWithFocus<OverlayItem>(items, new ItemizedIconOverlay.OnItemGestureListener<OverlayItem>() { @Override public boolean onItemSingleTapUp(final int index, final OverlayItem item) { //do something return true; }

Add marker to OSMdroid 5.5 map

馋奶兔 提交于 2019-12-01 08:21:09
问题 I want to add markers to my OSMdroid map. I am using OSMdroid version 5.5 . The official tutorial suggests the following code: //your items ArrayList<OverlayItem> items = new ArrayList<OverlayItem>(); items.add(new OverlayItem("Title", "Description", new GeoPoint(0.0d,0.0d))); // Lat/Lon decimal degrees //the overlay ItemizedOverlayWithFocus<OverlayItem> mOverlay = new ItemizedOverlayWithFocus<OverlayItem>(items, new ItemizedIconOverlay.OnItemGestureListener<OverlayItem>() { @Override public

How can download map in osmdroid?

岁酱吖の 提交于 2019-12-01 06:32:53
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. 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. Milad Faridnia First of all you need to download Mobile Atlas Creator . This link is for the latest version of MOBAC 1- In Mobile Atlas Creator select your area of interest. 2- Select your Map Source 3- Select Zoom

Osmdroid - change local map folder

霸气de小男生 提交于 2019-11-30 22:54:36
I am using offline version of osmdroid, maps are placed in sdcard/osmdroid. Do you know, how to change the file path? I have been searching through their code for handling ZIP files but I haven't found any solution. Anyone faced this issue before? Thx Here you can check out the code to build your own version of OSMdroid. Changing ZIP and local folder is totally possbile, had to do it myself a few months ago. Responsible for the Zips are this classes: org/osmdroid/tileprovider/modules/ZipFileArchive.java org/osmdroid/tileprovider/modules/MapTileFileArchiveProvider.java Gallery If you download

OSMdroid add custom icons to ItemizedOverlay

﹥>﹥吖頭↗ 提交于 2019-11-30 09:59:45
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); itemizedOverlay2 = new MyItemizedOverlay(drawable2, mapView); itemizedOverlay3 = new MyItemizedOverlay(drawable3

Osmdroid offline mode update tiles after zoom

送分小仙女□ 提交于 2019-11-30 09:28:40
问题 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

OSMDroid PathOverlay

自闭症网瘾萝莉.ら 提交于 2019-11-30 07:18:20
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! It will draw a series of straight lines for you on top of the map, so you need to know the latitude and longitude of all your road junctions (and everywhere they bend away from a straight

Android OSM droid - set Max Zoom level

前提是你 提交于 2019-11-30 05:17:35
问题 I am implementing App vith usage of osmdroid mapView. We have maps with max 16 zoom level, but Android allow us to have 18 zoom levels. Do you know how to set maximum zoom level 16 instead of default 18? Thanks Hmyzak 回答1: Update - we have added simple setMin/MaxZoomLevel() methods to MapView in the trunk. It should be included in 3.0.10. See https://code.google.com/p/osmdroid/issues/detail?id=418 for additional info. Original answer: Create your own TileSource class and use that. You can

No map shown in osmdroid

雨燕双飞 提交于 2019-11-29 17:07:20
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 .java file I made this onCreate method private MapView mMap; @Override protected void onCreate(Bundle