MapController()
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 |
Dependencies:
- $scope service
Methods
-
addObject(groupName, obj)
-
Add an object to the collection of group
Parameters:
Name Type Description groupNamethe name of collection that object belongs to
objan object to add into a collection, i.e. marker, shape
-
addObjects(objects)
-
Add collected objects to map
Parameters:
Name Type Description objectsArray 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 objsArray the collection of objects. i.e., map.markers
objObject the object to be removed. i.e., marker
-
getGeoLocation(string) → {Promise}
-
returns the location of an address or 'current-location'
Parameters:
Name Type Description stringString 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 orgAttrsHash attributes before its initialization
attrsHash attributes after its initialization
objObject map object that an action is to be done