geolocation

Google Maps Geolocation API for China

倖福魔咒の 提交于 2019-12-02 09:18:14
I am using Google Maps Geolocation API to get location address in china with the help of MCC, MNC, Lac Id and Cell Id. But Api returns "Not Found" error for all the sets of MCC, MNC, Lac Id and Cell Id of China. So, is there an issue with Google Api or some other issue? Please let me know. Since March 2 2011, China started to block Google HTTPS Server periodically. The 443 port on Google server was blocked for 15 minutes and available for another 15 minutes as a cycle. You can try to use http servers instead of https to work properly. Google Map work was not very good in China. So i recommend

iOS 7 Simulator on Mac doesn't work with custom location (Also doesn't ask permission)

你离开我真会死。 提交于 2019-12-02 08:58:49
I'm trying to make an iOS7 app that uses the current location of the device. I'm using the iPhone simulator on my Mac, but I'm having some problems. Every time my view that the location manager is in appears, it prints out 0.000000 for both latitude and longitude, even after I've set a custom location (from simulator>debug>location). Also, it seemed strange that the simulator didn't ask for permission to use current location when it opened the app. Anybody know what's going on here? - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a

How to compute hypotenuse and bearing

谁说我不能喝 提交于 2019-12-02 08:16:30
I got the below code from @DanS at this link how-to-display-a-map-still-image-file-with-a-moving-current-location onCurrentPosition(Location current){ double hypotenuse = upperLeft.distanceTo(current); double bearing = upperLeft.bearingTo(current); double currentDistanceX = Math.cos(bearing) * hypotenuse; // "percentage to mark the position" double currentPixelX = (currentDistanceX / upperLeft.distanceTo(lowerRight) * Math.cos(upperLeft.bearingTo(lowerRight))) * mapWidth; moveIndicatorX(currentPixelX); } Here are the values: current: 41.850033,-87.65005229999997 upperLeft: 41.866514127810355,

Why does CLLocationManager returns null locations on the iphone SDK 4 beta in the Simulator?

六眼飞鱼酱① 提交于 2019-12-02 08:13:01
I have this piece of code: - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { NSLog(@"Manager did update location!!"); self.currentLocation = newLocation.description; } I have this code inside a class that conforms to the CLLocationManagerDelegate . I tested earlier in sdk 3.0 and works nice (on both simulator and device). I'm testing this class on the SDK 4, in the simulator, but it gives null as a newLocation. I can't even get the NSLog for the first call. I checked other app where I use the location

Google maps API geolocation + radar places search

筅森魡賤 提交于 2019-12-02 07:35:06
I am trying to use both Geolocation and Places from the google maps API to display a map (at my location) with the nearest places around me. The two examples work seperately but not together. Can anyone tell me why there is a problem with this? am I overwriting the map with another or doing something else wrong? <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=AIzaSyA93l5zPyIvGB7oYGqzLSk28r5XuIs2Do8 &sensor=true&libraries=places"></script> <script> var map; var service; var marker; var pos; function initialize() { var mapOptions = { zoom: 15 }; map = new

I want to get location in a variable and want to use this variable to apply conditions

大憨熊 提交于 2019-12-02 07:18:41
问题 I have two pages. One is login page and in other page i am finding my location using Geolocation. But in login page I want to get that variable from location file and apply conditions on that variable..... <script> function displayLocation(latitude,longitude){ var request = new XMLHttpRequest(); var method = 'GET'; var url = 'http://maps.googleapis.com/maps/api/geocode/json? latlng='+latitude+','+longitude+'&sensor=true'; var async = true; request.open(method, url, async); request

How do I use MaxMind's GeoIP database to determine location?

独自空忆成欢 提交于 2019-12-02 06:50:23
So, I was told in my previous question that I can use the databases provided by MaxMind to determine locations. So, I got their databases downloaded from their site. They are csv files and open up in Excel. InetAddress ip = InetAddress.getLocalHost() is how I get the IP of my computer. From there I do String justIP = ip.getHostAddress() My question is: How do I resolve justIP to a city location using the DB I just downloaded ??? I am new to this so a little help will be appreciated. One of the files has three columns. startIPNum , endIPNum and locID I do not know what these do but I guess

Geolocation IP in Java [closed]

ぐ巨炮叔叔 提交于 2019-12-02 06:34:29
Is there any way to get the country, city (generally: geolocation information) from IP address. Note that my application is java. I visisted and tried many web services, but I didn't find suitable one and I prefer to write my own. Also, I found some CSV DBs but also this solution is not preferable at all. please, help. All you need is GeoIP , provided by MaxMind company. They provide free GeoIP2 database - GeoLite2 and several GeoIP2 APIs (thanks karel) including Java API to read database file too. Documents Java API Downloadable Java libraries Downloadable Java libraries from maven.org , my

navigator.geolocation.getCurrentPosition() when screen is locked

非 Y 不嫁゛ 提交于 2019-12-02 06:17:36
问题 I have an App which constantly polls for location when its in travelling mode. My issue is that once the screen is locked, the App can no longer access the geolocation from the phone. I have managed to find this plugin but it requires I purchase it for the capability to work in Android. http://shop.transistorsoft.com/pages/cordova-background-geolocation-premium Does anyone know if there is a free option that i can use to get location to successfully poll in an Ionic / Cordova application

GoogleMap Markers are Not Clickable on the Mobile Devices

丶灬走出姿态 提交于 2019-12-02 06:09:19
问题 GoogleMap Markers are Not Clickable on the Mobile Devices (Touch Screens). But, ok on any PC, so I can't figure out what is the point. Here is my code: var map = new google.maps.Map(document.getElementById('map'), { zoom: 10, center: new google.maps.LatLng(60.037760, -44.100494), mapTypeId: google.maps.MapTypeId.ROADMAP }); var locations = [ ['4lvin', 60.074433, -44.011917], ['5irius', 60.037760, -44.100494] ]; for (var i = 0; i < locations.length; i++) { var marker = new google.maps.Marker({