geolocation

Android WebView using GeolocationPermissions

一世执手 提交于 2019-12-05 02:52:54
问题 I’ve looked at the various questions regarding this problem on here such as: Using navigator.geolocation.getCurrentPosition in WebView on Android 2.0+ (PhoneGap related) android webview geolocation Android: Using html5 to determine geolocation in webview with javascript api But I’m still a bit confused, I know that I am supposed to create my own class from the abstract class WebChromeClient . Which gets the location, but how exactly from there does this object send the webView the geolocation

How do sites like Groupon segment geolocation based on the cities they have deals in?

心已入冬 提交于 2019-12-05 02:40:49
问题 Say you visit Groupon from the entry point Agoura Hills, CA - how would Groupon go about referencing that town to the nearest city that has deals (like Los Angeles) and choosing that as the closest? Is it grabbing lat/long from the location and calculating the distance from all available cities, choosing the shortest? If so, where can you get lat/long data like that for each city or an open api to use for this purpose? 回答1: Groupon seems to use limelightnetworks as their CDN provider and most

Is it possible to use X-AppEngine-Country within an application

拟墨画扇 提交于 2019-12-05 02:29:18
问题 When serving a request, GAE automatically inserts response header X-AppEngine-Country set to a value indicating the country from which the request was emitted. However, before GAE issues the response, I’d like to be able to use this value in a snippet of mine. I wrote this code: class TestPage(webapp2.RequestHandler): def get(self): country = self.response.headers["X-AppEngine-Country"] self.response.out.write("<pre>country %s </pre>" % country) But opening the page results in a crash: File "

How create GeoIP functionality in PHP project?

时光总嘲笑我的痴心妄想 提交于 2019-12-05 02:24:32
问题 I have some IP adress ( $_SERVER['REMOTE_ADDR'] ) and I must receive (learn) name of country and it would be nice if I can receive (learn) name of city too. And don't forget It's php-project, useful API - very good. P.S. It's some open-source project and we must use only free and open-source tools. 回答1: None (only the 'GeoIP.dat' file is needed). To download a free GeoIP Standard Country database, go to http://maxmind.com/download/geoip/database/ Install Just place the 'geoip.inc' file

How to make a form which searches an item around a specific radius using google maps API?

五迷三道 提交于 2019-12-05 01:57:08
I am working on a website in which I want to make a circle on google map either around current location or some manual address. Users will have option to decide whether they want to make circle around current location or some random address they will provide. (Users would have the option to put manual address inside current location as shown below in an image) Now we also need to make sure that circle is of particular radius ( 0-20/70km from the current location ) as well and user needs to decide that as well. ( The line beneath the current location will decide the radius which users can move

Converting Pixels to LatLng Coordinates from google static image

谁都会走 提交于 2019-12-05 01:15:53
问题 I am loading a image from google static Map API, the loaded satellite image is a place with hundreds of meters wide and length. https://maps.googleapis.com/maps/api/staticmap?center=53.4055429,-2.9976502&zoom=16&size=400x400&maptype=satellite&key=YOUR_API_KEY Additionally, the image resolution shows to be 10 meters, as shown below . My question is as I have known the centered geolocation (53.4055429,-2.9976502) and resolution of this static image, how would I be able to extend it to calculate

How to load Google ClientLocation API without loading the whole Google Maps API?

情到浓时终转凉″ 提交于 2019-12-05 01:15:50
问题 All I want to do is find out the person IP address so that I can reverse geocode it to find out their latitude and longitude from which they are viewing my web site from. I can do that using Google ClientLocation API but it's unclear to me if I have to load the huge Google Map framework just to use it. Is it possible to simply use the ClientLocation API without having to load all of Google Maps? If so, how? 回答1: Yes, you only need to use the ClientLocation object in the google.loader

How to determine if a PHP string ONLY contains latitude and longitude

百般思念 提交于 2019-12-05 01:13:25
问题 I have to work with strings which may contain Lat/Long data, like this: $query = "-33.805789,151.002060"; $query = "-33.805789, 151.002060"; $query = "OVER HERE: -33.805789,151.002060"; For my purposes, the first 2 strings are correct, but the last one isn't. I am trying to figure out a match pattern which would match a lat and long separated by a comma, or a comma and a space. But if it has anything in the string other than numbers, spaces, dots, minus signs and commas, then it should fail

Converting between coordinates system WGS 74 and WGS 84

那年仲夏 提交于 2019-12-05 01:01:53
问题 I'm working on rasterisation of the GSHHS database basically converting shoreline polygons and river lines to raster. http://www.soest.hawaii.edu/pwessel/gshhg/ The rivers and shores databases are two different files. I noticed misalignment of hundreds of meters between rivers and shores at points where they are clearly should be aligned. One thing I noticed in the README is that the shorelines database uses WGS84 coordinates and river database was generated form other source using WGS 72.

Remove fired Location-Based notification when user exits region

女生的网名这么多〃 提交于 2019-12-05 01:00:25
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 want to remove that notification message when the user exits that region, because it makes little sense