osmdroid

How to cache/download google map v2 tile programmatically?

*爱你&永不变心* 提交于 2019-12-05 13:16:54
问题 How to cache/download google map v2 tile programmatically?, is it possible? Bcos according to this prntscr.com/3cyiqf its not possible but as I have seen this link TileProvider using local tiles I thought that if Android provides TileProvider class to load/use tile from the asset than it should be something available for caching/downloading a tile programmatically/run time My Actual requirement is : If user is connected with internet at that time he can able to download/cache a tile of

Osmdroid and Pinch

末鹿安然 提交于 2019-12-05 11:16:29
I'm developing an app using osmdroid (3.0.8). When I zoom using two fingers in and out, the zoom starts from the center of the map, not from the middle of the two fingers (using MapView.setMultiTouchControls(true); ). I've tried to implement the pinch ( pinch ) but with bad results. I've read other similar questions but without finding a good solution. Note: I MUST use OSM, and not other solutions Osmdroid 3.0.10 includes support for zooming at the location you pinched at. The samples also include a two-finger rotation gesture overlay if that is something you are interested in trying. 来源:

open street maps (osmdroid) shows grey tiles not map in PC

我的未来我决定 提交于 2019-12-05 08:31:11
I am using osmdroid to get open Street maps in my app. I had build my project with the needed jars (osmdroid) and added all needed permissions in the manifest. But when I try to debug my app in android emulator (adt eclipse) I am not able to see the map, only grey tiles. My project is working fine because if I debug in a smartphone I am able to see the map, the problem is only with the emulator. I have done some research but I only found information of google maps solutions but not open street maps (osmdroid). Does somebody know how to solve this issue? this is how I show the map in xml file

Detect if the OSM Mapview is still loading or not in android

≯℡__Kan透↙ 提交于 2019-12-05 08:15:58
I have included Open Street Maps in my android application. In the mapview, user should be able to capture the screen after the map is fully loaded. But currently user can capture the image even when the mapview is still loading. Can someone tell me how to detect when the mapview is fully loaded? Below is my code to load the mapview: public class MainActivity extends Activity { MapView mapView; MyLocationOverlay myLocationOverlay = null; ArrayList<OverlayItem> anotherOverlayItemArray; protected ItemizedOverlayWithBubble<ExtendedOverlayItem> itineraryMarkers; @Override protected void onCreate

osmdroid, Maps API v2, and fragments

痞子三分冷 提交于 2019-12-04 12:18:47
问题 Ok. You'd think this would be relatively simple, but nope. I am using Open street maps on my website, as the data is free to use, edit, and update - my project follows this mantra, and alongside googles API usage restrictions/saving data restrictions, google maps simply was not suitable for me.. at least on the web. Given this I thought i'd follow suit with my android app, and so I setup osmdroid utilizing open street maps data. I can have a nice map in my activity.. I also followed a

two finger or pinc zoom to mapview in osmdroid

我是研究僧i 提交于 2019-12-04 09:28:29
I need help I'm trying to zoom to mapview by getting users multi touch points (firstly 2 finger touch) I know there is setMultiTouchControls() function but this is not what I want to do. I tried to explain with a picture :) it was easier than writting; The black bold arrows show the fingers' movement directions. The same situation can be considered for opposite directions.(zoom in) Ismail Sahin Finally, In osmdroid 3.0.10 this feature had been implemented. mapView.setBuiltInZoomControls(true); mapView.setMultiTouchControls(true); 来源: https://stackoverflow.com/questions/15159544/two-finger-or

bounding the lat lng with osmdroid similar to LatLngBounds in google maps

孤街醉人 提交于 2019-12-04 05:41:54
问题 In my android application I'm using routing and clustering in osmdroid but I'm not able to bound the LatLng like we do in google maps with latlngbounds.builder... for example LatLng longlat = new LatLng(lat, log); LatLngBounds.Builder builder = new LatLngBounds.Builder(); builder.include(longlat); I want to do the same with osmdroid. 回答1: Google Maps LatLngBounds becomes BoundingBox in osmdroid (more or less). It has no direct equivalent to the LatLngBounds.including method (yes, could be a

get coordinates by clicking on map (openstreetmaps)

时光怂恿深爱的人放手 提交于 2019-12-04 04:08:09
How can we get the coordinates of a point by clicking on it in open street maps? tried: public void onClick(View v) { Projection proj = mapView.getProjection(); IGeoPoint p = proj.fromPixels(v.getX(), v.getY()); System.out.println("x: "+ v.getX() + " y: "+ v.getY()); } cheers, Thanasio Sandeep Use dispatchTouchEvent() method. It works because the MapActivity inherits the dispatchTouch event, not the OnTouchEvent from Activity Class. @Override public boolean dispatchTouchEvent(MotionEvent ev) { int actionType = ev.getAction(); switch (actionType) { case MotionEvent.ACTION_UP: Projection proj =

User-Agent for osmdroid

不问归期 提交于 2019-12-04 03:50:23
问题 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 ! 回答1: It's deprecated because it's been moved to another location which

OSMDroid Loading Custom Offline tiles From Assets Folder

て烟熏妆下的殇ゞ 提交于 2019-12-04 03:44:29
I was wondering whether it was possible to do such a thing. I know that one would need to modify some of the existing code to pull this off but I was wondering if anyone had any direction on where to look and how to do this. I am placing a few custom tiles on a specific area on the map as a replacement for OSM tiles providers but need them to be stored in the /assets/ folder. Any ideas? jzafrilla I use the nexts classes to do that. import java.io.InputStream; import org.osmdroid.ResourceProxy.string; import org.osmdroid.tileprovider.util.StreamUtils; import android.content.res.AssetManager;