In foursquare api explore, it automatically picks the lat, lng for your location
https://api.foursquare.com/v2/venues/trending?ll=40.7,-74&oauth_token=[TOKEN]&v=20120325
and it return lot of results for the above url.
While using a third party service to get lat, lng for my ip address I get the coordinates as 40.7013,-73.7074, just little different from what foursquare got for me. Guess what, it returns no results when these co-ordinates are specified.
Any idea how to handle this?
Thanks,
Mandeep.
Look at the api: https://developer.foursquare.com/docs/venues/trending
You can specify a radius up to about 2000 meters. That's not really very large...
Related
I'm looking for some help on comparative OpenLayer functions for the following Google maps functions, can someone please let me know what these would be?
I'm currently using
For getting distance, using the distance matrix API:
http://maps.googleapis.com/maps/api/distancematrix
For getting latitude and longitude of the current address:
http://maps.googleapis.com/maps/api/geocode/json?address
Kindly check the attachment which are using for getting latitude, longitude and distance matrix.
Function names:
function getLatLng($add)
function getRoadDistance($from, $to)
--
things are a little bit more complicated in OL than they are with the google-api
Routing: if you have a small road network you can consider creating a Database in PostGIS and use pgrouting to get routing functions, you can find more on it here
Or if you want to use it on a bigger scale there some APIs that do it for you, for example yourNavigator, you'll have to make a get request with your coordinates like this
http://www.yournavigation.org/api/1.0/gosmore.php?format=geojson&flat=startLatitude&flon=startLongitude&tlat=destLatitude&tlon=destinationLongitude
there is also the OSRM for the same purpose.
to get the longitude and latitude based on an address you can use the geocoder for Openlayers 3
that's what I could think of right now, I hope it helps
I have geodata from a database in the form of e.g.:
565123.71392795,5930168.553
When looking for the general region of 56°,59° I can tell that this is completely wrong.
The location should be somewhere around 53.5°,10°
Is this even a valid geolocation format?
It is the UTM Format or Universal Transverse Mercator format. As the Location is in Germany it should be:
32U565....,59301...
For further Information see https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system
I'm working on a iPhone app that stores location data from a user. However, sometime the user doesn't have service.
Is there an API that estimates location data when the phone gets back into service? Or any other suggestions
No, there is no such API, because that would create wrong locations.
You have to write yourself such a method, that hopefully works in the scope of your application demands:
E.g You could do a linear interpolation when the GPS service has an outage for some seconds.
e.g:
A liner interpolation of lat and lon values work without special geographic calculations.
Just it would not work if you cross the datum limit (border longitude = 180E to 180 W),
and maybe not if you cross the poles.
But both situations will practically not happen.
So I have some code that gets the user's location from the phone as a CLLocation, then I do a reverse geocode on it. The problem is that the resulting MKPlacemark has 0 for altitude, despite the fact that the CLLocation had a value in the altitude field.
It makes sense that if I just ask for the address of some coordinates, I don't necessarily get altitude (as that would require topographic logic). Most of the questions on here suggest calling out to a topo service.
I am wondering why the reverse geocoder would not just preserve the altitude, and also asking people what their preferred solution has been to this problem. It's not like it's hard to figure out: I can pass the altitude in separately and then just jam it into my ultimate object (my own address class), but that's ugly.
This is indeed the state of these classes at this time. Probably a bug report with Apple is in order.
i was wondering how use the Geonames web service to return all places close to a certain lat long combination. The example of what i would like to do is here. See all the towns listed at the bottom in the table
On that page:
http://www.geonames.org/export/ws-overview.html
You find all web services available.
Service No.9 findNearby is a good candidate for your task.
In that "findNearby" Service you pass in:
Parameters : lat,lng, featureClass,featureCode, radius: radius in km (optional), maxRows : max
For featureClass and Code you have to read a bit the docu.