Latest 0.3.6
Homepage https://github.com/RajeshwariU/NearbyUserdetails
License MIT
Platforms ios 8.0, requires ARC
Dependencies GoogleMaps, GooglePlaces, SDWebImage
Authors

CI Status
Version
License
Platform

This library is used to find nearby user from your current location with respect to your radius.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • Xcode 6 or later
  • iOS 8 or later

Installation

NearbyUser is available via CocoaPods.

CocoaPods

To install NearbyUser using CocoaPods, add the following line to your Podfile:

pod 'NearbyUserdetails'

Usage

  • Objective C

#import "NearbyUserdetails-Swift.h"

  • Swift

import NearbyUserdetails

How to use

1.Create object for mapManagers class[which is in pod]

Example:
var mapObject = mapManagers()

2.mapManagers class has below method with returntype of GMSMapView
public func initLocationManagerWithRadiusAndMap(getRadius: String, googleMapView: GMSMapView) -> GMSMapView
{
return GMSMapView
}
usage of the above method is:
gMap = mapObject.initLocationManagerWithRadiusAndMap(getRadius: "yourradiusvalue", googleMapView: gMap)
(in viewDidLoad or wherever based on your preference)

3.mapManagers class has following variables:
/// This variable is used to store all user informatiom from json/api
public var userInformation: [[String: String]] = []
/// This variable is used set custom marker image
public var pinImage = UIImage()
/// This variable is used for placeholder image inside the pin image
public var userPlaceholderImage = UIImage()

usage of the above variables is:
mapObject.userInformation = "yourData from api/json"
mapObject.pinImage = UIImage(named: "yourImage")!
mapObject.userPlaceholderImage = UIImage(named: "yourImage")!

4.The following methods to get users and marker within the radius
/// This method is to get all users within the radius
/// – Returns: value in [[String: String]]
public func getAllVisibleUserFromRadius() -> [[String: String]]
{
return [[String: String]]
}

/// This method is to get all markers within the radius
/// – Returns: GMSMarker
public func getAllVisibleMarkerFromRadius() -> [GMSMarker]
{
return [GMSMarker]
}

Note:
gMap – outlet of your GMSMapView[used in your project]
mapObject – instance of mapManagers class

Author

RajeshwariU, [email protected]

License

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

Latest podspec

{
    "name": "NearbyUserdetails",
    "version": "0.3.6",
    "summary": "Used to find the nearby users.",
    "description": "TODO: This library is used to find the nearByUsers from your current location.",
    "homepage": "https://github.com/RajeshwariU/NearbyUserdetails",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "RajeshwariU": "[email protected]"
    },
    "source": {
        "git": "https://github.com/RajeshwariU/NearbyUserdetails.git",
        "tag": "0.3.6"
    },
    "platforms": {
        "ios": "8.0"
    },
    "static_framework": true,
    "source_files": "NearbyUserdetails/Classes/**/*",
    "requires_arc": true,
    "swift_version": "4.0",
    "dependencies": {
        "GoogleMaps": [],
        "GooglePlaces": [],
        "SDWebImage": [
            "~> 4.0"
        ]
    }
}

Pin It on Pinterest

Share This