Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FindViewControl

LogCamp

FindViewControl is written in Swift

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

pod 'FindViewControl', :git => 'https://github.com/Kruks/FindViewControl.git', :tag => '1.0.12'

Also, add below code at the end of the pod file.

pre_install do |installer|
    def installer.verify_no_static_framework_transitive_dependencies; end
end

Add FindViewControl To Project

Initial Setup:

You need to add GoogleMaps framework manually, for that follow below steps:-

  1. Go to "Pods" project, select target "FindViewControl" goto Build Phases in "Link Binary With Libraries" add GoogleMaps.framework from project.
  2. In build settings of both FindViewControl framework & app target set "Enable Bitcode" to No
  3. Also in Build Settings in "Framework Search Paths", please verify the below two paths are added for both debug & release(If not, add it manually) :-
"${PODS_ROOT}/GoogleMaps/Base/Frameworks"
"${PODS_ROOT}/GoogleMaps/Maps/Frameworks"

Swift Code to plot places From Places API:

(Add this code in viewdidload of viewcontroller)
// Initialize Picker for filter

      let pickerArray = [FilterObject]()
        
        let fobj = FilterObject()
        fobj.filterID = "fire_station"
        fobj.filterValue = "FireStation"
        pickerArray.append(fobj)
        
        let fobj1 = FilterObject()
        fobj1.filterID = "gas_station"
        fobj1.filterValue = "gas_station"
        pickerArray.append(fobj1)

// Init Find Control

 _ =  FindControl.init(viewController: self,googleAPIKey: "AIzXXXXXXXXXXXXXXXXXX8sk",useGooglePlaces: true, filterArray: pickerArray, gisURL: "GIS validation URl", googlePlacesKey: "AIzaXXXXXXXXXXXXXXXXXXFFMc", defaultLattitude: 34.052235, defaultLongitude: -118.243683, defaultAddress: "test", individualMarkersCount: 4)
 

Swift Code to plot places From DB:

Add DB with name "NearBy.sqlite" that contains places list. Also, add markers with names of filter(Ex:- Parking Lots.png)for normal icon & for selected icon add "Selected" title with filter name (Ex:- Parking LotsSelected.png).

(Add this code in viewdidload of viewcontroller)
// Init Find Control

 _ =  FindControl.init(viewController: self, googleAPIKey: "AIzXXXXXXXXXXXXXXXXXX8sk", useGooglePlaces: flase, filterArray: [FilterObject](), gisURL: "GIS validation URl", googlePlacesKey: "", defaultLattitude: 34.052235, defaultLongitude: -118.243683, defaultAddress: "test", individualMarkersCount: 4)
 

Swift Code to add data in DB:

let dataVal = FindHandler().addDataInSqlite(addSqlite: NSDictionary, type: "All")
 

Swift Code to update data in DB:

let dataVal = FindHandler().updateDataInSqlite(updateSqlite: NSDictionary)
 

Swift Code to delete data from DB:

FindHandler().updateDataInSqlite(deleteSqlite: NSArray)
 

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages