The iOS Store Locator Kit is a downloadable project for you to add beautiful plug-and-play Store Locators to your iOS applications. Use the Kit to allow your users to find and browse store locations, view additional info for each store, and preview the distance and route to the store. Not building for a store owner or a business? You can use this project to locate anything from bike share hubs to ATMs to your neighborhood parks. See this tutorial to help you get started!
- Source files for the app
- Five UI themes
- A sample dataset in the form of a GeoJSON file
- Code for retrieving directions to store locations with the Mapbox Directions API
Get started by downloading the project and walking through the step-by-step tutorial. Don't forget your access token.
We built this Kit to cut down on the set-up and development time needed to add a Store Locator into your app. Use our starter themes and features as a plug-and-play solution, or further customize your Store Locator with our flexible build.
Use our pre-built markers, or add in your own by creating your own icon, using your company’s logo, or another open source image.
Customize the style of the interactive scrolling cards (i.e. pop-ups) included in your Store Locator.
Add as many store locations as you wish as a GeoJSON file. Remember that you could use this Kit to locate not just stores, but anything else like bike share hubs, ATMs, parks, or even your friends!
The Kit comes with five UI starter themes, but you can further customize these themes as you see fit. Or create your own custom map styles by using Mapbox Studio to build a style that fits your brand.
The Kit includes the use of the Mapbox Directions API to display estimated travel distances and display driving routes to store locations.
This is the first of several plug-and-play Kits that Mapbox will be releasing to reduce set-up time and make it easy for developers to get up and running with common mapping & location builds. If you have any feedback, questions, or suggestions for future iOS Kits, open an issue for us!
This project was built using Swift 4, Xcode 9, and Mapbox iOS SDK v3.7.0-beta.3. Minimum deployment target is iOS 9. The Mapbox Store Locator currently supports portrait mode.
Steps to run:
-
Install the project's dependencies by using CocoaPods: http://guides.cocoapods.org/using/getting-started.html#installation
-
Add your access token to the project. For more information about access tokens, see: https://www.mapbox.com/ios-sdk/#access_tokens
-
To use one of the provided themes, select a theme from Theme.swift. You can also create your own theme by creating a Theme object.
To draw a route line from the "user's location" to a destination, tap on a store. This uses the Mapbox Directions API. Routes are cached.