Need help on geolocation API - geolocation

I need to implement street view, but it seems that google does not have that capability for India.
I want that The map should be dynamic and the customer should be able to see point of interest near a specified point and within a given radius or zip code.
I need to geocode and reverse geocode
Can somebody share an idea and one quick example of this.

if you want to get places of interest near by some location, then I would suggest using HERE PLACES API for that task. The site should also include nice examples for the API. Also its simple REST API, so it would work in any platform really.

Related

get country and city information from wikimapia Api

I need to know in which country (and hopefully some more info, like city or area or state and it would be great if I could get whether this is on land or sea) a coordinates set lies in.
I have tried the wikimapia api but it is extremely difficult to get around to it.
for example I have this call
http://api.wikimapia.org/?function=box&key=example&bbox=23.72251,37.96918,23.73094,37.9731&format=json
which brings some information about an area in Athens, Greece.
The problem is that not only this api call is depreciated, but when i try to get the country by adding &category=2977
http://api.wikimapia.org/?function=box&key=example&bbox=23.72251,37.96918,23.73094,37.9731&format=json&category=1176
this doesnt work(the category id i got it from this gist)
I would guess that this might have something to do with the method being depreciated, but when I change to the new method place.getbyarea it is not working at all.
http://api.wikimapia.org/?function=place.getbyarea&key=example&bbox=23.72251,37.96918,23.73094,37.9731&format=json
Any ideas? thanks in advance
Why do you want specifically the API of Wikimapia to get your information? To recover the city and country from GPS coordinates, some others API’s are much more appropriate I think, here some examples:
Google Maps (used here in a webpage)
Here Maps
Bing Maps
Apple Maps (Mapkit.js)
Algolia Places
OpenStreetMap Nominatim

How to create get direction button in mapView?

I am working on my app, it has the mapView inside and the user location. Then, I need to get direction from user location to particular place on the map, how do I do that. I'am searching around and it seem to be like that Apple does not allow to do it on Apple map.
Please give me some advices and thanks so much.
As John commented, you can't get directions via a UIMapView, as Apple doesn't provide an API you can use to do so. If you really need an API for directions and don't want to write it yourself, check out the following APIs:
MapQuest
CloudMade
Google Directions Web API
Using one of the listed sources, you can make an HTTP request to a server that will return a result (likely in JSON) that includes both directions and an ETA.
For example, the following MapQuest API call will return a JSON item called distance, which contains the formatted distance (in miles) that the recommended route between Lancaster and York will take. Just remember to pass in your API key.
http://www.mapquestapi.com/directions/v1/route?key=YOUR_KEY_HERE&from=Lancaster,PA&to=York,PA&callback=renderNarrative
For further explanation, have a look at the MapQuest documentation.

Tweets, Location, Keywords and Data

I'm trying do some analysis on locations where people are going during winters. The approach I'm following is get tweets from a specific city (say, New York) and with the keyword Foursquare. Then use foursquare data for that user to see his/her checkins and try to trace a pattern.
So, I'm stuck in the first phase. How do I get those tweets from ONE city and with the keyword FOURSQUARE. I'm not sure if I understood how to use streaming API correctly and the ReST API isn't working (shows NOT AUTHORISED)
Could you tell me a detailed procedure for a rookie to understand the process of doing the above mentioned process. Also, let me know if you have a better approach for analysing trends in check ins.
Thanks
You want to read these:
https://dev.twitter.com/docs/api/1/get/search
https://dev.twitter.com/docs/platform-objects/places
You can give Twitter a latitude/longitude coordinate and a radius, or you can use the "place" field as a filter. Either way, expect to fine-tune this a bit to fit your needs. You also need to take into account that a lot of people might tweet without location services enabled.
If you want to use the REST API, you need to get an API key from twitter.

Geolocation and getting a city from an input address (Rails)

The app I'm building needs to be able to match up users to events based on the city/town they're in. I'm still relatively new to Rails and completely new to Geolocation and using locations in an app. I'd figured on a design where users have one or many cities, and events would have one city which I'd hoped to extract without specifically asking the user for it, by getting it from the event address entered.
Mostly to provide some outside checking to help get the address entered correctly and consistently, but also to show a map, I installed this jquery address picker (https://github.com/sgruhier/jquery-addresspicker). Unfortunately the data returned by Google doesn't include a city but a "locality" or an "administrative area" that doesn't correlate reliably to city names. The localities being returned are more like what we in my home town would call "suburbs". What I need to procure is a city so I can allow users to search all events in their city rather than just the ones in their suburb.
Can anyone offer advice on how I could go about doing this? Many thanks.
Edit: Should maybe add that I'm wanting to do geocoding client-side so I don't run into problems with Google Maps limits or have to pay for geocoding etc.
There are some gems that provide you with that and may others geo related features, like calculating distances.
Here are the 2 most famous: https://github.com/alexreisner/geocoder and https://github.com/imajes/geokit
In the future I highly recommend you to head to https://www.ruby-toolbox.com/ to see what is available as a gem already and see what is the most popular at the moment.
For raw address info, use Google Maps API Reverse Geocoding which accepts lat/lon inputs and returns street address components. Modern browsers support location awareness (geolocation), with user permission, and will give you a lat/lon that "tends to be close" to where the browser is. That will probably get you a correct city/town in most cases.
The maps API is part of Google's broad suite of API tools -- there are gems that handle any Google API (well, most of them), or check out Google Maps for Rails, which will at the very least give you a good head start on how to use the API.
But if you're looking to validate postal code, this method will come up short, since the location awareness will vary in accuracy depending on browser, device (more accurate for mobile), the connection, population density, network coverage, and so on. Also, calling the
If you can get GPS-accurate lat/lon then it will be much more accurate ... except in some cases like in large cities, a single building will have its own postal code, so a few feet one way or the other might matter.

Need to turn query into lat and lon using Bing API, works for some, but not all

General geocoding is not problem. I can put in a city or stae or what ever specific location and usually geocode correctly using Bing. What I cant do is geocode things like intersections or fuzzy locations. My example is "I25 and Colorado blvd". In the Bing Maps site, this has no problem finding exactly what I am looking for. When I use geocode or the bing maps search nothing is found. Anyone have any clues how I can do something like this?
You could start by adding the state and country name in the query.
Also, I assume you're using VEMap.Find, so you may want to try calling the Locations API directly (especially as Find is no longuer available in the most recent version of the Ajax API):
It might give a more explicit error message to help understand why it doesn't return a position.

Resources