geolocation

Google geolocation using cell tower info- Curl 400 Bad request PHP

三世轮回 提交于 2019-11-30 19:52:31
问题 I'm trying to get latitude and longitude from cell tower info using Google's geolocation api. It requires a valid JSON with information like MCC, MNC, cellId, lac etc.., My PHP post request looks like this. <?php header("Access-Control-Allow-Origin: *"); $mcc = $_POST["mcc"]; $mnc = $_POST["mnc"]; $cellId = $_POST["cellId"]; $lac = $_POST["lac"]; $post_array = array( "cellId" => (int) $cellId, "locationAreaCode" => (int) $lac, "mobileCountryCode" => (int) $mcc, "mobileNetworkCode" => (int)

Finding a coordinate in a circle

可紊 提交于 2019-11-30 18:45:56
问题 I am doing a mashup using Google Maps under Grails where users can create geofences by selecting a point on the map and a radius. This get stored on my database and the application receives constantly a set of coordinates from a GPS device. I would like to compare the received coordinates with the area stored in the circles. If the point is inside (or outside) the circle the program will fire an action. However, I would like to know how I can find out if the coordinates are located inside

How can I find a user's GEO Location using ASP.NET?

自作多情 提交于 2019-11-30 18:45:39
问题 How can I get hold of a user's GEO location within my ASP.NET application? I've noticed on browsers like Firefox and Google Chrome, I (as the user) am prompted as to whether or not to allow the site to have access to my location. How can I achieve a similar thing to this? 回答1: The prompt you're seeing is shown when a site uses the Geolocation API. It's all JavaScript, so you don't need any kind of server support to use it. If you want the values on the server side, you can send them back

GPS coordinates in background in cordova app

杀马特。学长 韩版系。学妹 提交于 2019-11-30 18:32:50
I'm currently doing a hybrid app using ionic/cordova. The app needs functionality where it pings our backend with its location every 1 minute or so and the backend API will answer if anything interesting is nearby. If the answer is yes the app will queue a local notification which hopefully will make the user open the app. This functionality is needed when the app is in background mode and even when the phone is locked. The app needs to be able to be deployed to both app store, google play and eventually windows phone. I'm currently using a combination of these three plugins: https://www.npmjs

Google/Yahoo alternatives to geocoding? [closed]

◇◆丶佛笑我妖孽 提交于 2019-11-30 18:20:33
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Does anyone know of a good and accurate alternative web API for geocoding an address that is not Google or Yahoo? I want to input an address/city/state/zip and have it return to me the latitude and longitude. Ideally, I would involve it via a simple HTTP GET, e.g. http://example.com/?location=123 Main St, New York

Geolocation SQL query not finding exact location

隐身守侯 提交于 2019-11-30 17:51:41
问题 I have been testing my geolocation query for some time now and I haven't found any issues with it until now. I am trying to search for all cities within a given radius, often times I'm searching for cities surrounding a city using that city's coords, but recently I tried searching around a city and found that the city itself was not returned. I have these cities as an excerpt in my database: city latitude longitude Saint-Mathieu 45.316708 -73.516253 Saint-Édouard 45.233374 -73.516254 Saint

Geolocating 802.11 access points by MAC address using Google Geolocation API

为君一笑 提交于 2019-11-30 17:00:23
问题 Support for the Google Geolocation API is now built in to most browsers. They do this, in part, by sending to Google the MAC address of nearby 802.11 access points (those whose beacons are captured by your computer.) I have a large number of 802.11 packets captured from various locations. I'm looking to geolocate the 802.11 access points. Assume that we only have their mac addresses. This should be possible by using the Google Geolocation API. Sources that I've found to date that might be

Getting location data for a taken photo in Android

江枫思渺然 提交于 2019-11-30 16:27:32
I don't know how to get the location (GPS/Network when taking a photo) in Android. Any suggestion and code samples are welcomed. I haven't used until now the Location services, I have tried in many ways but I can't get it to work. Here is my image capturing activity: public class ImageCaptureActivity extends Activity { // Activity request codes private static final int CAMERA_CAPTURE_IMAGE_REQUEST_CODE = 100; public static final int MEDIA_TYPE_IMAGE = 1; Context context = null; // directory name to store captured images private static final String IMAGE_DIRECTORY_NAME = "Asisoft"; private Uri

SQL Distance Query without Trigonometry

二次信任 提交于 2019-11-30 16:14:21
I have an SQLite database, which does not support trig functions. I would like to sort a set of lat,lng pairs in my table by distance as compared to a second lat,lng pair. I'm familiar with the standard haversine distance formula for sorting lat,lng pairs by distance. In this case I don't care particularly for precision, my points are separated by large distances, so I don't mind rounding off the distances by treating curves as straight lines. My question, is there a generally accepted formula for this kind of query? Remember no trig functions! If your points are within reasonable distance of

Need help optimizing a lat/Lon geo search for mysql

為{幸葍}努か 提交于 2019-11-30 16:04:41
问题 I have a mysql (5.0.22) myisam table with roughly 300k records in it and I want to do a lat/lon distance search within a five mile radius. I have an index that covers the lat/lon fields and is fast (milisecond response) when I just select for lat/lon. But when I select for additional fields in the table is slows down horribly to 5-8 seconds. I'm using myisam to take advantage of fulltext search. The other indexes perform well (e.g. select * from Listing where slug = 'xxxxx'). How can I