geolocation

iOS overlay (MKPolygon) data for all U.S. states?

China☆狼群 提交于 2019-12-30 09:22:26
问题 In the Displaying Overlays on a Map section of the iOS Developer Library Location Awareness Programming Guide, there is an example that "shows a filled and stroked overlay covering the state of Colorado." // Define an overlay that covers Colorado. CLLocationCoordinate2D points[4]; points[0] = CLLocationCoordinate2DMake(41.000512, -109.050116); points[1] = CLLocationCoordinate2DMake(41.002371, -102.052066); points[2] = CLLocationCoordinate2DMake(36.993076, -102.041981); points[3] =

Google Maps API Geocode Synchronously

自闭症网瘾萝莉.ら 提交于 2019-12-30 08:06:09
问题 I was wondering if its possible to geocode something using googlemaps api synchronously so instead of waiting for a callback function to be called, it would wait for a value to be returned. Has anyone found a way to do something like this. P.S.: I'm using version 3 of the api 回答1: The Geocoder calls your callback function with the value. That's the only way to do it. If it were synchronous, your script would freeze while it waited for the Geocode to process. There really isn't any reason to

Android: How to: plot a real world latitude and longitude coordinates to still image with different angle?

柔情痞子 提交于 2019-12-30 07:24:22
问题 I have already the conversion of latitude and longitude coordinates (current) to pixel coordinates. Then I also successfully plotted the current into still image. But the problem is the still image angle is not proportionate to real world map. Here's the lat & long to pixel convertsion (Thanks to @Dan S , answered here mark a given lat long into still image): public final static BigDecimal PI = BigDecimal.valueOf(Math.PI); public final static double OneEightyDeg = 180.0d; public final static

Phonegap enable GPS/Location at app runtime

ぃ、小莉子 提交于 2019-12-30 06:05:49
问题 I am using jquery-ui-maps and HTML5 geolocation to show to the user a list of locations and I need to leverage the user's geolocation. So, here is the use case, User does not have GPS/Location Services enabled. User opens the application and navigates to the view that calls navigator.geolocation to get the user's position The app errors out and notifies the user they must enable GPS/Location Services The user then navigates out of the app and enables GPS When the user comes back to the app

How to know the positioning mode is WIFI or 2G/3G cell tower in Android?

僤鯓⒐⒋嵵緔 提交于 2019-12-30 05:22:09
问题 We know there are two positioning mode in Android: GPS and network. If we use network, then Android can use WIFI or 2G/3G cell tower to position. Without GPS, we can simply use LocationManager.NETWORK_PROVIDER to get the location data. But how can we know the mode is WIFI or 2G/3G cell tower exactly? Android doesn't provide separate providers for WIFI and cell tower. I have thought a method. But I am not sure whether it is correct. Please review and give comments: Check whether I can get a

Update Location Marker and draw path on Google Maps when walking/driving in Android

不问归期 提交于 2019-12-30 03:36:04
问题 I want to create a functionality like Google Maps. I want to update my location marker whenever a person start walking/driving. I am thinking of using onLocationChange method of LocationListner but I am not sure. I also like to draw the path with updating location on the Google Maps. All suggestions are most welcome. ItemizedOverlay:- public class LocationOverlay extends ItemizedOverlay<OverlayItem>{ private List<OverlayItem> myOverlays; Path path; static int cnt = -1; public LocationOverlay

How do I limit which countries can view my website ( PHP )

僤鯓⒐⒋嵵緔 提交于 2019-12-30 02:09:06
问题 In there an easy way to do this in PHP. I want to make sure that only web requests from certain countries are able to access my website. Any ideas? 回答1: Use an IP geolocation database (some are free) and $_SERVER["REMOTE_ADDR"] to get the visitor's IP address. http://www.maxmind.com/app/geolitecity is a free (less accurate) version of a commercial one. 回答2: Like Gilles, I've used MaxMind's GeoIP stuff for this in the past - configured with the PECL extension for speed. It works reasonably

Get your location through python

时光总嘲笑我的痴心妄想 提交于 2019-12-29 14:15:59
问题 Is there anyway that I can get the location of my device through python. Currently I am having to use selenium and open up a browser, use a location service website and setting the result of that to variables for lat/long. But is there an easier way to do this? UPDATE: I am using a 3G dongle on my RaspberryPi, so looking for a way to get the specific lat/long of it - I can successfully do this through web service, just wondering if there is a quicker way built into python for these requests?

Associate IP addresses with countries [closed]

痞子三分冷 提交于 2019-12-29 13:30:34
问题 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 4 years ago . I want to show country flag depending on ip address I receive at server side. Are fixed ip addresses are assigned to countries ? Where can I get database for ip address to country mapping ? 回答1: Take a look at the following: IP address geolocation SQL database Geo Locate IP Address XML API Whois Map Country

Autofill Address + Google Maps API

我与影子孤独终老i 提交于 2019-12-29 10:36:09
问题 I want to present my users with a text box wherein they can type in their address. As they type their address, I want to provide the users with suggestions/predictions of what address they are trying to type. I'm also concerned about the relevance of this address (e.g. that the address is not an address halfway across the world). Is this possible? I'm using jQuery. 回答1: You can use Google Places API to have an autocomplete for address. When address is selected, address_components field