service:ngmap.Attr2Options source

Converts html attributes to google api v3 object options

Dependencies:
NameTypeDescription
$parse

angular html parser

$timeout

angular window.setTimeout service

NavigatorGeolocation

Google NavigatorGeolocation wrapper

GeoCoder

Google GeoCoder wrapper

Methods

filter (attrs)

filters attributes by skipping angularjs methods $.. $$..

Parameters:
NameTypeDescription
attrs

tag attributes

Returns:

filterd attributes

getControlOptions (filtered)

Return options of Google map control, i.e streetview, pan, etc, not a general control

Parameters:
NameTypeDescription
filtered

filtered tag attributes

Returns:

Google Map options

getEvents (scope, attrs)

converts attributes hash to scope-specific event function

Parameters:
NameTypeDescription
scope

angularjs scope

attrs

tag attributes

Returns:

events converted events

getOptions (attrs, scope)

converts attributes hash to Google Maps API v3 options

 . converts numbers to number   
 . converts class-like string to google maps instance   
   i.e. `LatLng(1,1)` to `new google.maps.LatLng(1,1)`  
 . converts constant-like string to google maps constant    
   i.e. `MapTypeId.HYBRID` to `google.maps.MapTypeId.HYBRID`   
   i.e. `HYBRID"` to `google.maps.MapTypeId.HYBRID`
Parameters:
NameTypeDescription
attrs

tag attributes

scope

angularjs scope

Returns:

options converted attributess

toOptionValue (input, options)

Convert input to Google Map option input

Parameters:
NameTypeDescription
input

a value to convert

options

to convert the input

Returns:

attributes