AngularJS directives for Google Maps
2.0.0 will introduced major changes:
- ui-gmap namespace which will be appended to all directives, services, and factories.
- The main goal for this is to decrease conflicts with external libraries. The other major reason for this is to not conflict with svg definitions like polygon or marker.
- GoogleMapAPI: Is Provider and a Promise at the same time. This allows you to load the Google Maps SDK asynchronously into the DOM. The provider itself is a promise when passed off to the controller. Thefore the API (google and angular-google-maps) is ready on GoogleMapApi.then callback. If your getting nulls on controllers or nulls on google maps objects then this is because you are trying to access things prior to them being initialized. For more details read the website and dig into the code base. Also if your having issues with GoogleMapAPI search closed issues as a lot has been asked about these issues on several closed tickets. Search issues, gitter, and the google plus community!
- Bluebird & JQuery have been removed as dependencies, 👏
These will probably be close to the last 2.0.X releases. Depending on the severity of the bugs other 2.0.X releases may be necessary.
We are tying to figure out if we should just cut the coord and go full bore into 3.0 or ease in via 2.1.X . They both have some commonality in terms of Plural Directives and API clean up. This is why we are asking for votes.
This release is going to be much stricter in terms of when it will be released and allowed features. It will require more specs and will be focusing on bad bugs, unifying the API.
Things to expect:
-
transclusion: Only the map will be transcluded (no more window or windows in markers). This will de-complicate the api tremendously. This will also make it much easier to have one PluralParentModel for the rest of the parents to use. This may be held off for 3.0.X.
-
watches:All directives to be moved to using shallow watches (no equality) and or $watchCollection.
This is currently being discussed internally and will become a public discussion in the next coming weeks. However here are a few items known:
-
drop singular layer directives: Singular directives while being 'angular', are pretty useless for production and performance unless your size is small. To bring focus to the API our goal for layers (shapes, markers, windows) is to make all of the directives plural.
-
remove many watches, from pural directives. We may be de-angularizing somethings to aide in speed. This main change will have to do with watches on models itself. Watchers are a pain, not only are they a performance hit, but it also makes the internals of the api less explicit (where watchers guess and figure out what is going on). We are considering using the control to allow models to be explicitly updated, destroyed, and created. See Polygons.
Overall we are thinking making this a more aggressive follow up to 2.1.X on watches where we just abort using many them. This read, summarizes it best.
This is a directive for AngularJS ~1.0.7+, ~1.2.2+
.
If you plan to hack on the directives or want to run the example, first thing to do is to install NPM dependencies:
npm install #note bower install is run on post install
To build the library after you made changes, simply run grunt:
grunt
If you get errors from jshint
or specs, just add the --force
argument.
grunt mappAll
This will generate source maps for development (angular-google-maps_dev_mapped.js) (non minified) and source maps to minified (angular-google-maps_dev_mapped.min.js) files. They each have their own corresponding map files. To get the coinciding source files you will need to copy the generated /tmp
directory (currently not under scc).
To run the example page, just run
grunt example
and open your browser on http://localhost:3000/example.html
.
The various directives are documented at official site.
Filing issues: Prior to submiting an issue:
- Search open/closed issues, src examples (./examples), gitter, and then google plus community! Again please search!
- issues w/ plnkrs get attention quicker
Pull requests more than welcome! If you're adding new features, it would be appreciated if you would provide some docs about the feature. This can be done either by adding a card to our Waffle.io board, forking the website branch and issuing a PR with the updated documentation page, or by opening an issue for us to add the documentation to the site.
Branching Model w Git Flow We are trying to follow the git flow branching model where all bugs that are considered urgent / patches will be pull requested against master. If the PR (pull request) is an improvement and a non urgent fix it will go towards develop which is the working(SNAPSHOT) next version of what master will be.
When patches and bugs are rolled into master they will be immediatley rolled into develop as well. Where the flow is PR(bug fix) -> merge master -> merge develop .