I'm attempting to use the geo.getEvents method in Last.fm's Web services, which you can read about here:
http://www.last.fm/api/show/geo.getEvents
I'm attempting to use it like this:
http://ws.audioscrobbler.com/2.0/?method=geo.getevents&lat=40.7903&long=73.9597&api_key=0382f639e72b14c9265d41993d28a110&format=json
Those are the Latitude and Longitude coordinates for New York City. However, I get back a responses saying there are not events there. Even if I add a distance parameter, it says the same thing. Also if I round those coordinates to integers.
Is there something wrong with my queries, or is the service just messed up?
Thanks.
New York is 73 deg. WEST, so you need to use a negative value for the longitude, and the URL should be:
http://ws.audioscrobbler.com/2.0/?method=geo.getevents&lat=40.7903&long=-73.9597&api_key=0382f639e72b14c9265d41993d28a110&format=json
Related
I would like to take a longitude and latitude of a user and determine if they are within a set boundary of property line on the map similar to the rectangles symbolizing buildings.I have looked into using CLGeocoder which returns an address but I would like to be able to determine if the user is within a park, or a property, a neighborhood or even a building which may have multiple addresses within it. What is the best way to go about doing this thank you.
I'm trying to research a topic and I need to get all tweets within 2013 and 2015 and a specific location for two keywords.
I tried to get the results via Advanced Search but I allways get no results.
I tried:
cannabis near:"EspaƱa" within:15mi since:2013-10-07 until:2015-01-01
cannabis near:"Spain" within:15mi since:2013-10-07 until:2015-01-01
Basically, I have a database of scraped press articles sorted by date from a bunch of sources, and I want to know how the agenda of this news sources have an impact on the social media conversation.
I could do it over Reddit if it was the case for the US, but there's no Spanish alternative (well, we have Meneame, but the user base is very left-leaning and I think it will be very narrow).
So I wanted to either scrape the search results or get them via API, but It's not working, and AFAIK I can't do anything similar with Facebook.
One way to achieve this is by using Twitter's geocode operator. In the example below i took Madrid as a center and covered a radius of 600km around it like this:
(canabis OR cannabis) geocode:40.4381311,-3.8196196,600km since:2013-10-07 until:2015-12-31
Try it...
The syntax is as follows:
([your_boolean_search_query]) geocode:[latitude],[longitude],[radius]km since:[] until:[]
one easy way to find latitudes and longitudes of locations is to use Google Maps. Simply navigate to a place using the search box and then copy the latitude and longitude element from the URL line in the browser. Here it is for Madrid. The latitude and longitude are right after the # sign, separated by a comma:
https://www.google.com/maps/place/Madrid,+Spain/#40.4381311,-3.8196196,54451m/data=!3m2!1e3!4b1!4m5!3m4!1s0xd422997800a3c81:0xc436dec1618c2269!8m2!3d40.4167754!4d-3.7037902?hl=en
Try it...
I need to find if the given zip code is within the required radius. For example, if the user has entered 20910, it should be able to determine if it's within 5 mile radius of 20814. Is there a way to do it? Google API or something? Please help.
I'm using C# as the programming language.
I think it's called the havershine formula...
Havershine Example - google it for more
I am trying to figure out how to use the Google Maps URL format for sharing locations as latitude/longitude in an app that I am developing for iPhone.
Example: http://maps.google.com/maps?q=40.77407,-73.96675
This is a point in Central Park, New York. When using this on an iPhone, "Maps" will open and reverse geocoding will be done, resulting in an address on the nearby 5th Ave.
But for sharing a meeting point in Central Park, this is quite useless!
Is it possible to specify any parameter in the query string that will turn off reverse geocoding, so that the exact lat/long position is shown in the "Maps" app on iPhone?
(Compare with the result one will get when entering this url on a desktop, where the exact location will always be pointed out by a green arrow.)
I found the answer myself: Adding "loc:" immediately after "q=" will turn off the reverse geocoding.
Example: http://maps.google.com/maps?q=loc:40.77407,-73.96675
Instead of a generic 'q', which according to specification is treated like a generic query
This parameter is treated as if it had been typed into the query box by the user on the maps.google.com page. q=* is not supported.
you could try ll or saddr.
ll The latitude and longitude points (in decimal format, comma separated, and in that order) for the map center point.
saddr The latitude and longitude points from which a business search should be performed.
The maps url scheme is specified here: http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html
Is there any way to find out the latitude/longitude of a place using IP address.
ip2location.com has a number of resources (some of which are free) for doing this, including scripts and demo databases - but I'm no iphone expert so I don't know if they're of any use in that particular environment.
I use quite a good free api for that in my PHP projects: http://api.hostip.info/?ip=IPADDRESSTOLOOKUP
returls XML... not sure if this is of use to you! :)
But the iphone is supposed to have an embedded gps chip, so I think you might use it to get this information.
Moreover, I think that with IPV6 you'll be able to use a given IP from multiple locations.
Assuming you're trying to find the position of someone/thing else, then generally no. There are a few exceptions, for when that IP address is registered to an individual business, which in turn list their full address in the whois record. You could then geocode that using a webservice (etc.) to get lat/long.
If you're trying to find out where you are, then you're probably better off using the built in GPS
The IP address doesn't uniquely identify a location.
I know I get a lot of unwanted ads telling me about good times to be had in my location.
The problem is the location is wrong.
I would say that this is a very easy way to do get the latitude and longitude. You can even get it of the user who is visiting your site.
$ip = $_SERVER['REMOTE_ADDR'];
$details = json_decode(file_get_contents("http://ipinfo.io/{$ip}/json"));
//$user_location is returning latitude , longitude
$user_location = $details->loc;
//you can split them like this som you get them in two different variables
$pieces = explode(",", $user_location);
$lat = $pieces[0];
$lon = $pieces[1];