Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Stlocationrequest | 637 | 4 | 4 years ago | 22 | October 22, 2018 | mit | Swift | |||
Request the Location Services via a 3D 360° flyover MKMapView 🗺 | ||||||||||
Pixel_mapper | 82 | a year ago | mit | Python | ||||||
Semi-automatic mapping of RGB pixels in 3D space using computer vision | ||||||||||
Eeg_positions | 51 | 17 days ago | 2 | June 15, 2022 | bsd-3-clause | Python | ||||
Compute and plot standard EEG electrode positions. | ||||||||||
Simplearandroid | 28 | 7 years ago | apache-2.0 | C++ | ||||||
Augmented reality (AR) app that overlays 3D object in the scene | ||||||||||
Adobeindoornav | 25 | 5 years ago | other | Python | ||||||
Repository of data and tools for the AdobeIndoorNav dataset | ||||||||||
Powerbi Visuals Globemap | 16 | a month ago | 2 | TypeScript | ||||||
A 3D visual using WebGL for plotting locations, with category values displayed as bar heights and heat maps. Shift+Click on bar to change center point. Slicing data points will animate to average location. | ||||||||||
Unity3d Indoor Example | 13 | 5 years ago | 3 | apache-2.0 | C# | |||||
Example of how to use Estimote Indoor Location in Unity 3D | ||||||||||
Android Location Rotation Effect | 12 | 5 years ago | Java | |||||||
Primitive_fitting_3d | 7 | 5 years ago | mit | Python | ||||||
Fitting 3D parameterized volumetric primitives to 3D point clouds | ||||||||||
Air | 7 | 3 years ago | JavaScript | |||||||
2D and 3D visualization of air quality sensor data. |
STLocationRequest is a simple and elegant way to request the users location services at the very first time. The STLocationRequestController
shows a beautiful 3D 360° Flyover-MapView bult on top of FlyoverKit with over 25 cities and landmarks.
STLocationRequest is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'STLocationRequest'
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate STLocationRequest into your Xcode project using Carthage, specify it in your Cartfile
:
github "SvenTiigi/STLocationRequest"
Run carthage update --platform iOS
to build the framework and drag the build:
STLocationRequest.framework
FlyoverKit.framework
into your Xcode project.
On your application targets’ “Build Phases” settings tab, click the “+” icon, choose “New Run Script Phase” and add the Framework paths (for all Frameworks) as mentioned in Carthage Getting started Step 4, 5 and 6
import STLocationRequest
// Initialize STLocationRequestController with STLocationRequestController.Configuration
let locationRequestController = STLocationRequestController { (config: inout STLocationRequestController.Configuration) in
config.title.text = "We need your location for some awesome features"
config.allowButton.title = "Alright"
config.notNowButton.title = "Not now"
config.mapView.alpha = 0.9
config.backgroundColor = UIColor.lightGray
config.authorizeType = .requestWhenInUseAuthorization
}
// Get notified on STLocationRequestController.Events
locationRequestController.onEvent = { event in
if case .locationRequestAuthorized = event {
// Location Request Authorized 🙌
}
}
// Present STLocationRequestController
locationRequestController.present(onViewController: self)
Please keep in mind that the 3D flyover view will only work on a real iOS device (Read more).
The STLocationRequestController
can be customized via the the STLocationRequestController.Configuration
struct. There are plenty of options available 👨💻 More details can be found here
The onEvent
function get invoked if an STLocationRequestController.Event
occured. Simply set an anonymous function of type (Event) -> Void
to evaluate the event.
locationRequestController.onEvent = { (event: STLocationRequestController.Event) in
switch event {
case .locationRequestAuthorized:
break
case .locationRequestDenied:
break
case .notNowButtonTapped:
break
case .didPresented:
break
case .didDisappear:
break
}
}
To perform a location request, define a usage description in your Info.plist
file.
STLocationRequestController.Authorization.requestWhenInUseAuthorization
<key>NSLocationWhenInUseUsageDescription</key>
<string>The usage description</string>
STLocationRequestController.Authorization.requestAlwaysAuthorization
<key>NSLocationAlwaysUsageDescription</key>
<string>The usage description</string>
The usage description will be shown in the default iOS location request dialog after the user taps the allow button.
The recommended way to present STLocationRequestController
is:
if STLocationRequestController.shouldPresentLocationRequestController {
// Location Services are enabled and authorizationStatus is notDetermined
// Ready to present STLocationRequestController
self.presentLocationRequestController()
}
Please keep in mind that the 3D flyover view will only work on a real iOS device with at least iOS 9.0 installed (Apple Developer API Reference). A Screenshot taken from an iOS Simulator running a STLocationRequestController
visualizes the iOS Simulator behaviour.
STLocationRequest
uses the following libraries.
Contributions are very welcome. 🙌 🤓
To run the example Application, generate the Frameworks via Carthage
first.
$ carthage update --platform iOS
$ open STLocationRequest.xcodeproj
STLocationRequest
Copyright (c) 2020 Sven Tiigi <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.