gps

HTML5 navigator.geolocation in Web Workers

怎甘沉沦 提交于 2019-12-29 01:35:14
问题 I am trying to move my code for navigator.geolocation in a web worker. I tried it with Chrome and Safari but getting 'undefined' on var isGPSSupported = navigator.geolocation; Frustrated... they said in specification that 'navigator' object should be supported in web workers... My code is below: index.js var gpsWorker = new Worker("app/gpsworker.js"); gpsWorker.onmessage = function (e) { alert(e.data); }; gpsWorker.postMessage("Start GPS!"); gpsWorker.onerror = function (e) { alert("Error in

Android GPS Coordinates Scattered

末鹿安然 提交于 2019-12-28 12:44:23
问题 I have the following code below which seems to be working fine: // GPS Reader // Criteria Criteria criteria = new Criteria(); //criteria.setAccuracy(Criteria.ACCURACY_COARSE); // Used when we can't get a GPS Fix criteria.setAccuracy(Criteria.ACCURACY_FINE); // Used when we can get a GPS Fix criteria.setAltitudeRequired(false); criteria.setBearingRequired(false); criteria.setCostAllowed(true); criteria.setPowerRequirement(Criteria.POWER_LOW); LocationListener locationListener = new

Android GPS Coordinates Scattered

不打扰是莪最后的温柔 提交于 2019-12-28 12:44:07
问题 I have the following code below which seems to be working fine: // GPS Reader // Criteria Criteria criteria = new Criteria(); //criteria.setAccuracy(Criteria.ACCURACY_COARSE); // Used when we can't get a GPS Fix criteria.setAccuracy(Criteria.ACCURACY_FINE); // Used when we can get a GPS Fix criteria.setAltitudeRequired(false); criteria.setBearingRequired(false); criteria.setCostAllowed(true); criteria.setPowerRequirement(Criteria.POWER_LOW); LocationListener locationListener = new

Get country from coordinates?

为君一笑 提交于 2019-12-28 09:20:11
问题 How to get country name in Android, If are known geo coordinates? How to make it the simplest way? 回答1: Use Below Function for that. public void getAddress(double lat, double lng) { Geocoder geocoder = new Geocoder(HomeActivity.mContext, Locale.getDefault()); try { List<Address> addresses = geocoder.getFromLocation(lat, lng, 1); Address obj = addresses.get(0); String add = obj.getAddressLine(0); GUIStatics.currentAddress = obj.getSubAdminArea() + "," + obj.getAdminArea(); GUIStatics.latitude

How can I get the distance between two point by latlng?

可紊 提交于 2019-12-28 06:29:27
问题 I want to get the distance from A to B by latlng.When i run my app with the following code,it return a wrong result. Fx i tryed A( 31.172740,115.0081630) ,then B(30.6055980,114.3603140),the result is about 3111km.but the right distance is about 134km. My code is: class btnListener implements OnClickListener{ public void onClick(View v) { lat_a=lat_A.getText().toString(); lng_a=lng_A.getText().toString(); lat_b=lat_B.getText().toString(); lng_b=lng_B.getText().toString(); double a1,n1,a2,n2;

Getting GPS data from an image's EXIF in C#

百般思念 提交于 2019-12-28 03:30:11
问题 I am developing a system that allows for an image to be uploaded to a server using ASP.NET C#. I am processing the image and all is working great. I have managed to find a method that reads the Date Created EXIF data and am parsing it as a DateTime. That works great too. I am now trying to read GPS data from the EXIF. I am wanting to capture the Latitude and Longitude figures. I am using this list as a reference to the EXIF data (using the numbers for the property items) http://www.exiv2.org

Android : LocationManager vs Google Play Services

孤街醉人 提交于 2019-12-27 12:12:35
问题 I want to build an app that centers around getting the user's current location and then find points of interest(such as bars,restaurants,etc) that are close to him/her via the Google Places API . Upon searching the web for a place to start I came across some tutorials that use the LocationManager class and some others that use Google Play Services in order to find the users location. On first sight both of them do the same thing, but since I am new to this I got a little confused and I don't

Android : LocationManager vs Google Play Services

巧了我就是萌 提交于 2019-12-27 12:12:28
问题 I want to build an app that centers around getting the user's current location and then find points of interest(such as bars,restaurants,etc) that are close to him/her via the Google Places API . Upon searching the web for a place to start I came across some tutorials that use the LocationManager class and some others that use Google Play Services in order to find the users location. On first sight both of them do the same thing, but since I am new to this I got a little confused and I don't

Android : LocationManager vs Google Play Services

僤鯓⒐⒋嵵緔 提交于 2019-12-27 12:11:21
问题 I want to build an app that centers around getting the user's current location and then find points of interest(such as bars,restaurants,etc) that are close to him/her via the Google Places API . Upon searching the web for a place to start I came across some tutorials that use the LocationManager class and some others that use Google Play Services in order to find the users location. On first sight both of them do the same thing, but since I am new to this I got a little confused and I don't

How to delay onMapready call in Google map based app

橙三吉。 提交于 2019-12-25 19:06:04
问题 In my android app i have to get the current GPS/network position and then get the google map of that position.But before getting the position, the map has been loaded and every time it gets (0,0) position.How can i delay the On mapready call till i get position. code package com.example.partha.map; import android.support.v4.app.FragmentActivity; import android.os.Bundle; import android.util.Log; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps