Angular provider
NgMap source
common utility service for ng-map
Methods
-
addMap (mapController)
-
Parameters:
Name Type Description mapController __MapContoller a map controller
Returns:
Type Description promise
-
deleteMap (mapController)
-
Parameters:
Name Type Description mapController __MapContoller a map controller
-
getGeoLocation (address, options)
-
Parameters:
Name Type Description address String options Hash geo options
Returns:
Type Description promise
-
getMap (optional,)
-
Parameters:
Name Type Description optional, String id e.g., 'foo'
Returns:
Type Description promise
-
initMap (id)
-
Parameters:
Name Type Description id optional, id of the map. default 0
-
observeAndSet (attrName, object)
-
Parameters:
Name Type Description attrName String attribute name
object Object A Google maps object to be changed
Returns:
Type Description attribue observe function
-
setDefaultOptions (options)
-
Example
app.config(function(NgMapProvider) { NgMapProvider.setDefaultOptions({ marker: { optimized: false } }); });
Parameters:
Name Type Description options Hash
-
setStyle (map)
-
set display, width, height of map container element
Parameters:
Name Type Description map HtmlElement contriner element