Dependencies:
| Name | Type | Description |
|---|---|---|
| $scope | service | |
| $q | service | promise Q |
| NavigatorGeolocation | service | |
| GeoCoder | service | |
| Attr2Options | service | convert html attribute to Gogole map api options |
Properties:
| Name | Type | Description |
|---|---|---|
| controls | Hash | collection of Controls initiated within |
| markers | Hash | collection of Markers initiated within |
| shapes | Hash | collection of shapes initiated within |
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
-
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