osmdroid

Determine user location on osm maps

不想你离开。 提交于 2019-12-02 19:47:22
I am working on an android application that determines user location in osm maps. I am being able to show user location on the map, but if the location change the whole map is reloaded, what’s wrong with that? Also how I can increase the accuracy of the user location? And how can I make a circle that increase and decrease according to the accuracy(as shown in Google one)? code : public class OsmDemoActivity extends Activity implements LocationListener, MapViewConstants { private MapView mMapView; private MapController mapController; private LocationManager mLocMgr; private ItemizedOverlay

NulPointerException at maps.y.p.onResume(Unknown Source) on implementing fragments for OSMDroid

匆匆过客 提交于 2019-12-02 15:08:37
问题 I am currently trying to transfer my OSMDroid Map Activity into Fragments. It seems that everything has been set correctly but I'm getting this weird NullPointerException which I'm unsure of solving. 02-20 23:59:36.140: E/AndroidRuntime(970): FATAL EXCEPTION: main 02-20 23:59:36.140: E/AndroidRuntime(970): java.lang.NullPointerException 02-20 23:59:36.140: E/AndroidRuntime(970): at maps.y.p.onResume(Unknown Source) 02-20 23:59:36.140: E/AndroidRuntime(970): at com.google.android.gms.maps

NulPointerException at maps.y.p.onResume(Unknown Source) on implementing fragments for OSMDroid

[亡魂溺海] 提交于 2019-12-02 11:48:48
I am currently trying to transfer my OSMDroid Map Activity into Fragments. It seems that everything has been set correctly but I'm getting this weird NullPointerException which I'm unsure of solving. 02-20 23:59:36.140: E/AndroidRuntime(970): FATAL EXCEPTION: main 02-20 23:59:36.140: E/AndroidRuntime(970): java.lang.NullPointerException 02-20 23:59:36.140: E/AndroidRuntime(970): at maps.y.p.onResume(Unknown Source) 02-20 23:59:36.140: E/AndroidRuntime(970): at com.google.android.gms.maps.internal.IMapFragmentDelegate$Stub.onTransact(IMapFragmentDelegate.java:115) 02-20 23:59:36.140: E

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

北城余情 提交于 2019-12-02 10:28:39
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. Google Maps LatLngBounds becomes BoundingBox in osmdroid (more or less). It has no direct equivalent to the LatLngBounds.including method (yes, could be a good idea to implement this one). But BoundingBox.fromGeoPoints covers a lot of needs. { IGeoPoint

osmdroid workaround for the classic markers overlapping

谁都会走 提交于 2019-12-02 05:44:52
问题 I am developing an Android offline mapping application using osmdroid and osm bonus pack and loading the tiles and data from external storage. Right now, as the data grows, markers are starting to get cramped together, I even have the situation of two places on the same building. I know this kind of issue has been asked a lot before, mine is about a simple temporal workaround I'm thinking of implementing. How about if two places are near enough(right in top of each other!) the standard info

Unable to implement onTouchEvent (Drag & Drop) with Osmdroid

[亡魂溺海] 提交于 2019-12-02 05:14:05
问题 I had been trying to implement OnTouchEvent so I can react when an user move (drag & drop) an overlayitem. I found something similar on the Osmdroid site: http://code.google.com/p/osmdroid/issues/detail?id=225. I am using the code there as reference but still is not working for me and then my application is crashing when it get to the hitTest. Any suggestion? Thanks. public boolean onTouchEvent(MotionEvent event, MapView mapView) { final int action = event.getAction(); final int x = (int)

Cannot access resource icons when running with osmdroid-android-3.0.7

我的未来我决定 提交于 2019-12-02 03:57:57
I am trying to start a simple map activity that displays a map an a couple of markers using osmdroid-android-3.0.7 library. The code worked under an older version (1.10). I am getting the following error: 02-03 15:14:30.574: E/AndroidRuntime(10277): Caused by: java.lang.IllegalArgumentException: Resource not found: marker_default.png When I unzipped the jar file I can see a list of icons in the top level directory and one of them is indeed marker_default.png. This is the snippet of the code: public class MapDisplay extends Activity { private MapView mapView; private ResourceProxy resProxy;

osmdroid workaround for the classic markers overlapping

心不动则不痛 提交于 2019-12-02 03:18:46
I am developing an Android offline mapping application using osmdroid and osm bonus pack and loading the tiles and data from external storage. Right now, as the data grows, markers are starting to get cramped together, I even have the situation of two places on the same building. I know this kind of issue has been asked a lot before, mine is about a simple temporal workaround I'm thinking of implementing. How about if two places are near enough(right in top of each other!) the standard info window pops up as a ListView with each row designed like the standard bubble(image, title,

Adding ItemizedOverlay to my mapview

余生颓废 提交于 2019-12-02 01:50:46
问题 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

Unable to implement onTouchEvent (Drag & Drop) with Osmdroid

爱⌒轻易说出口 提交于 2019-12-02 01:47:29
I had been trying to implement OnTouchEvent so I can react when an user move (drag & drop) an overlayitem. I found something similar on the Osmdroid site: http://code.google.com/p/osmdroid/issues/detail?id=225 . I am using the code there as reference but still is not working for me and then my application is crashing when it get to the hitTest. Any suggestion? Thanks. public boolean onTouchEvent(MotionEvent event, MapView mapView) { final int action = event.getAction(); final int x = (int) event.getX(); final int y = (int) event.getY(); final Projection pj = mapView.getProjection(); boolean