Allow users to input the location of an event IOS - ios

I am trying to construct an app for IOS 8 using swift in which users have the ability to post the location of an event, and people within a certain distance have the opportunity to see it based on their current location.
After looking around for awhile, I am getting the notion that this is not possible. I know it is possible if it is based on the user that posts current location (Yik Yak), but I am not if there is a way to let them actually input an address with maps.
Does anyone have a potential answer to this?
Thanks!

You can certainly have a user insert locations and such by importing MapKit.

Related

Check if the user's location is in India

I would like to check if the user's country is in India. How can I do that in Swift? What library can I use do accomplish this task? I want to do this to display different prices for India users as a test.
I think I figured it out. Is it NSLocale.current.regionCode. Is so what's the code for India?
I don't know much about Swift, but I think this might help:
To get a user's current location, you'll first need to import MapKit and CoreLocation in the top of your view controller. You will have to decide whether your application will need the users location always (even when in it's in the background) or only when the apps in use.
-How to get Current Location in Swift

Proximity Based Search without user location swift

I'm working on an app which utilizes Google Places API in order to find locations based on a users search. I've implemented the search with the help of the UIAutocomplete (Google Places), but unfortunately, it is not location based (until the user provides authorization). I was wondering if there is a way to get the users location through their IP address or otherwise using Swift. I don't need a precise location, the city would be enough.
I've searched for a while and there doesn't seem to be any other way of doing this, so if you know of an API which can return the city the user is currently in, that would be great.
Thanks for all the help,
Vlad
I don't think the system frameworks allow you to get the user's remote IP address anymore. A solution for you might be to use a website like http://mylocation.org/, which shows your IP address and location. Perhaps you can make a request to this website and parse out the HTML that comes back to get the location. Please note, this isn't the most accurate way of getting the user's location and you would be much better off using the CoreLocation framework.

Obtaining locations around user API?

I'm attempting to retrieve locations around a user upon retrieving their current location. Is anyone familiar with which API's/Frameworks are best to accomplish this? I've tried Foursquare2 but it seems that half the locations don't return addresses. I need a better API to use, preferably one that will return addresses, and can't seem to find any others. I came across Google Places, but it appears to be in beta and not available unless I submit a form and wait. Is there a way to do this with Google Maps or the Facebook graph perhaps?
Depending on which device you use. For example if you want to retrieve location data from android use this api, for an ios device, use read the my location section in this doc. Hope this gives you some idea.

Ruby on Rails and gmap location

I come here to ask you some informations or maybe help to try to do what i want.
Here it's what i want to realize:
I have a website and on it i have some places in database (with lattitude and longitude saved). I want allow users, when they click on a button, display a map with a marker on their actual position and others markers who will represent the places from the database near them.
I found some tools like google map API v3. With it i can show the user position but i don't know how i can display the position of the places store in my database.
If you have any ideas or examples.
Thank you.
(PS: Sorry for my english)
I built a similar app with Spring and Java. What you'll have to do is create Placemark JS objects and pass them to the Google Maps API. You can also pass a map size to determine the scope of the map returned to the user.
In order to determine nearby locations, simply build some ruby/rails code to limit the distance of locations from the user location.
Get user location
Determine which locations to show on map within your rails app
Pass desired placemarks to Google Maps (This can be found in API docs which are great)
Display the map returned by Google Maps on a view.
I think you could use geocoder gem for that:
http://www.rubygeocoder.com/

Options for displaying multiple routes on iPhone Map (iOS 4+)

I am trying to develop an iPhone app (with map routing function), and I need everyone's suggestions (guidance).
Below are a few specs:
The app will be running on iPhone with iOS 4+.
The app will have Map functionality.
In the app, given a "few locations" in a given order (to make things less complicated), the Map will draw routes between each locations on the Map.
Clicking on any location will display another page that shows some information about that location.
Can choose alternative route between two location (which I don't think is possible, but let me know if anyone know any framework that can do this).
I did some research, using Map on iPhone is easy using MapKit (and it's available after iOS 3.0). I followed this tutorial, and everything seems easy. However, if I want to draw routes on my map, I will need routes data in a CSV format. However, I do not have those data (yes! I suck).
And prior to iOS 5.1, MapKit use Google Maps, and I read somewhere that in Google Map's term and condition of use, it prohibit people from drawing on the Map (correct me if I am wrong).
In order to retrieve route data, I would imagine that I will have to get it through Google or Apple (I don't know if it's possible). I'm just wondering if Apple Map or Google Map have API to retrieve these?
If not, an alternative I came up with is to use a webview, and display my Map routes on Google Map. I'm just wondering if Google Map API will allow me to insert multiple locations and display all the routes?
I really need some suggestions... I am getting buried in all these problems.... thank you
Follow this sample - MKOverlay is the way to go. One more example is here.

Resources