Angular directive

ng-map source

Implementation of {@link __MapController} Initialize a Google map within a <div> tag with given options and register events

Dependencies:
NameTypeDescription
Attr2Options service

convert html attribute to Gogole map api options

Attributes:
NameTypeDescription
geo-callback Expression

if center is an address or current location, the expression is will be executed when geo-lookup is successful. e.g., geo-callback="showMyStoreInfo()"

geo-fallback-center Array

The center of map incase geolocation failed. i.e. [0,0]

geo-location-options Object

The navigator geolocation options. e.g., { maximumAge: 3000, timeout: 5000, enableHighAccuracy: true }. If none specified, { timeout: 5000 }. If timeout not specified, timeout: 5000 added

zoom-to-include-markers Boolean

When true, map boundary will be changed automatially to include all markers when initialized

default-style Boolean

When false, the default styling, display:block;height:300px, will be ignored.

init-event String

The name of event to initialize this map. If given, the map won't be initialized until the event is received. To invoke the event, use $scope.$emit or $scope.$broacast. e.g.,

<MapOption> String

Any Google map options, https://developers.google.com/maps/documentation/javascript/reference?csw=1#MapOptions

<MapEvent> String

Any Google map events, https://rawgit.com/allenhwkim/angularjs-google-maps/master/build/map_events.html

single-info-window Boolean

When true the map will only display one info window at the time, if not set or false, everytime an info window is open it will be displayed with the othe one.

Example
Usage:
  <map MAP_OPTIONS_OR_MAP_EVENTS ..>
    ... Any children directives
  </map>
Example:
  <map center="[40.74, -74.18]" on-click="doThat()">
  </map>
  <map geo-fallback-center="[40.74, -74.18]" zoom-to-inlude-markers="true">
  </map>