Reading the GPS data from the image returned by the camera in iOS iphone

The problem is that since iOS 4 UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage]; strips the geolocation out. To solve this problem you have to use the original photo path to get access to the full image metadata. With something like this: – (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { NSURL *referenceURL = [info objectForKey:UIImagePickerControllerReferenceURL]; ALAssetsLibrary *library = [[ALAssetsLibrary … Read more

Ruby Geolocation Gem/Plugins [closed]

Your current best bet is probably GeoKit (http://github.com/andre/geokit-gem for gem, http://github.com/andre/geokit-rails for plugin). It has built in functionality for Yahoo and Google API keys, distance calculation helpers, reverse geolocation, etc. However, GeoMereLaal (http://github.com/parolkar/geo_mere_laal/) is based on the working draft of the W3C Geolocaton API. It’s very limited at the moment as I could only get … Read more

How do I request permission for Android Device Location in React Native at run-time?

I solved it by changing the targetSdkVersion ( same to compileSdkVersion, in my case 23) in android/app/build.gradle. Edit AndroidManifest.xml located in android/src/main and add the <uses-permission android:name=”android.permission.ACCESS_FINE_LOCATION”/> <uses-permission android:name=”android.permission.ACCESS_COARSE_LOCATION”/> next : import { PermissionsAndroid } from ‘react-native’; and then add this method: export async function requestLocationPermission() { try { const granted = await PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION, … Read more

Google maps API – Center map on client’s current location

Try using the below code to get the user’s current location (GEOLOCATION): if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function (position) { initialLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); map.setCenter(initialLocation); }); } For showing an example, I’ve removed your php code. Check this JSFiddle Hope you understand.

Get altitude by longitude and latitude in Android

My approach is to use USGS Elevation Query Web Service: private double getAltitude(Double longitude, Double latitude) { double result = Double.NaN; HttpClient httpClient = new DefaultHttpClient(); HttpContext localContext = new BasicHttpContext(); String url = “http://gisdata.usgs.gov/” + “xmlwebservices2/elevation_service.asmx/” + “getElevation?X_Value=” + String.valueOf(longitude) + “&Y_Value=” + String.valueOf(latitude) + “&Elevation_Units=METERS&Source_Layer=-1&Elevation_Only=true”; HttpGet httpGet = new HttpGet(url); try { HttpResponse … Read more

Error adding geofences in Android (status code 1000)

You get GEOFENCE_NOT_AVAILABLE (code ‘1000’) when user disagrees to “Use Google’ location services” in Settings->Location->Mode: To fix it: go to Settings->Location->Mode set “Device only (Use GPS to determine your location)” set any other option to get the popup (e.g. “High accuracy (Use GPS, Wi-Fi and mobile networks to determine location”) dialog “”Use Google’ location services” … Read more

Get exact geo coordinates along an entire route, Google Maps or OpenStreetMap

OSRM gives you routes with road geometries as they are in the OpenStreetMap database. For example, you can get the route as GPX (and post-process this file if you want). This would look like the following: GET http://router.project-osrm.org/viaroute?hl=en&loc=47.064970,15.458470&loc=47.071100,15.476760&output=gpx Read more: OSRM API docs.