latitude-longitude

Tool or PHP code to convert IP address into lat/lng coordinates [closed]

耗尽温柔 提交于 2019-12-03 00:50:35
I have thousands of IP addresses of visitors to my site, what tools can I use to convert these into lat/lng coordinates? I will then be able visualise the data on a map with filters for further demographics gathered. For one of my sites I made use of maxmind's free geolite country database which can be downloaded here: http://www.maxmind.com/app/geolitecountry They also provide a city level version which includes the long/lat: http://www.maxmind.com/app/geolitecity but note that the accuracy on the free version is a lot lower than the paid version. I suggest using Google Analytics to your

Algorithm to calculate nearest location based on longitude & latitude

淺唱寂寞╮ 提交于 2019-12-02 22:46:36
I am currently trying to develop an algorithm to calculate which known locations are closest to current known location. I have a list of say 100 known locations (meaning I have both long- and latitude). Out of these 100 I pick one location, and after picking that location I want a list to show say the 8 closest known locations to this. How would a possible solution be to this? Edit I am not looking for how to calculate distances. I am looking for how to calculate which known locations lies closest to current location. Example: Say the list contains 100 locations of movie theaters. I am at

How do I get an addresses latitude-longitude using HTML5 geolocation or Google API?

大城市里の小女人 提交于 2019-12-02 21:28:18
I am getting baffled with a problem that is, I can get the location of a user from Facebook and all I need is to get the latitude and longitude of that location, but I still couldn't find a solution. It will help if I can get that latitude and longitude using an HTML5 geolocation or any Google API. What is the solution? if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(successFunction, errorFunction); } else { alert('It seems like Geolocation, which is required for this page, is not enabled in your browser. Please use a browser which supports it.'); } If the browser

What is the best approach to find all addresses that are in a specific distance to the selected point

廉价感情. 提交于 2019-12-02 19:35:55
I am developing an application that is supposed to show addresses that are in a specific distance of a location. I know how to find the distance between two points, but the problem is I am not sure what would be the best approach in terms of performance. One way is to retrieve all addresses and check them one by one toward the selected address in back-end but is there any way to minimize the number of items that I retrieve from database, rather than using the memory? whats the best approach to do it and how? Imagine I have 300,000 records do I have to retrieve them all and calculate their

how to get the current location in latitude and longitude in objective c

大兔子大兔子 提交于 2019-12-02 18:37:50
I am using the following code to get the current location,I have added the corelocation framework - (void)viewDidLoad { [super viewDidLoad]; locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.distanceFilter = kCLDistanceFilterNone; // whenever we move locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters; // 100 m [locationManager startUpdatingLocation]; } - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { int degrees = newLocation.coordinate

Select all geospatial points inside a bounding box

巧了我就是萌 提交于 2019-12-02 18:33:06
I have a table called 'flags' in a MySQL database with 400,000 rows. This table is made up of geospatial points that represent different positions around the UK. The application I'm creating uses Google Maps. On the map is a button that should toggle the flags visibility on the map. It's my job now to create an API that when passed a bounding box all flags inside the bounding box are returned (so that they can then be displayed on the map). The passed parameters are the North East latitude/longitude and the South West latitude/longitude of the viewport's current position. I now need to perform

Calculating number of points within a certain radius [duplicate]

帅比萌擦擦* 提交于 2019-12-02 16:06:11
问题 This question already has answers here : find locations within certain lat/lon distance in r (4 answers) Closed 3 years ago . Given a data frame with latitudes and longitudes I want to add a column that simply contains the count of other points (of the same data frame) that are within a certain radius e.g. within 10 km of that specific point. Example data: set.seed(1) radius<-10 lat<-runif(10,-90,90) long<-runif(10,-180,180) id<-1:10 dat<-cbind(id,lat,long) id lat long [1,] 1 -42.20844 -105

How to get the Google Map based on Latitude on Longitude?

ε祈祈猫儿з 提交于 2019-12-02 15:28:59
I want to display Google map in my web page based on longitude and latitude. First user want to enter longitude and latitude in two text box's. Then click submit button I have to display appropriate location in Google map.And also I want to show the weather report on it.How to do that? Thank You. jsw Create a URI like this one: https://maps.google.com/?q=[lat],[long] For example: https://maps.google.com/?q=-37.866963,144.980615 or, if you are using the javascript API map.setCenter(new GLatLng(0,0)) This, and other helpful info comes from here: https://developers.google.com/maps/documentation

Parse User name for extracting user location Twitter

限于喜欢 提交于 2019-12-02 13:35:24
I am trying to scrape user location with respect to user names from twitter. Input: The user list has more than 50K User names AkkiPritam,6.77E+17,12/15/2015,#chennaifloods AkkiPritam,6.77E+17,12/15/2015,#bhoomikatrust AkkiPritam,6.77E+17,12/15/2015,#akshaykumar gischethans,6.77E+17,12/15/2015,#chennaifloods mid_day,6.77E+17,12/15/2015,#bollywood mid_day,6.77E+17,12/15/2015,#chennaifloods Nanthivarman16,6.77E+17,12/15/2015,#admkfails Nanthivarman16,6.77E+17,12/15/2015,#jayafails Nanthivarman16,6.77E+17,12/15/2015,#stickergovt Nanthivarman16,6.77E+17,12/15/2015,#chennaifloods AdilaMatra,6.77E

how to get lat long from google map when our own geojson layer is there?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 13:17:26
google.maps.event.addListener(map, 'click', function( event ){ alert( "Latitude: "+event.latLng.lat()+" "+", longitude:"+event.latLng.lng() ); }); this code gives us lat long when we click on google map. but it does not work when there is our own geojson layer that is if we have our own geojson layer of polygon over google map then clicking inside that polygon the above code would not work Either add your click event listener to the Data layer or set the Data layer to not accept mouse events ( clickable:false ). Set event listener on Data layer: google.maps.event.addListener(map, 'click',