controller:MapController source

Dependencies:
NameTypeDescription
$scope service
$q service

promise Q

NavigatorGeolocation service
GeoCoder service
Attr2Options service

convert html attribute to Gogole map api options

Properties:
NameTypeDescription
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

Methods

addObject (groupName, obj)

Add an object to the collection of group

Parameters:
NameTypeDescription
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:
NameTypeDescription
objects Array

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

deleteObject (objs, obj)

Delete an object from the collection and remove from map

Parameters:
NameTypeDescription
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:
NameTypeDescription
string String

an address to find the location

Returns:

latlng the location of the address

observeAttrSetObj (orgAttrs, attrs, obj)

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

Parameters:
NameTypeDescription
orgAttrs Hash

attributes before its initialization

attrs Hash

attributes after its initialization

obj Object

map object that an action is to be done