Is it possible to use MapKit data without using Apple's map? - ios

I want to make a nearby stores app kind of like Yelp but with a unique twist. Since I'm starting on iOS an API like MapKit seems like it would be a good way to get location and other data about nearby businesses. However, I don't want to display a map, I just need precise location data and information about the business. Is there a way to do this with MapKit or should I seek another API?

Yes, you can use MKLocalSearch
but I didn't use it as Apple Maps not that powerful in places that my app will be promoted.
also you can use Foursquare API, pretty much sweet API I used it for my tutorials.
Good luck, if you have any further question just ping me.

Related

Is there any restriction for number of requests in Mapkit and MKDirections?

I used Google Maps API https://maps.googleapis.com/maps/api/directions/json for drawing route and getting direction, but when its usees increases, we have to pay charges.
I check in iOS and get that we use mapkit's MKDirections but I have a question that
Is there any charges for its uses or any limitation?
If there is no limits, is there any the drawbacks of using MapKit?
Is there any cases when Google Maps API become more helpful?
I don't think either is a stronger offering by map quality alone. However, google maps requires expensive fees if you gain scale where as "MapKit is free forever" so that's advantage by Apple. Additionally, MK won't require a heavy third party dependency like GMaps (12+ MB compiled), so that's another advantage Apple. Where GMaps shines is street view and for directions in less urban international places, for example MapKit directions and local places/businesses are fine in the US but I wouldn't rely on them in Argentina or New Zealand.
Another advantage of Mapkit is that MapKit has a much better integration with CoreLocation and CoreAnimation. The “Follow user location” mode is missing in Google Maps; as well, the ability to add advanced animations to annotations (MKAnnotation is represented by a UIView, while a GMSMarker is represented by a UIImage) can give your app an appealing touch that the Google Maps SDK just can’t.
As you are going to show address and picture on the marker, so Apple's Map Kit will be better option to work with.
Show this for more information about Mapkit
Personally I prefer MapKit over Google Maps because of the better integration in iOS, a more powerful API and the better looking map material. However Google maps is in some (or most?) areas better than Apple Maps when it comes map details and correctness. This might change since Apple is creating new map material at the moment. But it will take some time to create new maps for the whole world.
Apple Maps is free. Its included in the package the customer buys when purchasing an Apple product. There is a request limit. I experienced timeouts when sending about 200 Requests / min (for resolving large amounts of addresses). Your requests will work again after 5 min or something. So exceeding the request limit is not that easy and it won't be "banned" for too long.

Indoor mapping in iOS

I have map of my office room. I am trying to implement indoor mapping inside the office room for iOS. I watched the video from the WWDC2014 on Corelocation and indoor mapping. I also have the sample code from them. I am not sure what exactly they mean by "floor plan pixel". I have an image of the office and how can I use the following image to use as the floor plan pixel? I will really appreciate if somebody can guide me how to do or let me know if there are githubs or other resources are doing indoor mapping and tracking in iOS.
Thank you
You will need to apply for your venue to be mapped on Apple's Map Connect Website. You will have to declare that you are the manager for the venue, then instructions will follow. This will involve you providing blueprints for the venue to Apple, locations of Wi-Fi base stations and (possibly) iBeacons. You will have to use Apple's specific app (that you find in the Appstore) to map the venue. When all the process is done, you will be online: you should be able to see your venue in Apple maps and do whatever your need to do.
Having said that, Apple seems, still, focussed on venues that have at least one million visitors per year. If your venue is smaller you are stuck with iBeacons and your own implementation of a positioning / proximity algorithm. Take a look at Open Tagger, as an example in Swift, it will give you an idea of the task and hopefully a very good starting point.
https://github.com/PaoloLongato/open-tagger/tree/github-master

iOS 7 find nearest shops around the actual position

I need to find a way to get an list of shops/bars etc. around the actual position of the device.
I know how to get the position. I also know about the Google API Places. But is there an way to solve this without using third party libraries?
You can use the MKLocalSearch API's in MapKit, but you can only do a search for one type of building at a time.
More details can be found in the MapKit Programming Guide - Enabling Search
Otherwise you would have to gather and store the data yourself and query your own system.

Techniques for offline reverse geocoding on a mobile device?

I am working on a mobile mapping application (currently iOS, eventually Android) - and I am struggling with how to best support reverse geocoding from lat/long to Country/State without using an online service.
Apple's reverse geocoding API depends on Google as the backend, and works great while connected. I could achieve similar functionality using the Open Street Maps project too, or any number of other web services.
What I really want however is to create a C library that I can call even when offline from within my application, passing in the GPS coordinates, and having it return the country and/or state at those coordinates. I do not need finer granularity than state-level, so the dataset is not huge.
I've seen examples of how to do this on a server, but never anything appropriate for a mobile device.
I've heard Spatialite might be a solution, but I am not sure how to get it working on iOS, and I wonder if it may be overkill for the problem.
What are some recommended techniques to accomplish this?
Radven
You will need to get the Shapefiles (lat/lng outline) of all the administrative entities (US states, countries, etc). There are a lot of public domain sources for these. For example, the NOAA has shapefiles for US states and territories you can download:
http://www.nws.noaa.gov/geodata/catalog/national/html/us_state.htm
Once you got the shapefiles, you can use a shapefile reader to test if a lat/lng is within a shape. There are open source readers in C, just google. I seen stuff at sourceforge for shapefiles, but have not used these myself.
The Team at OpenGeoCode.Org
If you're looking for an approach based on a quadtree, try Yggdrasil. It generates a quadtree based on country polygon data. A Ruby example script can be found here.
I can suggest good written offline geocoding 3rd party library.
https://github.com/Alterplay/APOfflineReverseGeocoding

Bing API for finding nearby cities

Is there a Bing API for finding nearby cities given a city name or lat/long combination?
I don't know if Bing provides this, but you build your own from the data available from geonames.org
They provide an API to get places near a given lat/lng: http://api.geonames.org/findNearby?lat=47.3&lng=9&username=demo
Or you can also go all out and implement a solution for your own needs using their data, as per this answer: Given the lat/long coordinates, how can we find out the city/country?
I think this is what you're looking for: Bing Maps API Sample
The short answer is no, there is no Bing API for finding nearby cities.
That said, it would be possible to 'cook your own' using the existing APIs. However, one thing that would need clarification is what 'nearby' means. I presume you mean within a specific radius of a given point (determined by a city name or lat/long combination).
Using the Bing Api it would be fairly trivial to implement an algorithm to reverse geocode a location and then test for places within x distance.
Failing that, you could use something like geoPlugin, it is free and you can put it on your sever - thus avoiding 3rd party up-time issues.
http://www.geoplugin.com/webservices/php#php_class
Take a look at the nearby places features, this does exactly what you want.
http://www.geoplugin.com/webservices/extras
No, there isn't. However, it's relatively simple to get the bounding box for a given coordinate and then use the Bing Maps API with that. I'm doing this and used this solution to get what I needed...
https://stackoverflow.com/a/14314146/73680

Resources