geolocation

Remove fired Location-Based notification when user exits region

℡╲_俬逩灬. 提交于 2019-12-22 03:30:27
问题 I've setup (default iOS8) location-based notifications for my app. UILocalNotification *notification = [[UILocalNotification alloc] init]; notification.regionTriggersOnce = NO; notification.userInfo = @{ @"notification_id" : @"someID" }; notification.region = region; notification.alertBody = alertBody; [[UIApplication sharedApplication] scheduleLocalNotification:notification]; When a user enters the specified region, the notification is shown in the NotificationCenter correctly. However, I

Make a request for The Google Maps Geolocation API

∥☆過路亽.° 提交于 2019-12-22 01:37:06
问题 I would like to make a request for the web service - Google Geolocation API by using PHP 5. I have experience in XML parsing using PHP, but this one is using JSON format for making the request. I have no idea how to make the request! I think to receive the request is similar the XML parsing! https://developers.google.com/maps/documentation/business/geolocation/ 回答1: try this(result in json format): public function getGeoPosition($address){ $url = "http://maps.google.com/maps/api/geocode/json

Reverse Geocoding with Google Map API

社会主义新天地 提交于 2019-12-22 00:42:54
问题 I'm working on the JavaScript Google Map API (Version3) and more precisely on the reverse geolocation. With the help of the official documentation, I successed to perform the reverse geocoding, I found the address corresponding to the latitude and longitude coordonates. But I can't find how to reach the name bound to the address. Is it possible? How can it be performed? Thanks you. Camille. 回答1: You really need to loop and do multiple checks of what google found at these points a small script

Rubymotion / bubblewrap geolocation in airplane mode makes the app crash

为君一笑 提交于 2019-12-22 00:33:25
问题 Trying to get an clean geoloc implementation in some app; quite struggling with the limitations of what bubblewrap provide for locations def get_location begin BW::Location.get_once do |location| if location self.latitude = location.latitude self.longitude = location.longitude end end rescue puts "can't geoloc" end end With this code (sorry bu I show the 'tests' that - i expect - would work as fallbacks with ruby code), I just get a plain app crash if i set the airplane mode on the phone

Google maps Android API getting wifi location

筅森魡賤 提交于 2019-12-22 00:12:58
问题 So I am working on this app that will get the location of a wifi hotspot by just detecting it using the sensor wifi of the phone (The phone is not actually connecting to the hotspot wifi, it just detect). I was doing some preliminary research before start developing the app, and it seems that the Google Geolocation API will do the work for me. However, it is not free (at least what I understood after reading through the API). I had checked other apps that detects wifi hotspot, and I am just

Geolocation WatchPosition Distance Calculator

南笙酒味 提交于 2019-12-21 23:58:13
问题 I am using geolocation to get the users current location and monitor it using the watchPosition method. However, is there a way of calculating the distance between the users starting position and current position? Below is my code: var x = document.getElementById("info"); function getLocation() { if(navigator.geolocation) { navigator.geolocation.watchPosition(showPosition, showError, { enableHighAccuracy: true, maximumAge: 60000, timeout: 27000 }) } else { x.innerHTML = "Geolocation is not

GeoMapping Bearing and Coordinate Calculation for GoogleMaps markers

妖精的绣舞 提交于 2019-12-21 22:47:13
问题 I'm writing an Android app and integrating GoogleMapsV2 API. I have a series of markers on the map at various locations around an anchor. I want those markers to converge on the anchor's position incrementally. I've got a loop running that will call each marker B and from B's position calculate the bearing to the anchor A. I then calculate the destination coordinate for a fixed distance along that bearing and update. Here are the two functions (taken from an amalgamation of stack posts and a

Find land mass nearest to a geo coordinate

末鹿安然 提交于 2019-12-21 22:17:28
问题 As part of a developer challenge, I am trying to determine the land mass closest to a given coordinate. Obviously, if the point is on land, I use reverse geocoding and can get details. The problem is that if the point is in a body of water, especially oceans, it often won't return anything (Google, Nokia, Bing). I'd like to know that a point 3 miles off the coast of California is 3 miles from USA, or x miles from Japan, y miles from South Korea when a point is reasonably near more than one

How to find nearest location using latitude and longitude from a json data

蹲街弑〆低调 提交于 2019-12-21 21:27:24
问题 I'm trying to make a website that ask for user's location then find the closest location (100m radius) from it's position using GeoLocation and display the result in HTML. What I have tried. $.getJSON("places.json", function (data) { for (var i = 0; i < data.length; i++) { if ((data[i].lat - poslat) > 0.00200 || (data[i].lng - poslng) > 0.00200) { return data[i]; } html += '<p>' + data[i].location + ' - ' + data[i].code + '</p>'; $('#nearbystops').append(html); } }); places.json [ { "code":

I am trying to get location information from ip address in JAVA but I am getting a java.net.SocketException: Connection reset error

时间秒杀一切 提交于 2019-12-21 21:04:24
问题 import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javaQuery.importClass.javaQueryBundle; import javaQuery.j2ee.GeoLocation; /** * Servlet implementation class IP */ public class IP extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public IP() { super()