controller: MapController

MapController

MapController()

Properties:
Name Type Description
controls Hash

collection of Controls initiated within map directive

markers Hash

collection of Markers initiated within map directive

shapes Hash

collection of shapes initiated within map directive

Dependencies:
  • $scope service

Methods

addObject(groupName, obj)

Add an object to the collection of group

Parameters:
Name Type Description
groupName

the name of collection that object belongs to

obj

an object to add into a collection, i.e. marker, shape

addObjects(objects)

Add collected objects to map

Parameters:
Name Type Description
objects Array

the collection of objects. i.e., map.markers

deleteObject(objs, obj)

Delete an object from the collection and remove from map

Parameters:
Name Type Description
objs Array

the collection of objects. i.e., map.markers

obj Object

the object to be removed. i.e., marker

getGeoLocation(string) → {Promise}

returns the location of an address or 'current-location'

Parameters:
Name Type Description
string String

an address to find the location

Returns:

latlng the location of the address

Type
Promise

observeAttrSetObj(orgAttrs, attrs, obj)

watch changes of attribute values and do appropriate action based on attribute name

Parameters:
Name Type Description
orgAttrs Hash

attributes before its initialization

attrs Hash

attributes after its initialization

obj Object

map object that an action is to be done