Angular provider

NgMap source

common utility service for ng-map

Methods

addMap (mapController)

Parameters:
NameTypeDescription
mapController __MapContoller

a map controller

Returns:
TypeDescription

promise

deleteMap (mapController)

Parameters:
NameTypeDescription
mapController __MapContoller

a map controller

getGeoLocation (address, options)

Parameters:
NameTypeDescription
address String
options Hash

geo options

Returns:
TypeDescription

promise

getMap (optional,)

Parameters:
NameTypeDescription
optional, String

id e.g., 'foo'

Returns:
TypeDescription

promise

initMap (id)

Parameters:
NameTypeDescription
id

optional, id of the map. default 0

observeAndSet (attrName, object)

Parameters:
NameTypeDescription
attrName String

attribute name

object Object

A Google maps object to be changed

Returns:
TypeDescription

attribue observe function

setDefaultOptions (options)

Example
app.config(function(NgMapProvider) {
   NgMapProvider.setDefaultOptions({
     marker: {
       optimized: false
     }
   });
 });
Parameters:
NameTypeDescription
options Hash

setStyle (map)

set display, width, height of map container element

Parameters:
NameTypeDescription
map HtmlElement

contriner element