Angular provider

NgMap source

common utility service for ng-map

Methods

addMap (mapController)

Parameters:
NameTypeDescription
mapController __MapContoller

a map controller

Returns:

promise

deleteMap (mapController)

Parameters:
NameTypeDescription
mapController __MapContoller

a map controller

getGeoLocation (address, options)

Parameters:
NameTypeDescription
address String
options Hash

geo options

Returns:

promise

getMap (options)

Parameters:
NameTypeDescription
options Hash

optional, e.g., {id: 'foo, timeout: 5000}

Returns:

promise

getNgMapDiv (el)

create a new div inside map tag, so that it does not touch map element and disable drag event for the elmement

Parameters:
NameTypeDescription
el HTMLElemnet

html element

Returns:

map DIV elemnt

getStyle (el, styleProp)

Parameters:
NameTypeDescription
el HTMLElemnet

html element

styleProp String

style property name e.g. 'display'

Returns:

value of property

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:

attribue observe function

setDefaultOptions (options)

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