All Projects → almassapargali → Locationpicker

almassapargali / Locationpicker

Licence: mit
iOS location picker view controller

Programming Languages

swift
15916 projects

Labels

Projects that are alternatives of or similar to Locationpicker

mbmatch
An MBTiles server for PBF, which is also a map matcher.
Stars: ✭ 34 (-84.96%)
Mutual labels:  map, geo
Mapsui
Mapsui is a .NET Map component for WPF, Xamarin.Forms, Xamarin.Android, Xamarin.iOS and UWP
Stars: ✭ 447 (+97.79%)
Mutual labels:  geo, map
ClimateChangeProjections
An embeddable map that shows climate change projections. How hot will it be by 2070 if we don't do something about it? Accessible at https://climatechange.codeforafrica.org
Stars: ✭ 29 (-87.17%)
Mutual labels:  map, geo
font-gis
Icon font and SVG for use with GIS and spatial analysis tools
Stars: ✭ 121 (-46.46%)
Mutual labels:  map, geo
Geo Data Viewer
🗺️ Geo Data Viewer w/0 Py 🐍 || pyWidgets ⚙️ || pandas 🐼 || @reactjs ⚛️ required to gen. some snazzy maps 🗺️ with keplerGL ...
Stars: ✭ 115 (-49.12%)
Mutual labels:  geo, map
openfairdb
Open Fair DB is the CreativCommons Backend of Kartevonmorgen.org
Stars: ✭ 53 (-76.55%)
Mutual labels:  map, geo
Election Geodata
Precinct shapes (and vote results) for US elections past, present, and future
Stars: ✭ 289 (+27.88%)
Mutual labels:  geo, map
django-leaflet-admin-list
The Django Leaflet Admin List package provides an admin list view featured by the map and bounding box filter for the geo-based data of the GeoDjango.
Stars: ✭ 28 (-87.61%)
Mutual labels:  map, geo
Leaflet Ng2
Angular.io integration of Leaflet
Stars: ✭ 66 (-70.8%)
Mutual labels:  geo, map
Tiledmapview
Tiled map loader for Android , based on the pyramid model, supports a variety of projections, including Web Mercator projection, latitude and longitude projection and custom projection; supports locating, adding layers and overlays. Android瓦片地图加载控件,基于金字塔模型,支持多种投影,包括Web墨卡托投影,经纬度直投及自定义投影等;支持定位,添加图层和覆盖物。
Stars: ✭ 45 (-80.09%)
Mutual labels:  geo, map
d3-geomap
A library for creating geographical maps based on D3.js
Stars: ✭ 124 (-45.13%)
Mutual labels:  map, geo
Openrailwaymap
An OpenStreetMap-based project for creating a map of the world's railway infrastructure.
Stars: ✭ 150 (-33.63%)
Mutual labels:  geo, map
Go Staticmaps
A go (golang) library and command line tool to render static map images using OpenStreetMap tiles.
Stars: ✭ 246 (+8.85%)
Mutual labels:  geo, map
PHPCoord
PHPCoord is a PHP library to aid in handling coordinates. It can convert coordinates for a point from one system to another and also calculate distance between points
Stars: ✭ 78 (-65.49%)
Mutual labels:  map, geo
Highcharts China Geo
Highcharts 中国地图,Highcharts 中国省市地图,Highcharts China Map,南海诸岛geo
Stars: ✭ 29 (-87.17%)
Mutual labels:  geo, map
Openlayers Editor
OpenLayers Editor
Stars: ✭ 138 (-38.94%)
Mutual labels:  geo, map
Awesome Gis
😎Awesome GIS is a collection of geospatial related sources, including cartographic tools, geoanalysis tools, developer tools, data, conference & communities, news, massive open online course, some amazing map sites, and more.
Stars: ✭ 2,582 (+1042.48%)
Mutual labels:  geo, map
Droneworld
droneWorld: a 3D world map and a three.js playground
Stars: ✭ 197 (-12.83%)
Mutual labels:  map
Hamt
Immutable and Memory-Efficient Maps and Sets in Go
Stars: ✭ 213 (-5.75%)
Mutual labels:  map
Atlasr
Atlasr is a truly open-source and free map browser.
Stars: ✭ 196 (-13.27%)
Mutual labels:  map

LocationPicker

LocationPickerViewController is a UIViewController subclass to let users choose locations by searching or selecting on map. It's designed to work as UIImagePickerController.

User can select location either by searching or long pressing on map. In both cases you'll receive CLPlacemark, which contains location coordinates as well as information such as the country, state, city, street address, and POI names.

Installation

Uses Swift 5, use version 1.3.0 for Swift 4.2, 1.0.3 for Swift 3, 0.6.0 for Swift 2.

Carthage

github "almassapargali/LocationPicker"

CocoaPods

pod 'LocationPicker'

Swift Package Manager

Swift Package Manager is a dependency manager built into Xcode. LocationPicker supports SPM from version 1.4.3.

If you are using Xcode 11 or higher, go to File -> Swift Packages -> Add Package Dependency and enter the package repository URL, then follow the instructions.

Screenshots

Map Search Select

Usage

Create a new instance in code (LocationPickerViewController()) or by setting class of UIViewController in Storyboard. Then provide completion block which will be called when user closes view controller.

let locationPicker = LocationPickerViewController()

// you can optionally set initial location
let placemark = MKPlacemark(coordinate: CLLocationCoordinate2D(latitude: 37.331686, longitude: -122.030656), addressDictionary: nil)
let location = Location(name: "1 Infinite Loop, Cupertino", location: nil, placemark: placemark)
locationPicker.location = location

// button placed on right bottom corner
locationPicker.showCurrentLocationButton = true // default: true

// default: navigation bar's `barTintColor` or `UIColor.white`
locationPicker.currentLocationButtonBackground = .blue

// ignored if initial location is given, shows that location instead
locationPicker.showCurrentLocationInitially = true // default: true

locationPicker.mapType = .Standard // default: .Hybrid

// for searching, see `MKLocalSearchRequest`'s `region` property
locationPicker.useCurrentLocationAsHint = true // default: false

locationPicker.searchBarPlaceholder = "Search places" // default: "Search or enter an address"

locationPicker.searchHistoryLabel = "Previously searched" // default: "Search History"

// optional region distance to be used for creation region when user selects place from search results
locationPicker.resultRegionDistance = 500 // default: 600

locationPicker.completion = { location in
    // do some awesome stuff with location
}

navigationController?.pushViewController(locationPicker, animated: true)

License

LocationPicker is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].