Questions tagged [location]

Location is a specific position in physical space, e.g. a point on the surface of the Earth described using latitude and longitude coordinates. This tag should NOT be used for questions related to the position of a virtual element e.g. position of a pixel on a bitmap or position of a layout element on UI (use [position] tag in that cases).

The term location is used to identify a point or an area in physical space, such as on the Earths surface or within a room.

A relative location is a description of position relative to another known site — for example, "2 miles north of London".

An absolute location is designated using a specific pairing of latitude and longitude in a Cartesian coordinate grid — for example, a Spherical coordinate system or an ellipsoid-based system such as the World Geodetic System—or similar methods.

The term location generally implies a relatively high degree of certainty of position.

9032 questions
1147
votes
23 answers

Where does npm install packages?

Can someone tell me where can I find the Node.js modules, which I installed using npm?
trnc
  • 16,829
  • 20
  • 53
  • 96
837
votes
28 answers

What is the simplest and most robust way to get the user's current location on Android?

The LocationManager API on Android seems like it's a bit of a pain to use for an application that only needs an occasional and rough approximation of the user's location. The app I'm working on isn't really a location app per se, but it does need to…
emmby
  • 95,927
  • 63
  • 178
  • 243
737
votes
23 answers

How do I get the current GPS location programmatically in Android?

I need to get my current location using GPS programmatically. How can i achieve it?
mudit
  • 24,215
  • 30
  • 84
  • 131
615
votes
26 answers

Location Services not working in iOS 8

My app that worked fine on iOS 7 doesn't work with the iOS 8 SDK. CLLocationManager doesn't return a location, and I don't see my app under Settings -> Location Services either. I did a Google search on the issue, but nothing came up. What could be…
özg
  • 17,402
  • 5
  • 15
  • 21
413
votes
6 answers

location.host vs location.hostname and cross-browser compatibility?

Which one of these is the most effective vs checking if the user agent is accessing via the correct domain. We would like to show a small js based 'top bar' style warning if they are accessing the domain using some sort of web proxy (as it tends to…
anonymous-one
  • 12,434
  • 18
  • 52
  • 80
292
votes
2 answers

What's the difference between window.location= and window.location.replace()?

Is there a difference between these two lines? var url = "http://www.google.com/"; window.location = url; window.location.replace(url);
Aaron Digulla
  • 297,790
  • 101
  • 558
  • 777
289
votes
6 answers

window.location.href and window.open () methods in JavaScript

What is the difference between window.location.href and window.open () methods in JavaScript?
masif
  • 3,400
  • 4
  • 15
  • 21
245
votes
22 answers

How to check if Location Services are enabled?

I'm developing an app on Android OS. I don't know how to check if Location Services are enabled or not. I need a method that returns "true" if they are enabled and "false" if not (so in the last case I can show a dialog to enable them).
Meroelyth
  • 4,804
  • 9
  • 38
  • 49
232
votes
15 answers

Fastest Way to Find Distance Between Two Lat/Long Points

I currently have just under a million locations in a mysql database all with longitude and latitude information. I am trying to find the distance between one point and many other points via a query. It's not as fast as I want it to be especially…
Ryan Detzel
  • 5,282
  • 8
  • 35
  • 47
230
votes
21 answers

How to get complete address from latitude and longitude?

I want to get following values from Latitude and Longitude in android Street Address City / State Zip Complete Address How to achieve this?
UMAR-MOBITSOLUTIONS
  • 73,009
  • 94
  • 197
  • 273
218
votes
15 answers

Get User's Current Location / Coordinates

How can I store the user's current location and also show the location on a map? I am able to show pre-defined coordinates on a map, I just don't know how to receive information from the device. Also I know I have to add some items into a Plist. How…
Awais Hussain
  • 2,240
  • 2
  • 9
  • 9
172
votes
23 answers

How do I get the full path to a Perl script that is executing?

I have Perl script and need to determine the full path and filename of the script during execution. I discovered that depending on how you call the script $0 varies and sometimes contains the fullpath+filename and sometimes just filename. Because…
Chris Madden
  • 2,202
  • 2
  • 15
  • 11
168
votes
27 answers

Nginx serves .php files as downloads, instead of executing them

I am installing a website in a droplet (Digital Ocean). I have a issue for install NGINX with PHP properly. I did a tutorial https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04 but when I…
Apeiron
  • 1,438
  • 2
  • 10
  • 20
159
votes
10 answers

Python + Django page redirect

How do I accomplish a simple redirect (e.g. cflocation in ColdFusion, or header(location:http://) for PHP) in Django?
Kyle Hayes
  • 4,798
  • 7
  • 32
  • 52
151
votes
21 answers

How to mock location on device?

How can I mock my location on a physical device (Nexus One)? I know you can do this with the emulator in the Emulator Control panel, but this doesn't work for a physical device.
Isaac Waller
  • 32,041
  • 27
  • 93
  • 107
1
2 3
99 100