├── .gitattributes ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTORS.md ├── ISSUE_TEMPLATE.md ├── LICENSE ├── README.md ├── app.js ├── bower.json ├── build ├── docs │ ├── Attr2MapOptions.html │ ├── GeoCoder.html │ ├── GoogleMapsApi.html │ ├── NavigatorGeolocation.html │ ├── NgMap.html │ ├── NgMapPool.html │ ├── StreetView.html │ ├── bicycling-layer.html │ ├── css │ │ ├── prettify-tomorrow.css │ │ ├── prettify.css │ │ └── site.css │ ├── custom-control.html │ ├── directions.html │ ├── drawing-manager.html │ ├── dynamic-maps-engine-layer.html │ ├── fusion-tables-layer.html │ ├── heatmap-layer.html │ ├── index.html │ ├── info-window.html │ ├── js │ │ ├── angular.min.js │ │ ├── prettify.js │ │ └── site.js │ ├── kml-layer.html │ ├── map-data.html │ ├── map-lazy-load.html │ ├── map-type.html │ ├── maps-engine-layer.html │ ├── marker.html │ ├── ngMap.ng-map.html │ ├── ngmap.custom-marker.html │ ├── overlay-map-type.html │ ├── places-auto-complete.html │ ├── shape.html │ ├── source │ │ ├── Attr2MapOptions.html │ │ ├── GeoCoder.html │ │ ├── GoogleMapsApi.html │ │ ├── NavigatorGeolocation.html │ │ ├── NgMap.html │ │ ├── NgMapPool.html │ │ ├── StreetView.html │ │ ├── bicycling-layer.html │ │ ├── custom-control.html │ │ ├── directions.html │ │ ├── drawing-manager.html │ │ ├── dynamic-maps-engine-layer.html │ │ ├── fusion-tables-layer.html │ │ ├── heatmap-layer.html │ │ ├── info-window.html │ │ ├── kml-layer.html │ │ ├── map-data.html │ │ ├── map-lazy-load.html │ │ ├── map-type.html │ │ ├── maps-engine-layer.html │ │ ├── marker.html │ │ ├── ngMap.ng-map.html │ │ ├── ngmap.custom-marker.html │ │ ├── overlay-map-type.html │ │ ├── places-auto-complete.html │ │ ├── shape.html │ │ ├── streetview-panorama.html │ │ ├── traffic-layer.html │ │ └── transit-layer.html │ ├── streetview-panorama.html │ ├── traffic-layer.html │ └── transit-layer.html └── scripts │ ├── ng-map.debug.js │ ├── ng-map.js │ ├── ng-map.min.js │ └── ng-map.no-dependency.js ├── config ├── jsdoc │ ├── plugins │ │ └── angular.js │ └── template │ │ ├── README.md │ │ ├── publish.js │ │ ├── static │ │ ├── scripts │ │ │ ├── linenumber.js │ │ │ └── prettify │ │ │ │ ├── Apache-License-2.0.txt │ │ │ │ ├── lang-css.js │ │ │ │ └── prettify.js │ │ └── styles │ │ │ ├── jsdoc-default.css │ │ │ ├── prettify-jsdoc.css │ │ │ └── prettify-tomorrow.css │ │ └── tmpl │ │ ├── container.tmpl │ │ ├── details.tmpl │ │ ├── example.tmpl │ │ ├── examples.tmpl │ │ ├── exceptions.tmpl │ │ ├── layout.tmpl │ │ ├── mainpage.tmpl │ │ ├── members.tmpl │ │ ├── method.tmpl │ │ ├── params.tmpl │ │ ├── properties.tmpl │ │ ├── returns.tmpl │ │ ├── source.tmpl │ │ ├── tutorial.tmpl │ │ └── type.tmpl ├── karma.conf.js └── protractor.conf.js ├── contributors.js ├── controllers └── map-controller.js ├── directives ├── bicycling-layer.js ├── custom-control.js ├── custom-marker.js ├── directions.js ├── drawing-manager.js ├── dynamic-maps-engine-layer.js ├── fusion-tables-layer.js ├── heatmap-layer.js ├── info-window.js ├── kml-layer.js ├── map-data.js ├── map-lazy-load.js ├── map-type.js ├── map.js ├── maps-engine-layer.js ├── marker.js ├── overlay-map-type.js ├── places-auto-complete.js ├── shape.js ├── street-view-panorama.js ├── traffic-layer.js └── transit-layer.js ├── favicon.ico ├── filters ├── camel-case.js ├── escape-regexp.js └── jsonize.js ├── gulpfile.js ├── index.js ├── package.js ├── package.json ├── road-trip.md ├── services ├── attr2-map-options.js ├── geo-coder.js ├── google-maps-api.js ├── navigator-geolocation.js ├── ng-map-pool.js ├── ng-map.js └── street-view.js ├── spec ├── TODO ├── directives │ ├── map_controller_spec_back.js │ ├── map_spec_bak.js │ ├── marker_spec_bak.js │ ├── shape_spec_bak.js │ └── street_view_panorama_spec_bak.js ├── e2e │ └── testapp_spec.js ├── lib │ ├── angular-mocks.js │ ├── angular.js │ └── markerclusterer.js └── services │ ├── attr2_options_spec.js │ ├── geo_coder_spec.js │ ├── navigator_geolocation_spec.js │ ├── ng-map-pool-spec.js │ └── street_view_spec.js └── testapp ├── USGSOverlay.js ├── aerial-rotate.html ├── aerial-simple.html ├── all-examples.html ├── all-examples.json ├── app.js ├── build ├── circle-simple.html ├── control-custom-state.html ├── control-custom.html ├── control-disableUI.html ├── control-options.html ├── control-positioning.html ├── control-simple.html ├── custom-control.html ├── custom-marker-2.html ├── custom-marker-clusterer.html ├── custom-marker-custom-style.html ├── custom-marker-ng-repeat.html ├── custom-marker-two-way-binding.html ├── custom-marker.css ├── custom-marker.html ├── directions-with-current-location.html ├── directions-with-custom-marker.html ├── directions-with-ng-repeat-panels.html ├── directions.html ├── directions2.html ├── drawing-manager.html ├── event-arguments.html ├── event-domlistener.html ├── event-properties.html ├── event-simple.html ├── events.html ├── geojson.html ├── groundoverlay-simple.html ├── gulpfile.js ├── heatmap.json ├── icon-complex.html ├── icon-simple.html ├── images ├── beachflag.png └── spinner.gif ├── infowindow-simple-max.html ├── infowindow-simple.html ├── infowindow-template.html ├── infowindow_compile.html ├── infowindow_geolookup.html ├── infowindow_ng_click.html ├── layer-bicycling.html ├── layer-data-dynamic.html ├── layer-data-quakes-advanced.html ├── layer-data-quakes-default.html ├── layer-data-quakes-simple.html ├── layer-data-simple.html ├── layer-data-style.html ├── layer-dynamicmapsengine.html ├── layer-fusiontables-heatmap.html ├── layer-fusiontables-query.html ├── layer-fusiontables-simple.html ├── layer-fusiontables-styling.html ├── layer-georss.html ├── layer-heatmap.html ├── layer-kml-features.html ├── layer-kml.html ├── layer-mapsengine.html ├── layer-style-event.html ├── layer-traffic.html ├── layer-transit.html ├── lib ├── angular-ui-router.js ├── angular.js ├── angular.min.js ├── bootstrap.min.css ├── prettify-tomorrow-night.css ├── prettify-tomorrow.css └── prettify.js ├── map-coordinates.html ├── map-geolocation.html ├── map-gulp-usemin.html ├── map-gulp-usemin ├── map-gulp-usemin.html └── myapp.min.js ├── map-initialized-callback.html ├── map-initialized.html ├── map-lazy-inint.html ├── map-lazy-load-params.html ├── map-projection-simple.html ├── map-simple.html ├── map-with-dynamic-id.html ├── map_app.html ├── map_control.html ├── map_events.html ├── map_fit_bounds.html ├── map_geo_fallback_center.html ├── map_no_default_style.html ├── map_options.html ├── map_with_address.html ├── map_with_current_position.html ├── map_with_dynamic_address.html ├── map_with_dynamic_center.html ├── map_zoom_to_include_markers.html ├── mapsenginelayer-noauth-layerid.html ├── mapsenginelayer-noauth-layerkey.html ├── maptype-base.html ├── maptype-image-overlay.html ├── maptype-image.html ├── maptype-overlay.html ├── maptype-styled-complex.html ├── maptype-styled-simple.html ├── marker-animations-iteration.html ├── marker-animations.html ├── marker-clusterer.html ├── marker-remove.html ├── marker-simple.html ├── marker-symbol-custom.html ├── marker-symbol-predefined.html ├── marker-with-default-options.html ├── marker.html ├── marker_data_with_ng_repeat.html ├── marker_dynamic_ng_repeat.html ├── marker_icon.html ├── marker_on_street_view.html ├── marker_with_address.html ├── marker_with_current_position.html ├── marker_with_dynamic_address.html ├── marker_with_ng_repeat_dynamic.html ├── marker_with_ng_repeat_no_watcher.html ├── marker_with_parent_controller.html ├── multiple_maps_on_a_page.html ├── overlay-custom.html ├── overlay-hideshow.html ├── overlay-remove.html ├── overlay-simple.html ├── overlay-symbol-animate.html ├── overlay-symbol-arrow.html ├── overlay-symbol-custom.html ├── overlay-symbol-dashed.html ├── partials └── custom-info-window-template.html ├── places-auto-complete-strictbounds-circle.html ├── places-auto-complete-strictbounds-rect.html ├── places-auto-complete-strictbounds.html ├── places-auto-complete.html ├── polygon-arrays.html ├── polygon-autoclose.html ├── polygon-draggable.html ├── polygon-simple.html ├── polyline-complex.html ├── polyline-remove.html ├── polyline-simple.html ├── rectangle-event.html ├── rectangle-simple.html ├── rectangle-zoom.html ├── script-tags-for-development.js ├── scripts ├── get-starbucks.js ├── markerclusterer.js ├── markerclusterer_packed.js ├── markers.js ├── quakes.geo.json └── starbucks.json ├── shape.html ├── shape_circle_with_current_position.html ├── shape_circle_with_dynamic_address.html ├── shape_with_ng_repeat.html ├── street-view-panorama.html ├── street-view-panorama_container.html ├── street-view-panorama_container2.html ├── street-view_road_trip.html ├── taxi-data.js ├── ui-bootstrap.html ├── ui-router.html ├── ui-router2.html ├── us-states-20m.json └── user-editable-shapes.html /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | nohup.out 3 | node_modules 4 | tmp 5 | *.log 6 | gh-pages 7 | .idea/ 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "6.9" 4 | script: 5 | - "gulp test" 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Release Notes 2 | =============== 3 | 4 | # 1.17.0 5 | 6 | * UMD 7 | 8 | # 1.15.0 9 | 10 | * All attributes can have `{{}}` expression evaluated. 11 | 12 | # 1.14.0 13 | 14 | * Prepared for Angular2 transition by removing all scopes 15 | * NgMap service is introduced 16 | * Refactored 17 | 18 | # 1.13.0 19 | 20 | * New directive `custom-marker` 21 | 22 | # 1.12.0 23 | 24 | * Refactored documentation with angular-jsdoc 25 | 26 | # 1.10.0 27 | 28 | * Added an event `objectChanged` to broadcast change of objects in map. e.g., markers, shapes, etc 29 | 30 | # 1.9.0 31 | 32 | * Refactored directory structure 33 | 34 | # 1.7.0 35 | 36 | * added **directions** directive 37 | [Example](https://rawgit.com/allenhwkim/angularjs-google-maps/master/testapp/directions.html) 38 | * added **places-auto-complete** for input tag. 39 | [Example](https://rawgit.com/allenhwkim/angularjs-google-maps/master/testapp/places-auto-complete.html) 40 | 41 | # 1.6.0 42 | 43 | * added **street-view-panorama** directive with its examples; 44 | [street view with marker](https://rawgit.com/allenhwkim/angularjs-google-maps/master/testapp/street-view-panorama.html) and 45 | [street view in its own container](https://rawgit.com/allenhwkim/angularjs-google-maps/master/testapp/street-view-panorama_container.html) 46 | 47 | # 1.5.0 48 | 49 | * added **geo-callback attribute** for map, marker, shape, and info-window. 50 | [Example](https://rawgit.com/allenhwkim/angularjs-google-maps/master/testapp/map_with_current_position.html) 51 | 52 | # 1.4.0 53 | 54 | * support lazy loading of maps js with directive, **map-lazy-load**, which does not require to `https://maps.google.com/maps/api/js` 55 | [Example](https://rawgit.com/allenhwkim/angularjs-google-maps/master/testapp/map-lazy-load.html) 56 | 57 | # 1.3.0 58 | 59 | * added **drawing-manager** directive. Thanks to Fangming Du 60 | [Example](https://rawgit.com/allenhwkim/angularjs-google-maps/master/testapp/drawing-manager.html) 61 | 62 | # 1.2.0 63 | 64 | * events with `controller as` syntax, thanks to Simon 65 | 66 | # 1.1.0 67 | 68 | * marker directive can have icon attribute as JSON 69 | * map with init-event attribute for initialization by an event 70 | 71 | # 1.0.0 72 | * Cover all official google maps v3 examples using directives. 73 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **IMPORTANT**: 2 | 3 | This repository's issues are reserved for feature requests and bug reports. 4 | Do not submit support questions or request here. Please use stackoverflow instead 5 | 6 | 7 | **Steps to reproduce and a minimal demo(Plunker Example)** 8 | 9 | - _What steps should we try in your demo to see the problem?_ 10 | 11 | **Current behavior** 12 | 13 | - 14 | 15 | **Expected/desired behavior** 16 | 17 | - 18 | 19 | **Other information** 20 | 21 | - 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014, 2015, 2016 Allen Kim 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * AngularJS Google Maps 3 | * 4 | * The MIT License (MIT) 5 | * 6 | * Copyright (c) 2014, 2015, 1016 Allen Kim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 9 | * this software and associated documentation files (the "Software"), to deal in 10 | * the Software without restriction, including without limitation the rights to 11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 12 | * the Software, and to permit persons to whom the Software is furnished to do so, 13 | * subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 21 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 22 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 23 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | */ 25 | angular.module('ngMap', []); 26 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ngmap", 3 | "version": "1.18.4", 4 | "main": "./build/scripts/ng-map.js", 5 | "homepage": "https://github.com/allenhwkim/angularjs-google-maps", 6 | "authors": [ 7 | "Allen Kim " 8 | ], 9 | "description": "The Simplest AngularJs Google Maps V3 Directive Module", 10 | "keywords": [ 11 | "angularjs", 12 | "angularjs-directive", 13 | "google-maps" 14 | ], 15 | "license": "MIT" 16 | } 17 | -------------------------------------------------------------------------------- /build/docs/css/prettify.css: -------------------------------------------------------------------------------- 1 | /* Pretty printing styles. Used with prettify.js. */ 2 | 3 | /* SPAN elements with the classes below are added by prettyprint. */ 4 | .pln { color: #000 } /* plain text */ 5 | 6 | @media screen { 7 | .str { color: #080 } /* string content */ 8 | .kwd { color: #008 } /* a keyword */ 9 | .com { color: #800 } /* a comment */ 10 | .typ { color: #606 } /* a type name */ 11 | .lit { color: #066 } /* a literal value */ 12 | /* punctuation, lisp open bracket, lisp close bracket */ 13 | .pun, .opn, .clo { color: #660 } 14 | .tag { color: #008 } /* a markup tag name */ 15 | .atn { color: #606 } /* a markup attribute name */ 16 | .atv { color: #080 } /* a markup attribute value */ 17 | .dec, .var { color: #606 } /* a declaration; a variable name */ 18 | .fun { color: red } /* a function name */ 19 | } 20 | 21 | /* Use higher contrast and text-weight for printable form. */ 22 | @media print, projection { 23 | .str { color: #060 } 24 | .kwd { color: #006; font-weight: bold } 25 | .com { color: #600; font-style: italic } 26 | .typ { color: #404; font-weight: bold } 27 | .lit { color: #044 } 28 | .pun, .opn, .clo { color: #440 } 29 | .tag { color: #006; font-weight: bold } 30 | .atn { color: #404 } 31 | .atv { color: #060 } 32 | } 33 | 34 | /* Put a border around prettyprinted code snippets. */ 35 | pre.prettyprint { padding: 2px; border: 1px solid #888 } 36 | 37 | /* Specify class=linenums on a pre to get line numbering */ 38 | ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ 39 | li.L0, 40 | li.L1, 41 | li.L2, 42 | li.L3, 43 | li.L5, 44 | li.L6, 45 | li.L7, 46 | li.L8 { list-style-type: none } 47 | /* Alternate shading for lines */ 48 | li.L1, 49 | li.L3, 50 | li.L5, 51 | li.L7, 52 | li.L9 { background: #eee } 53 | -------------------------------------------------------------------------------- /build/docs/js/site.js: -------------------------------------------------------------------------------- 1 | // Filter UI 2 | var tocElements = document.getElementById('toc').getElementsByTagName('a'); 3 | document.getElementById('filter-input').addEventListener('keyup', function(e) { 4 | 5 | var i, element; 6 | 7 | // enter key 8 | if (e.keyCode === 13) { 9 | // go to the first displayed item in the toc 10 | for (i = 0; i < tocElements.length; i++) { 11 | element = tocElements[i]; 12 | if (!element.classList.contains('hide')) { 13 | location.replace(element.href); 14 | return e.preventDefault(); 15 | } 16 | } 17 | } 18 | 19 | var match = function() { return true; }, 20 | value = this.value.toLowerCase(); 21 | 22 | if (!value.match(/^\s*$/)) { 23 | match = function(text) { return text.toLowerCase().indexOf(value) !== -1; }; 24 | } 25 | 26 | for (i = 0; i < tocElements.length; i++) { 27 | element = tocElements[i]; 28 | if (match(element.innerHTML)) { 29 | element.classList.remove('hide'); 30 | } else { 31 | element.classList.add('hide'); 32 | } 33 | } 34 | }); 35 | -------------------------------------------------------------------------------- /config/jsdoc/plugins/angular.js: -------------------------------------------------------------------------------- 1 | exports.defineTags = function(dictionary) { 2 | dictionary.defineTag('ngdoc', { 3 | mustHaveValue: true, 4 | onTagged : function(doclet, tag) { 5 | doclet.addTag('kind', 'class'); 6 | doclet.ngdoc = tag.value; 7 | } 8 | }); 9 | }; 10 | -------------------------------------------------------------------------------- /config/jsdoc/template/README.md: -------------------------------------------------------------------------------- 1 | The default template for JSDoc 3 uses: [the Taffy Database library](http://taffydb.com/) and the [Underscore Template library](http://documentcloud.github.com/underscore/#template). 2 | -------------------------------------------------------------------------------- /config/jsdoc/template/static/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (function() { 3 | var source = document.getElementsByClassName('prettyprint source linenums'); 4 | var i = 0; 5 | var lineNumber = 0; 6 | var lineId; 7 | var lines; 8 | var totalLines; 9 | var anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = 'line' + lineNumber; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /config/jsdoc/template/static/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /config/jsdoc/template/static/styles/prettify-jsdoc.css: -------------------------------------------------------------------------------- 1 | /* JSDoc prettify.js theme */ 2 | 3 | /* plain text */ 4 | .pln { 5 | color: #000000; 6 | font-weight: normal; 7 | font-style: normal; 8 | } 9 | 10 | /* string content */ 11 | .str { 12 | color: #006400; 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | 17 | /* a keyword */ 18 | .kwd { 19 | color: #000000; 20 | font-weight: bold; 21 | font-style: normal; 22 | } 23 | 24 | /* a comment */ 25 | .com { 26 | font-weight: normal; 27 | font-style: italic; 28 | } 29 | 30 | /* a type name */ 31 | .typ { 32 | color: #000000; 33 | font-weight: normal; 34 | font-style: normal; 35 | } 36 | 37 | /* a literal value */ 38 | .lit { 39 | color: #006400; 40 | font-weight: normal; 41 | font-style: normal; 42 | } 43 | 44 | /* punctuation */ 45 | .pun { 46 | color: #000000; 47 | font-weight: bold; 48 | font-style: normal; 49 | } 50 | 51 | /* lisp open bracket */ 52 | .opn { 53 | color: #000000; 54 | font-weight: bold; 55 | font-style: normal; 56 | } 57 | 58 | /* lisp close bracket */ 59 | .clo { 60 | color: #000000; 61 | font-weight: bold; 62 | font-style: normal; 63 | } 64 | 65 | /* a markup tag name */ 66 | .tag { 67 | color: #006400; 68 | font-weight: normal; 69 | font-style: normal; 70 | } 71 | 72 | /* a markup attribute name */ 73 | .atn { 74 | color: #006400; 75 | font-weight: normal; 76 | font-style: normal; 77 | } 78 | 79 | /* a markup attribute value */ 80 | .atv { 81 | color: #006400; 82 | font-weight: normal; 83 | font-style: normal; 84 | } 85 | 86 | /* a declaration */ 87 | .dec { 88 | color: #000000; 89 | font-weight: bold; 90 | font-style: normal; 91 | } 92 | 93 | /* a variable name */ 94 | .var { 95 | color: #000000; 96 | font-weight: normal; 97 | font-style: normal; 98 | } 99 | 100 | /* a function name */ 101 | .fun { 102 | color: #000000; 103 | font-weight: bold; 104 | font-style: normal; 105 | } 106 | 107 | /* Specify class=linenums on a pre to get line numbering */ 108 | ol.linenums { 109 | margin-top: 0; 110 | margin-bottom: 0; 111 | } 112 | -------------------------------------------------------------------------------- /config/jsdoc/template/tmpl/example.tmpl: -------------------------------------------------------------------------------- 1 | 2 |
3 | -------------------------------------------------------------------------------- /config/jsdoc/template/tmpl/examples.tmpl: -------------------------------------------------------------------------------- 1 | 8 |

9 | 10 |
11 | -------------------------------------------------------------------------------- /config/jsdoc/template/tmpl/exceptions.tmpl: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |
7 |
8 | 9 |
10 |
11 |
12 |
13 |
14 | Type 15 |
16 |
17 | 18 |
19 |
20 |
21 |
22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | -------------------------------------------------------------------------------- /config/jsdoc/template/tmpl/layout.tmpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JSDoc: <?js= title ?> 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 |

21 | 22 | 23 |
24 | 25 | 28 | 29 |
30 | 31 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /config/jsdoc/template/tmpl/mainpage.tmpl: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 |

8 | 9 | 10 | 11 |
12 |
13 |
14 | 15 | -------------------------------------------------------------------------------- /config/jsdoc/template/tmpl/members.tmpl: -------------------------------------------------------------------------------- 1 | 5 |
6 |

7 | 8 | 9 |

10 | 11 |
12 |
13 | 14 |
15 | 16 |
17 | 18 | 19 | 20 |
Type:
21 | 26 | 27 | 28 | 29 | 30 | 31 |
Fires:
32 | 35 | 36 | 37 | 38 |
Example 1? 's':'' ?>
39 | 40 | 41 |
42 | -------------------------------------------------------------------------------- /config/jsdoc/template/tmpl/returns.tmpl: -------------------------------------------------------------------------------- 1 | 5 |
6 | 7 |
8 | 9 | 10 | 11 |
12 |
13 | Type 14 |
15 |
16 | 17 |
18 |
19 | -------------------------------------------------------------------------------- /config/jsdoc/template/tmpl/source.tmpl: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 |
7 |
8 |
-------------------------------------------------------------------------------- /config/jsdoc/template/tmpl/tutorial.tmpl: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 0) { ?> 5 |
    8 |
  • 9 |
10 | 11 | 12 |

13 |
14 | 15 |
16 | 17 |
18 | 19 |
20 | -------------------------------------------------------------------------------- /config/jsdoc/template/tmpl/type.tmpl: -------------------------------------------------------------------------------- 1 | 5 | 6 | | 7 | -------------------------------------------------------------------------------- /config/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Mon Jun 23 2014 15:46:44 GMT-0400 (EDT) 3 | 4 | module.exports = function(config) { 5 | config.set({ 6 | 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '../', 9 | 10 | 11 | // frameworks to use 12 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 13 | frameworks: ['jasmine'], 14 | 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | // libraries 19 | 'http://maps.google.com/maps/api/js', 20 | 'spec/lib/angular.js', 21 | 'spec/lib/angular-mocks.js', 22 | 23 | // our app 24 | 'app.js', 25 | 'controllers/*.js', 26 | 'directives/*.js', 27 | 'filters/*.js', 28 | 'services/*.js', 29 | 30 | // tests 31 | 'spec/services/*.js' 32 | ], 33 | 34 | 35 | // list of files to exclude 36 | exclude: [ ], 37 | 38 | 39 | // preprocess matching files before serving them to the browser 40 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 41 | preprocessors: { }, 42 | 43 | 44 | // test results reporter to use 45 | // possible values: 'dots', 'progress' 46 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 47 | reporters: ['progress'], 48 | 49 | 50 | // web server port 51 | port: 9876, 52 | 53 | 54 | // enable / disable colors in the output (reporters and logs) 55 | colors: true, 56 | 57 | 58 | // level of logging 59 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 60 | logLevel: config.LOG_INFO, 61 | 62 | 63 | // enable / disable watching file and executing tests whenever any file changes 64 | autoWatch: false, 65 | 66 | 67 | // start these browsers 68 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 69 | browsers: ['PhantomJS'], 70 | 71 | 72 | // Continuous Integration mode 73 | // if true, Karma captures browsers, runs the tests and exits 74 | singleRun: true 75 | }); 76 | }; 77 | -------------------------------------------------------------------------------- /config/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // The main suite of Protractor tests. 2 | exports.config = { 3 | seleniumServerJar: __dirname + 4 | '/../node_modules/gulp-protractor' + 5 | '/node_modules/protractor/selenium/selenium-server-standalone-2.47.1.jar', 6 | 7 | browserName: 'chrome', 8 | 9 | jasmineNodeOpts: { 10 | showColors: true, 11 | isVerbose: true, // List all tests in the console 12 | includeStackTrace: true, 13 | defaultTimeoutInterval: 10000 14 | }, 15 | 16 | baseUrl: 'http://localhost:8888' 17 | }; 18 | -------------------------------------------------------------------------------- /contributors.js: -------------------------------------------------------------------------------- 1 | var https = require('https'); 2 | var fs = require('fs'); 3 | var options = { 4 | hostname: 'api.github.com', 5 | port: 443, 6 | path: '/repos/allenhwkim/angularjs-google-maps/contributors', 7 | method: 'GET', 8 | agent: false, 9 | headers: {'user-agent': 'node.js'} 10 | }; 11 | 12 | var req = https.request(options, function(res){ 13 | //console.log("statusCode: ", res.statusCode); 14 | //console.log("headers: ", res.headers); 15 | 16 | var body = ''; 17 | res.setEncoding('utf8'); 18 | res.on('data', function(d) { 19 | body += d; 20 | }); 21 | res.on('end', function() { 22 | var contributors = JSON.parse(body); 23 | var markdown = "#Angularjs-Google-Maps Is Only Possible By;\n"; 24 | contributors.forEach(function(user) { 25 | markdown += "\n"; 26 | console.log(user.login, user.avatar_url, user.html_url, user.contributions); 27 | }); 28 | markdown += "\n## We Love You All\n"; 29 | fs.writeFileSync("CONTRIBUTORS.md", markdown, 'utf8'); 30 | //console.log(JSON.stringify(contributors, null, ' ')); 31 | }); 32 | 33 | }) 34 | req.end(); 35 | req.on('error', function(e) { 36 | console.error(e); 37 | }); 38 | 39 | -------------------------------------------------------------------------------- /directives/bicycling-layer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc directive 3 | * @name bicycling-layer 4 | * @param Attr2Options {service} 5 | * convert html attribute to Google map api options 6 | * @description 7 | * Requires: map directive 8 | * Restrict To: Element 9 | * 10 | * @example 11 | * 12 | * 13 | * 14 | * 15 | */ 16 | (function() { 17 | 'use strict'; 18 | var parser; 19 | 20 | var linkFunc = function(scope, element, attrs, mapController) { 21 | mapController = mapController[0]||mapController[1]; 22 | var orgAttrs = parser.orgAttributes(element); 23 | var filtered = parser.filter(attrs); 24 | var options = parser.getOptions(filtered, {scope: scope}); 25 | var events = parser.getEvents(scope, filtered); 26 | 27 | console.log('bicycling-layer options', options, 'events', events); 28 | 29 | var layer = getLayer(options, events); 30 | mapController.addObject('bicyclingLayers', layer); 31 | mapController.observeAttrSetObj(orgAttrs, attrs, layer); //observers 32 | element.bind('$destroy', function() { 33 | mapController.deleteObject('bicyclingLayers', layer); 34 | }); 35 | }; 36 | 37 | var getLayer = function(options, events) { 38 | var layer = new google.maps.BicyclingLayer(options); 39 | for (var eventName in events) { 40 | google.maps.event.addListener(layer, eventName, events[eventName]); 41 | } 42 | return layer; 43 | }; 44 | 45 | var bicyclingLayer= function(Attr2MapOptions) { 46 | parser = Attr2MapOptions; 47 | return { 48 | restrict: 'E', 49 | require: ['?^map','?^ngMap'], 50 | link: linkFunc 51 | }; 52 | }; 53 | bicyclingLayer.$inject = ['Attr2MapOptions']; 54 | 55 | angular.module('ngMap').directive('bicyclingLayer', bicyclingLayer); 56 | })(); 57 | -------------------------------------------------------------------------------- /directives/dynamic-maps-engine-layer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc directive 3 | * @name dynamic-maps-engine-layer 4 | * @description 5 | * Requires: map directive 6 | * Restrict To: Element 7 | * 8 | * @example 9 | * Example: 10 | * 11 | * 13 | * 14 | * 15 | */ 16 | (function() { 17 | 'use strict'; 18 | 19 | angular.module('ngMap').directive('dynamicMapsEngineLayer', [ 20 | 'Attr2MapOptions', function(Attr2MapOptions) { 21 | var parser = Attr2MapOptions; 22 | 23 | var getDynamicMapsEngineLayer = function(options, events) { 24 | var layer = new google.maps.visualization.DynamicMapsEngineLayer(options); 25 | 26 | for (var eventName in events) { 27 | google.maps.event.addListener(layer, eventName, events[eventName]); 28 | } 29 | 30 | return layer; 31 | }; 32 | 33 | return { 34 | restrict: 'E', 35 | require: ['?^map','?^ngMap'], 36 | 37 | link: function(scope, element, attrs, mapController) { 38 | mapController = mapController[0]||mapController[1]; 39 | 40 | var filtered = parser.filter(attrs); 41 | var options = parser.getOptions(filtered, {scope: scope}); 42 | var events = parser.getEvents(scope, filtered, events); 43 | 44 | var layer = getDynamicMapsEngineLayer(options, events); 45 | mapController.addObject('mapsEngineLayers', layer); 46 | } 47 | }; // return 48 | }]); 49 | })(); 50 | -------------------------------------------------------------------------------- /directives/fusion-tables-layer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc directive 3 | * @name fusion-tables-layer 4 | * @description 5 | * Requires: map directive 6 | * Restrict To: Element 7 | * 8 | * @example 9 | * Example: 10 | * 11 | * 14 | * 15 | * 16 | */ 17 | (function() { 18 | 'use strict'; 19 | 20 | angular.module('ngMap').directive('fusionTablesLayer', [ 21 | 'Attr2MapOptions', function(Attr2MapOptions) { 22 | var parser = Attr2MapOptions; 23 | 24 | var getLayer = function(options, events) { 25 | var layer = new google.maps.FusionTablesLayer(options); 26 | 27 | for (var eventName in events) { 28 | google.maps.event.addListener(layer, eventName, events[eventName]); 29 | } 30 | 31 | return layer; 32 | }; 33 | 34 | return { 35 | restrict: 'E', 36 | require: ['?^map','?^ngMap'], 37 | 38 | link: function(scope, element, attrs, mapController) { 39 | mapController = mapController[0]||mapController[1]; 40 | 41 | var filtered = parser.filter(attrs); 42 | var options = parser.getOptions(filtered, {scope: scope}); 43 | var events = parser.getEvents(scope, filtered, events); 44 | console.log('fusion-tables-layer options', options, 'events', events); 45 | 46 | var layer = getLayer(options, events); 47 | mapController.addObject('fusionTablesLayers', layer); 48 | element.bind('$destroy', function() { 49 | mapController.deleteObject('fusionTablesLayers', layer); 50 | }); 51 | } 52 | }; // return 53 | }]); 54 | })(); 55 | -------------------------------------------------------------------------------- /directives/heatmap-layer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc directive 3 | * @name heatmap-layer 4 | * @param Attr2Options {service} convert html attribute to Google map api options 5 | * @description 6 | * Requires: map directive 7 | * Restrict To: Element 8 | * 9 | * @example 10 | * 11 | * 12 | * 13 | * 14 | */ 15 | (function() { 16 | 'use strict'; 17 | 18 | angular.module('ngMap').directive('heatmapLayer', [ 19 | 'Attr2MapOptions', '$window', function(Attr2MapOptions, $window) { 20 | var parser = Attr2MapOptions; 21 | return { 22 | restrict: 'E', 23 | require: ['?^map','?^ngMap'], 24 | 25 | link: function(scope, element, attrs, mapController) { 26 | mapController = mapController[0]||mapController[1]; 27 | 28 | var filtered = parser.filter(attrs); 29 | 30 | /** 31 | * set options 32 | */ 33 | var options = parser.getOptions(filtered, {scope: scope}); 34 | options.data = $window[attrs.data] || parseScope(attrs.data, scope); 35 | if (options.data instanceof Array) { 36 | options.data = new google.maps.MVCArray(options.data); 37 | } else { 38 | throw "invalid heatmap data"; 39 | } 40 | var layer = new google.maps.visualization.HeatmapLayer(options); 41 | 42 | /** 43 | * set events 44 | */ 45 | var events = parser.getEvents(scope, filtered); 46 | console.log('heatmap-layer options', layer, 'events', events); 47 | 48 | mapController.addObject('heatmapLayers', layer); 49 | 50 | //helper get nexted path 51 | function parseScope( path, obj ) { 52 | return path.split('.').reduce( function( prev, curr ) { 53 | return prev[curr]; 54 | }, obj || this ); 55 | } 56 | } 57 | }; // return 58 | }]); 59 | })(); 60 | -------------------------------------------------------------------------------- /directives/kml-layer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc directive 3 | * @name kml-layer 4 | * @param Attr2MapOptions {service} convert html attribute to Google map api options 5 | * @description 6 | * renders Kml layer on a map 7 | * Requires: map directive 8 | * Restrict To: Element 9 | * 10 | * @attr {Url} url url of the kml layer 11 | * @attr {KmlLayerOptions} KmlLayerOptions 12 | * (https://developers.google.com/maps/documentation/javascript/reference#KmlLayerOptions) 13 | * @attr {String} <KmlLayerEvent> Any KmlLayer events, 14 | * https://developers.google.com/maps/documentation/javascript/reference 15 | * @example 16 | * Usage: 17 | * 18 | * 19 | * 20 | * 21 | * Example: 22 | * 23 | * 24 | * 25 | * 26 | * 27 | */ 28 | (function() { 29 | 'use strict'; 30 | 31 | angular.module('ngMap').directive('kmlLayer', [ 32 | 'Attr2MapOptions', function(Attr2MapOptions) { 33 | var parser = Attr2MapOptions; 34 | 35 | var getKmlLayer = function(options, events) { 36 | var kmlLayer = new google.maps.KmlLayer(options); 37 | for (var eventName in events) { 38 | google.maps.event.addListener(kmlLayer, eventName, events[eventName]); 39 | } 40 | return kmlLayer; 41 | }; 42 | 43 | return { 44 | restrict: 'E', 45 | require: ['?^map','?^ngMap'], 46 | 47 | link: function(scope, element, attrs, mapController) { 48 | mapController = mapController[0]||mapController[1]; 49 | 50 | var orgAttrs = parser.orgAttributes(element); 51 | var filtered = parser.filter(attrs); 52 | var options = parser.getOptions(filtered, {scope: scope}); 53 | var events = parser.getEvents(scope, filtered); 54 | console.log('kml-layer options', options, 'events', events); 55 | 56 | var kmlLayer = getKmlLayer(options, events); 57 | mapController.addObject('kmlLayers', kmlLayer); 58 | mapController.observeAttrSetObj(orgAttrs, attrs, kmlLayer); //observers 59 | element.bind('$destroy', function() { 60 | mapController.deleteObject('kmlLayers', kmlLayer); 61 | }); 62 | } 63 | }; // return 64 | }]); 65 | })(); 66 | -------------------------------------------------------------------------------- /directives/map-data.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc directive 3 | * @name map-data 4 | * @param Attr2MapOptions {service} 5 | * convert html attribute to Google map api options 6 | * @description 7 | * set map data 8 | * Requires: map directive 9 | * Restrict To: Element 10 | * 11 | * @wn {String} method-name, run map.data[method-name] with attribute value 12 | * @example 13 | * Example: 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | (function() { 20 | 'use strict'; 21 | 22 | angular.module('ngMap').directive('mapData', [ 23 | 'Attr2MapOptions', 'NgMap', function(Attr2MapOptions, NgMap) { 24 | var parser = Attr2MapOptions; 25 | return { 26 | restrict: 'E', 27 | require: ['?^map','?^ngMap'], 28 | 29 | link: function(scope, element, attrs, mapController) { 30 | mapController = mapController[0] || mapController[1]; 31 | var filtered = parser.filter(attrs); 32 | var options = parser.getOptions(filtered, {scope: scope}); 33 | var events = parser.getEvents(scope, filtered, events); 34 | 35 | console.log('map-data options', options); 36 | NgMap.getMap(mapController.map.id).then(function(map) { 37 | //options 38 | for (var key in options) { 39 | var val = options[key]; 40 | if (typeof scope[val] === "function") { 41 | map.data[key](scope[val]); 42 | } else { 43 | map.data[key](val); 44 | } 45 | } 46 | 47 | //events 48 | for (var eventName in events) { 49 | map.data.addListener(eventName, events[eventName]); 50 | } 51 | }); 52 | } 53 | }; // return 54 | }]); 55 | })(); 56 | -------------------------------------------------------------------------------- /directives/map-type.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc directive 3 | * @name map-type 4 | * @param Attr2MapOptions {service} 5 | * convert html attribute to Google map api options 6 | * @description 7 | * Requires: map directive 8 | * Restrict To: Element 9 | * 10 | * @example 11 | * Example: 12 | * 13 | * 14 | * 15 | * 16 | */ 17 | (function() { 18 | 'use strict'; 19 | 20 | angular.module('ngMap').directive('mapType', ['$parse', 'NgMap', 21 | function($parse, NgMap) { 22 | 23 | return { 24 | restrict: 'E', 25 | require: ['?^map','?^ngMap'], 26 | 27 | link: function(scope, element, attrs, mapController) { 28 | mapController = mapController[0]||mapController[1]; 29 | 30 | var mapTypeName = attrs.name, mapTypeObject; 31 | if (!mapTypeName) { 32 | throw "invalid map-type name"; 33 | } 34 | mapTypeObject = $parse(attrs.object)(scope); 35 | if (!mapTypeObject) { 36 | throw "invalid map-type object"; 37 | } 38 | 39 | NgMap.getMap().then(function(map) { 40 | map.mapTypes.set(mapTypeName, mapTypeObject); 41 | }); 42 | mapController.addObject('mapTypes', mapTypeObject); 43 | } 44 | }; // return 45 | }]); 46 | })(); 47 | -------------------------------------------------------------------------------- /directives/maps-engine-layer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc directive 3 | * @name maps-engine-layer 4 | * @description 5 | * Requires: map directive 6 | * Restrict To: Element 7 | * 8 | * @example 9 | * Example: 10 | * 11 | * 12 | * 13 | * 14 | */ 15 | (function() { 16 | 'use strict'; 17 | 18 | angular.module('ngMap').directive('mapsEngineLayer', ['Attr2MapOptions', function(Attr2MapOptions) { 19 | var parser = Attr2MapOptions; 20 | 21 | var getMapsEngineLayer = function(options, events) { 22 | var layer = new google.maps.visualization.MapsEngineLayer(options); 23 | 24 | for (var eventName in events) { 25 | google.maps.event.addListener(layer, eventName, events[eventName]); 26 | } 27 | 28 | return layer; 29 | }; 30 | 31 | return { 32 | restrict: 'E', 33 | require: ['?^map','?^ngMap'], 34 | 35 | link: function(scope, element, attrs, mapController) { 36 | mapController = mapController[0]||mapController[1]; 37 | 38 | var filtered = parser.filter(attrs); 39 | var options = parser.getOptions(filtered, {scope: scope}); 40 | var events = parser.getEvents(scope, filtered, events); 41 | console.log('maps-engine-layer options', options, 'events', events); 42 | 43 | var layer = getMapsEngineLayer(options, events); 44 | mapController.addObject('mapsEngineLayers', layer); 45 | } 46 | }; // return 47 | }]); 48 | })(); 49 | -------------------------------------------------------------------------------- /directives/overlay-map-type.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc directive 3 | * @name overlay-map-type 4 | * @param Attr2MapOptions {service} convert html attribute to Google map api options 5 | * @param $window {service} 6 | * @description 7 | * Requires: map directive 8 | * Restrict To: Element 9 | * 10 | * @example 11 | * Example: 12 | * 13 | * 14 | * 15 | * 16 | */ 17 | (function() { 18 | 'use strict'; 19 | 20 | angular.module('ngMap').directive('overlayMapType', [ 21 | 'NgMap', function(NgMap) { 22 | 23 | return { 24 | restrict: 'E', 25 | require: ['?^map','?^ngMap'], 26 | 27 | link: function(scope, element, attrs, mapController) { 28 | mapController = mapController[0]||mapController[1]; 29 | 30 | var initMethod = attrs.initMethod || "insertAt"; 31 | var overlayMapTypeObject = scope[attrs.object]; 32 | 33 | NgMap.getMap().then(function(map) { 34 | if (initMethod == "insertAt") { 35 | var index = parseInt(attrs.index, 10); 36 | map.overlayMapTypes.insertAt(index, overlayMapTypeObject); 37 | } else if (initMethod == "push") { 38 | map.overlayMapTypes.push(overlayMapTypeObject); 39 | } 40 | }); 41 | mapController.addObject('overlayMapTypes', overlayMapTypeObject); 42 | } 43 | }; // return 44 | }]); 45 | })(); 46 | -------------------------------------------------------------------------------- /directives/traffic-layer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc directive 3 | * @name traffic-layer 4 | * @param Attr2MapOptions {service} convert html attribute to Google map api options 5 | * @description 6 | * Requires: map directive 7 | * Restrict To: Element 8 | * 9 | * @example 10 | * Example: 11 | * 12 | * 13 | * 14 | * 15 | */ 16 | (function() { 17 | 'use strict'; 18 | 19 | angular.module('ngMap').directive('trafficLayer', [ 20 | 'Attr2MapOptions', function(Attr2MapOptions) { 21 | var parser = Attr2MapOptions; 22 | 23 | var getLayer = function(options, events) { 24 | var layer = new google.maps.TrafficLayer(options); 25 | for (var eventName in events) { 26 | google.maps.event.addListener(layer, eventName, events[eventName]); 27 | } 28 | return layer; 29 | }; 30 | 31 | return { 32 | restrict: 'E', 33 | require: ['?^map','?^ngMap'], 34 | 35 | link: function(scope, element, attrs, mapController) { 36 | mapController = mapController[0]||mapController[1]; 37 | 38 | var orgAttrs = parser.orgAttributes(element); 39 | var filtered = parser.filter(attrs); 40 | var options = parser.getOptions(filtered, {scope: scope}); 41 | var events = parser.getEvents(scope, filtered); 42 | console.log('traffic-layer options', options, 'events', events); 43 | 44 | var layer = getLayer(options, events); 45 | mapController.addObject('trafficLayers', layer); 46 | mapController.observeAttrSetObj(orgAttrs, attrs, layer); //observers 47 | element.bind('$destroy', function() { 48 | mapController.deleteObject('trafficLayers', layer); 49 | }); 50 | } 51 | }; // return 52 | }]); 53 | })(); 54 | -------------------------------------------------------------------------------- /directives/transit-layer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc directive 3 | * @name transit-layer 4 | * @param Attr2MapOptions {service} convert html attribute to Google map api options 5 | * @description 6 | * Requires: map directive 7 | * Restrict To: Element 8 | * 9 | * @example 10 | * Example: 11 | * 12 | * 13 | * 14 | * 15 | */ 16 | (function() { 17 | 'use strict'; 18 | 19 | angular.module('ngMap').directive('transitLayer', [ 20 | 'Attr2MapOptions', function(Attr2MapOptions) { 21 | var parser = Attr2MapOptions; 22 | 23 | var getLayer = function(options, events) { 24 | var layer = new google.maps.TransitLayer(options); 25 | for (var eventName in events) { 26 | google.maps.event.addListener(layer, eventName, events[eventName]); 27 | } 28 | return layer; 29 | }; 30 | 31 | return { 32 | restrict: 'E', 33 | require: ['?^map','?^ngMap'], 34 | 35 | link: function(scope, element, attrs, mapController) { 36 | mapController = mapController[0]||mapController[1]; 37 | 38 | var orgAttrs = parser.orgAttributes(element); 39 | var filtered = parser.filter(attrs); 40 | var options = parser.getOptions(filtered, {scope: scope}); 41 | var events = parser.getEvents(scope, filtered); 42 | console.log('transit-layer options', options, 'events', events); 43 | 44 | var layer = getLayer(options, events); 45 | mapController.addObject('transitLayers', layer); 46 | mapController.observeAttrSetObj(orgAttrs, attrs, layer); //observers 47 | element.bind('$destroy', function() { 48 | mapController.deleteObject('transitLayers', layer); 49 | }); 50 | } 51 | }; // return 52 | }]); 53 | })(); 54 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allenhwkim/angularjs-google-maps/78e82d8294aef14f0868445f4defe62001da9023/favicon.ico -------------------------------------------------------------------------------- /filters/camel-case.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc filter 3 | * @name camel-case 4 | * @description 5 | * Converts string to camel cased 6 | */ 7 | (function() { 8 | 'use strict'; 9 | 10 | var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g; 11 | var MOZ_HACK_REGEXP = /^moz([A-Z])/; 12 | 13 | var camelCaseFilter = function() { 14 | return function(name) { 15 | return name. 16 | replace(SPECIAL_CHARS_REGEXP, 17 | function(_, separator, letter, offset) { 18 | return offset ? letter.toUpperCase() : letter; 19 | }). 20 | replace(MOZ_HACK_REGEXP, 'Moz$1'); 21 | }; 22 | }; 23 | 24 | angular.module('ngMap').filter('camelCase', camelCaseFilter); 25 | })(); 26 | -------------------------------------------------------------------------------- /filters/escape-regexp.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc filter 3 | * @name escape-regex 4 | * @description 5 | * Escapes all regex special characters in a string 6 | */ 7 | (function() { 8 | 'use strict'; 9 | 10 | 11 | 12 | var escapeRegexpFilter = function() { 13 | return function(string) { 14 | return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string 15 | }; 16 | }; 17 | 18 | angular.module('ngMap').filter('escapeRegexp', escapeRegexpFilter); 19 | })(); 20 | -------------------------------------------------------------------------------- /filters/jsonize.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc filter 3 | * @name jsonize 4 | * @description 5 | * Converts json-like string to json string 6 | */ 7 | (function() { 8 | 'use strict'; 9 | 10 | var jsonizeFilter = function() { 11 | return function(str) { 12 | try { // if parsable already, return as it is 13 | JSON.parse(str); 14 | return str; 15 | } catch(e) { // if not parsable, change little 16 | return str 17 | // wrap keys without quote with valid double quote 18 | .replace(/([\$\w]+)\s*:/g, 19 | function(_, $1) { 20 | return '"'+$1+'":'; 21 | } 22 | ) 23 | // replacing single quote wrapped ones to double quote 24 | .replace(/'([^']+)'/g, 25 | function(_, $1) { 26 | return '"'+$1+'"'; 27 | } 28 | ) 29 | .replace(/''/g, '""'); 30 | } 31 | }; 32 | }; 33 | 34 | angular.module('ngMap').filter('jsonize', jsonizeFilter); 35 | })(); 36 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | require('./build/scripts/ng-map.js'); 2 | module.exports = 'ngMap'; -------------------------------------------------------------------------------- /package.js: -------------------------------------------------------------------------------- 1 | // package metadata file for Meteor.js 2 | var packageName = 'tallyb:ngmap'; 3 | var where = 'client'; // where to install: 'client' or 'server'. For both, pass nothing. 4 | var version = '1.18.1'; 5 | var summary = '"The Simplest AngularJs Google Maps V3 Directive Module"'; 6 | var gitLink = 'https://github.com/allenhwkim/angularjs-google-maps'; 7 | var documentationFile = 'README.md'; 8 | 9 | // Meta-data 10 | Package.describe({ 11 | name: packageName, 12 | version: version, 13 | summary: summary, 14 | git: gitLink, 15 | documentation: documentationFile 16 | }); 17 | 18 | Package.onUse(function(api) { 19 | api.versionsFrom(['METEOR@0.9.0', 'METEOR@1.0']); // Meteor versions 20 | 21 | api.use('angular:angular@1.2.0', where); // Dependencies 22 | 23 | api.addFiles('build/scripts/ng-map.js', where); // Files in use 24 | }); 25 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ngmap", 3 | "version": "1.18.4", 4 | "main": "index.js", 5 | "description": "The Simplest AngularJS Google Maps V3 Directive", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/allenhwkim/angularjs-google-maps.git" 9 | }, 10 | "dependencies": {}, 11 | "engines": { 12 | "node": ">=0.8.0" 13 | }, 14 | "scripts": { 15 | "test": "gulp test" 16 | }, 17 | "devDependencies": { 18 | "angular-jsdoc": "^1.3.3", 19 | "cheerio": "^0.19.0", 20 | "compression": "~1.0.6", 21 | "express": "~4.4.1", 22 | "glob": "~4.0.2", 23 | "gulp": "^3.8.0", 24 | "gulp-bump": "~0.1.9", 25 | "gulp-clean": "~0.3.0", 26 | "gulp-concat": "~2.2.0", 27 | "gulp-connect": "^2.2.0", 28 | "gulp-debug": "~0.3.0", 29 | "gulp-html-replace": "~1.1.0", 30 | "gulp-protractor": "^1.0.0", 31 | "gulp-rename": "~1.2.0", 32 | "gulp-replace": "^0.5.4", 33 | "gulp-rev": "~0.4.0", 34 | "gulp-shell": "~0.2.7", 35 | "gulp-strip-debug": "~0.3.0", 36 | "gulp-tap": "~0.1.1", 37 | "gulp-uglify": "~0.3.0", 38 | "gulp-umd": "~0.2", 39 | "gulp-usemin": "^0.3.15", 40 | "gulp-util": "~2.2.16", 41 | "jsdoc": "^3.3.0-beta3", 42 | "karma": "^1.3.0", 43 | "karma-chrome-launcher": "^2.0.0", 44 | "karma-jasmine": "^1.0.2", 45 | "karma-ng-html2js-preprocessor": "^1.0.0", 46 | "karma-phantomjs-launcher": "^1.0.2", 47 | "phantomjs": "^2.1.7", 48 | "run-sequence": "~0.3.6", 49 | "selenium-webdriver": "^2.45.1", 50 | "through2": "^2.0.0", 51 | "uglify-save-license": "^0.4.1", 52 | "vinyl": "^1.1.0", 53 | "yargs": "^3.31.0", 54 | "zeparser": "0.0.7" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /services/geo-coder.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc service 3 | * @name GeoCoder 4 | * @description 5 | * Provides [defered/promise API](https://docs.angularjs.org/api/ng/service/$q) 6 | * service for Google Geocoder service 7 | */ 8 | (function() { 9 | 'use strict'; 10 | var $q; 11 | /** 12 | * @memberof GeoCoder 13 | * @param {Hash} options 14 | * https://developers.google.com/maps/documentation/geocoding/#geocoding 15 | * @example 16 | * ``` 17 | * GeoCoder.geocode({address: 'the cn tower'}).then(function(result) { 18 | * //... do something with result 19 | * }); 20 | * ``` 21 | * @returns {HttpPromise} Future object 22 | */ 23 | var geocodeFunc = function(options) { 24 | var deferred = $q.defer(); 25 | var geocoder = new google.maps.Geocoder(); 26 | geocoder.geocode(options, function (results, status) { 27 | if (status == google.maps.GeocoderStatus.OK) { 28 | deferred.resolve(results); 29 | } else { 30 | deferred.reject(status); 31 | } 32 | }); 33 | return deferred.promise; 34 | }; 35 | 36 | var GeoCoder = function(_$q_) { 37 | $q = _$q_; 38 | return { 39 | geocode : geocodeFunc 40 | }; 41 | }; 42 | GeoCoder.$inject = ['$q']; 43 | 44 | angular.module('ngMap').service('GeoCoder', GeoCoder); 45 | })(); 46 | -------------------------------------------------------------------------------- /services/google-maps-api.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc service 3 | * @name GoogleMapsApi 4 | * @description 5 | * Load Google Maps API Service 6 | */ 7 | (function() { 8 | 'use strict'; 9 | var $q; 10 | var $timeout; 11 | 12 | var GoogleMapsApi = function(_$q_, _$timeout_) { 13 | $q = _$q_; 14 | $timeout = _$timeout_; 15 | 16 | return { 17 | 18 | /** 19 | * Load google maps into document by creating a script tag 20 | * @memberof GoogleMapsApi 21 | * @param {string} mapsUrl 22 | * @example 23 | * GoogleMapsApi.load(myUrl).then(function() { 24 | * console.log('google map has been loaded') 25 | * }); 26 | */ 27 | load: function (mapsUrl) { 28 | 29 | var deferred = $q.defer(); 30 | 31 | if (window.google === undefined || window.google.maps === undefined) { 32 | 33 | window.lazyLoadCallback = function() { 34 | $timeout(function() { /* give some time to load */ 35 | deferred.resolve(window.google) 36 | }, 100); 37 | }; 38 | 39 | var scriptEl = document.createElement('script'); 40 | scriptEl.src = mapsUrl + 41 | (mapsUrl.indexOf('?') > -1 ? '&' : '?') + 42 | 'callback=lazyLoadCallback'; 43 | 44 | if (!document.querySelector('script[src="' + scriptEl.src + '"]')) { 45 | document.body.appendChild(scriptEl); 46 | } 47 | } else { 48 | deferred.resolve(window.google) 49 | } 50 | 51 | return deferred.promise; 52 | } 53 | 54 | } 55 | } 56 | GoogleMapsApi.$inject = ['$q', '$timeout']; 57 | 58 | angular.module('ngMap').service('GoogleMapsApi', GoogleMapsApi); 59 | })(); 60 | 61 | 62 | -------------------------------------------------------------------------------- /services/navigator-geolocation.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc service 3 | * @name NavigatorGeolocation 4 | * @description 5 | * Provides [defered/promise API](https://docs.angularjs.org/api/ng/service/$q) 6 | * service for navigator.geolocation methods 7 | */ 8 | /* global google */ 9 | (function() { 10 | 'use strict'; 11 | var $q; 12 | 13 | /** 14 | * @memberof NavigatorGeolocation 15 | * @param {Object} geoLocationOptions the navigator geolocations options. 16 | * i.e. { maximumAge: 3000, timeout: 5000, enableHighAccuracy: true }. 17 | * If none specified, { timeout: 5000 }. 18 | * If timeout not specified, timeout: 5000 added 19 | * @param {function} success success callback function 20 | * @param {function} failure failure callback function 21 | * @example 22 | * ``` 23 | * NavigatorGeolocation.getCurrentPosition() 24 | * .then(function(position) { 25 | * var lat = position.coords.latitude, lng = position.coords.longitude; 26 | * .. do something lat and lng 27 | * }); 28 | * ``` 29 | * @returns {HttpPromise} Future object 30 | */ 31 | var getCurrentPosition = function(geoLocationOptions) { 32 | var deferred = $q.defer(); 33 | if (navigator.geolocation) { 34 | 35 | if (geoLocationOptions === undefined) { 36 | geoLocationOptions = { timeout: 5000 }; 37 | } 38 | else if (geoLocationOptions.timeout === undefined) { 39 | geoLocationOptions.timeout = 5000; 40 | } 41 | 42 | navigator.geolocation.getCurrentPosition( 43 | function(position) { 44 | deferred.resolve(position); 45 | }, function(evt) { 46 | console.error(evt); 47 | deferred.reject(evt); 48 | }, 49 | geoLocationOptions 50 | ); 51 | } else { 52 | deferred.reject("Browser Geolocation service failed."); 53 | } 54 | return deferred.promise; 55 | }; 56 | 57 | var NavigatorGeolocation = function(_$q_) { 58 | $q = _$q_; 59 | return { 60 | getCurrentPosition: getCurrentPosition 61 | }; 62 | }; 63 | NavigatorGeolocation.$inject = ['$q']; 64 | 65 | angular.module('ngMap'). 66 | service('NavigatorGeolocation', NavigatorGeolocation); 67 | })(); 68 | -------------------------------------------------------------------------------- /services/street-view.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc service 3 | * @name StreetView 4 | * @description 5 | * Provides [defered/promise API](https://docs.angularjs.org/api/ng/service/$q) 6 | * service for [Google StreetViewService] 7 | * (https://developers.google.com/maps/documentation/javascript/streetview) 8 | */ 9 | (function() { 10 | 'use strict'; 11 | var $q; 12 | 13 | /** 14 | * Retrieves panorama id from the given map (and or position) 15 | * @memberof StreetView 16 | * @param {map} map Google map instance 17 | * @param {LatLng} latlng Google LatLng instance 18 | * default: the center of the map 19 | * @example 20 | * StreetView.getPanorama(map).then(function(panoId) { 21 | * $scope.panoId = panoId; 22 | * }); 23 | * @returns {HttpPromise} Future object 24 | */ 25 | var getPanorama = function(map, latlng) { 26 | latlng = latlng || map.getCenter(); 27 | var deferred = $q.defer(); 28 | var svs = new google.maps.StreetViewService(); 29 | svs.getPanoramaByLocation( (latlng||map.getCenter), 100, 30 | function (data, status) { 31 | // if streetView available 32 | if (status === google.maps.StreetViewStatus.OK) { 33 | deferred.resolve(data.location.pano); 34 | } else { 35 | // no street view available in this range, or some error occurred 36 | deferred.resolve(false); 37 | //deferred.reject('Geocoder failed due to: '+ status); 38 | } 39 | } 40 | ); 41 | return deferred.promise; 42 | }; 43 | 44 | /** 45 | * Set panorama view on the given map with the panorama id 46 | * @memberof StreetView 47 | * @param {map} map Google map instance 48 | * @param {String} panoId Panorama id fro getPanorama method 49 | * @example 50 | * StreetView.setPanorama(map, panoId); 51 | */ 52 | var setPanorama = function(map, panoId) { 53 | var svp = new google.maps.StreetViewPanorama( 54 | map.getDiv(), {enableCloseButton: true} 55 | ); 56 | svp.setPano(panoId); 57 | }; 58 | 59 | var StreetView = function(_$q_) { 60 | $q = _$q_; 61 | 62 | return { 63 | getPanorama: getPanorama, 64 | setPanorama: setPanorama 65 | }; 66 | }; 67 | StreetView.$inject = ['$q']; 68 | 69 | angular.module('ngMap').service('StreetView', StreetView); 70 | })(); 71 | -------------------------------------------------------------------------------- /spec/TODO: -------------------------------------------------------------------------------- 1 | more tests on 2 | . services 3 | . filters 4 | -------------------------------------------------------------------------------- /spec/directives/marker_spec_bak.js: -------------------------------------------------------------------------------- 1 | /* global google, waitsFor */ 2 | 3 | describe('marker', function() { 4 | var elm, scope; 5 | 6 | /* mock Attr2Options, knowns as parser */ 7 | var MockAttr2Options = function() { 8 | var hashFilter = function(hash) { 9 | var newHash = {}; 10 | for (var key in hash) { 11 | if (hash[key].match(regexp)) { 12 | newHash[key] = hash[key]; 13 | } 14 | }; 15 | return newHash; 16 | }; 17 | return { 18 | filter: function(attrs) {return attrs;}, 19 | getOptions: function(attrs) {return attrs;}, 20 | getControlOptions: function(attrs) {return hashFilter(attrs, /ControlOptions$/);}, 21 | getEvents: function(attrs) {return hashFilter(attrs, /^on[A-E]/);} 22 | }; 23 | }; 24 | 25 | // load the marker code 26 | beforeEach(function() { 27 | module(function($provide) { 28 | $provide.value('Attr2MapOptions', MockAttr2Options); 29 | }); 30 | module('ngMap'); 31 | inject(function($rootScope, $compile) { 32 | elm = angular.element( 33 | ''+ 34 | ' '+ 35 | ' '+ 36 | ''); 37 | scope = $rootScope; 38 | $compile(elm)(scope); 39 | scope.$digest(); 40 | waitsFor(function() { 41 | return scope.map; 42 | }); 43 | }); 44 | }); 45 | 46 | it('should set scope.markers with options ', function() { 47 | // scope.markers 48 | expect(Object.keys(scope.map.markers).length).toEqual(2); 49 | // options from attribute 50 | expect(scope.map.markers[0].draggable).toEqual(true); 51 | // contents from html 52 | }); 53 | 54 | it('should set marker events', function() { 55 | //TODO: need to test marker events, but don't know don't know how to get events of a marker 56 | }); 57 | 58 | it('should set marker observers', function() { 59 | //TODO: need to test marker observers 60 | }); 61 | }); 62 | -------------------------------------------------------------------------------- /spec/directives/shape_spec_bak.js: -------------------------------------------------------------------------------- 1 | /* global google, waitsFor */ 2 | describe('shape', function() { 3 | var elm, scope; 4 | 5 | // load the marker code 6 | beforeEach(function() { 7 | module('ngMap'); 8 | inject(function($rootScope, $compile) { 9 | elm = angular.element( 10 | ''+ 11 | ' '+ 13 | ' '+ 15 | ' '+ 17 | ' '+ 19 | ' '+ 21 | ''); 22 | scope = $rootScope; 23 | $compile(elm)(scope); 24 | scope.$digest(); 25 | waitsFor(function() { 26 | return scope.map; 27 | }); 28 | }); 29 | }); 30 | 31 | it('should set scope.shapes with options ', function() { 32 | // scope.shapes 33 | expect(Object.keys(scope.map.shapes).length).toEqual(5); 34 | // polyline 35 | expect(scope.map.shapes.polyline.geodesic).toBe(true); 36 | // polygon 37 | expect(scope.map.shapes.polygon.strokeColor).toEqual('#FF0000'); 38 | // rectangle 39 | expect(scope.map.shapes.rectangle.editable).toBe(true); 40 | // circle 41 | expect(scope.map.shapes.circle.radius).toEqual(4000); 42 | // image 43 | expect(scope.map.shapes.image.getUrl()).toEqual("https://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg"); 44 | }); 45 | 46 | it('should set shape events', function() { 47 | //TODO: should test events, but don't know how to get events of a shape 48 | }); 49 | 50 | it('should set shape observers', function() { 51 | //TODO: need to test observers 52 | }); 53 | }); 54 | -------------------------------------------------------------------------------- /spec/directives/street_view_panorama_spec_bak.js: -------------------------------------------------------------------------------- 1 | /* global google, waitsFor */ 2 | 3 | describe('street-view-panorama', function() { 4 | var elm, scope; 5 | 6 | /* mock Attr2Options, knowns as parser */ 7 | var MockAttr2Options = function() { 8 | var hashFilter = function(hash) { 9 | var newHash = {}; 10 | for (var key in hash) { 11 | if (hash[key].match(regexp)) { 12 | newHash[key] = hash[key]; 13 | } 14 | }; 15 | return newHash; 16 | }; 17 | return { 18 | filter: function(attrs) {return attrs;}, 19 | getOptions: function(attrs) {return attrs;}, 20 | getControlOptions: function(attrs) {return hashFilter(attrs, /ControlOptions$/);}, 21 | getEvents: function(attrs) {return hashFilter(attrs, /^on[A-E]/);} 22 | }; 23 | }; 24 | 25 | // load the marker code 26 | beforeEach(function() { 27 | module(function($provide) { 28 | $provide.value('Attr2MapOptions', MockAttr2Options); 29 | }); 30 | module('ngMap'); 31 | inject(function($rootScope, $compile) { 32 | elm = angular.element( 33 | '' + 34 | ' ' + 35 | ' ' + 36 | ''); 37 | scope = $rootScope; 38 | $compile(elm)(scope); 39 | scope.$digest(); 40 | waitsFor(function() { 41 | return scope.map.getStreetView().getPosition(); 42 | }); 43 | }); 44 | }); 45 | 46 | it('should set map streetview with options ', function() { 47 | var svp = scope.map.getStreetView(); 48 | expect(svp instanceof google.maps.StreetViewPanorama).toBe(true); 49 | expect(svp.getPosition().lat()).toEqual(40.688738); 50 | }); 51 | 52 | }); 53 | -------------------------------------------------------------------------------- /spec/e2e/testapp_spec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var argv = require('yargs').argv; 3 | 4 | /*global document, afterEach*/ 5 | var excludes = [ // these examples has no ng-map 6 | "all-examples.html", 7 | "map_events.html", 8 | "map_lazy_init.html", 9 | "map-lazy-load.html", 10 | "map-lazy-load-params.html", 11 | "places-auto-complete.html" 12 | ]; 13 | 14 | var filesRE = argv.files == 'undefined' ? null : new RegExp(argv.files); 15 | console.log('filesRE', filesRE); 16 | 17 | function using(filename, func){ 18 | func.apply(this, [filename]); //jshint ignore:line 19 | } 20 | 21 | describe('testapp directory', function() { 22 | var allFiles = require('fs').readdirSync(__dirname + "/../../testapp"); 23 | allFiles = allFiles.filter(function(filename) { 24 | return ( 25 | filename.match(/\.html$/) && 26 | excludes.indexOf(filename) === -1 && 27 | (filesRE ? filename.match(filesRE) : true) 28 | ); 29 | }); 30 | console.log('files to run', allFiles); 31 | 32 | //TODO: apply retry when it has console error. e.g. google image 404 error 33 | allFiles.forEach(function(filename) { 34 | using(filename, function(url){ 35 | it('testapp/'+url, function() { 36 | browser.get('testapp/'+url); 37 | 38 | browser.wait( function() { 39 | return browser.executeScript( function() { 40 | var el = document.querySelector("ng-map"); 41 | var injector = angular.element(el).injector(); 42 | var NgMap = injector.get('NgMap'); 43 | return NgMap.getMap(); 44 | }).then(function(map) { 45 | return map; 46 | }); 47 | }, 2000); 48 | 49 | browser.manage().logs().get('browser').then(function(browserLog) { 50 | expect(browserLog.length).toEqual(0); 51 | browserLog.length && console.log(JSON.stringify(browserLog)); 52 | }); 53 | 54 | }); 55 | }); 56 | }); 57 | 58 | }); 59 | -------------------------------------------------------------------------------- /spec/services/geo_coder_spec.js: -------------------------------------------------------------------------------- 1 | /* global jasmine */ 2 | describe('GeoCoder', function () { 3 | 'use strict'; 4 | var scope, geoCoder; 5 | 6 | beforeEach(module('ngMap')); 7 | beforeEach(inject(function ($rootScope, GeoCoder) { 8 | scope = $rootScope, geoCoder = GeoCoder; 9 | google.maps.Geocoder = jasmine.createSpy(); 10 | })); 11 | 12 | describe('geocode function', function () { 13 | 14 | it('Should return a promise', function () { 15 | var GoodResponse = function (params, callback) { callback('GOOD', 'OK'); }; 16 | google.maps.Geocoder.prototype.geocode = jasmine.createSpy().and.callFake(GoodResponse); 17 | var promise = geoCoder.geocode('Canada'); 18 | expect(typeof promise.then).toBe('function'); 19 | }); 20 | 21 | it('Should call geocoder.geocode to retrieve good results', function () { 22 | var GoodResponse = function (params, callback) { callback('GOOD', 'OK'); }; 23 | google.maps.Geocoder.prototype.geocode = jasmine.createSpy().and.callFake(GoodResponse); 24 | var okMock = jasmine.createSpy(); 25 | geoCoder.geocode('Canada').then(okMock); 26 | scope.$apply(); 27 | expect(okMock).toHaveBeenCalledWith('GOOD'); 28 | }); 29 | 30 | it('Should call geocoder.geocode to retrieve bad results', function () { 31 | var BadResponse = function (params, callback) { callback('BAD', 'ERROR'); }; 32 | google.maps.Geocoder.prototype.geocode = jasmine.createSpy().and.callFake(BadResponse); 33 | var okMock = jasmine.createSpy(); 34 | var errorMock = jasmine.createSpy(); 35 | geoCoder.geocode('Canada').then(okMock, errorMock); 36 | scope.$apply(); 37 | expect(okMock).not.toHaveBeenCalled(); 38 | expect(errorMock).toHaveBeenCalledWith('ERROR'); 39 | }); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /spec/services/navigator_geolocation_spec.js: -------------------------------------------------------------------------------- 1 | /* global google, jasmine */ 2 | describe('NavigatorGeolocation', function () { 3 | var scope, navGeo; 4 | //don't do this, it will interfere others, i.e navigator.userAgent 5 | //navigator = jasmine.createSpy('navigator'); 6 | navigator.geolocation = jasmine.createSpy('geolocation'); 7 | 8 | beforeEach(module('ngMap')); 9 | beforeEach(inject(function ($rootScope, NavigatorGeolocation) { 10 | scope = $rootScope, navGeo = NavigatorGeolocation; 11 | })); 12 | 13 | describe('getCurrentPosition function', function () { 14 | 15 | beforeEach(function() { 16 | var GoodResponse = function (successCallback, errorCallback) { successCallback('GOOD'); }; 17 | navigator.geolocation.getCurrentPosition = jasmine.createSpy().and.callFake(GoodResponse); 18 | }); 19 | 20 | it('Should return a promise', function () { 21 | var promise = navGeo.getCurrentPosition(); 22 | expect(typeof promise.then).toBe('function'); 23 | }); 24 | 25 | it('Should call getCurrentPosition to retrieve good results', function () { 26 | var jasmineSuccess = jasmine.createSpy('success'); 27 | var jasmineError = jasmine.createSpy('error'); 28 | navGeo.getCurrentPosition().then(jasmineSuccess, jasmineError); 29 | scope.$apply(); 30 | expect(jasmineSuccess).toHaveBeenCalled(); 31 | expect(jasmineError).not.toHaveBeenCalled(); 32 | expect(jasmineSuccess).toHaveBeenCalledWith('GOOD'); 33 | }); 34 | 35 | }); 36 | 37 | describe('getCurrentPosition function', function () { 38 | 39 | beforeEach(function() { 40 | var BadResponse = function (successCallback, errorCallback) { errorCallback('BAD'); }; 41 | navigator.geolocation.getCurrentPosition = jasmine.createSpy().and.callFake(BadResponse); 42 | }); 43 | 44 | it('Should call getCurrentPosition to retrieve bad results', function () { 45 | var jasmineSuccess = jasmine.createSpy('success'); 46 | var jasmineError = jasmine.createSpy('error'); 47 | navGeo.getCurrentPosition().then(jasmineSuccess, jasmineError); 48 | scope.$apply(); 49 | expect(jasmineSuccess).not.toHaveBeenCalled(); 50 | expect(jasmineError).toHaveBeenCalled(); 51 | expect(jasmineSuccess).not.toHaveBeenCalled(); 52 | }); 53 | 54 | }); 55 | }); 56 | -------------------------------------------------------------------------------- /spec/services/ng-map-pool-spec.js: -------------------------------------------------------------------------------- 1 | describe('NgMapPool', function() { 2 | 'use strict'; 3 | var scope, $window, NgMapPool; 4 | 5 | beforeEach(module('ngMap', function($provide) { //jshint ignore:line 6 | })); 7 | 8 | beforeEach(inject(function ($rootScope, _NgMapPool_, _$window_) { 9 | scope = $rootScope; 10 | NgMapPool = _NgMapPool_, $window = _$window_; 11 | })); 12 | 13 | describe("#getMapInstance #returnMapInstance", function() { 14 | it('it should create a new map instance and return', function() { 15 | var el = { 16 | style: {}, 17 | appendChild: function(){}, 18 | getAttribute: function() {return "true";}, 19 | currentStyle: {} 20 | }; 21 | var map1, map2, map3; 22 | expect(NgMapPool.mapInstances.length).toEqual(0); 23 | map1 = NgMapPool.getMapInstance(el); 24 | expect(NgMapPool.mapInstances.length).toEqual(1); 25 | expect(map1.inUse).toEqual(true); 26 | map2 = NgMapPool.getMapInstance(el); 27 | expect(NgMapPool.mapInstances.length).toEqual(2); 28 | expect(map2.inUse).toEqual(true); 29 | map3 = NgMapPool.getMapInstance(el); 30 | expect(NgMapPool.mapInstances.length).toEqual(3); 31 | expect(map3.inUse).toEqual(true); 32 | 33 | NgMapPool.returnMapInstance(map1); 34 | NgMapPool.returnMapInstance(map2); 35 | expect(NgMapPool.mapInstances.length).toEqual(3); 36 | expect(map1.inUse).toEqual(false); 37 | expect(map2.inUse).toEqual(false); 38 | expect(map3.inUse).toEqual(true); 39 | 40 | var map4 = NgMapPool.getMapInstance(el); 41 | var map5 = NgMapPool.getMapInstance(el); 42 | expect(map1).toEqual(map4); 43 | expect(map2).toEqual(map5); 44 | }); 45 | }); 46 | 47 | }); 48 | -------------------------------------------------------------------------------- /spec/services/street_view_spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allenhwkim/angularjs-google-maps/78e82d8294aef14f0868445f4defe62001da9023/spec/services/street_view_spec.js -------------------------------------------------------------------------------- /testapp/aerial-rotate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 24 | 25 | 26 | 27 |
28 | 29 | 34 | 35 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /testapp/aerial-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /testapp/app.js: -------------------------------------------------------------------------------- 1 | ../app.js -------------------------------------------------------------------------------- /testapp/build: -------------------------------------------------------------------------------- 1 | ../build -------------------------------------------------------------------------------- /testapp/circle-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 21 | 22 | 23 | 24 | 25 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /testapp/control-custom-state.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 22 | 23 | 24 | Adding state to controls
25 | Adds a control to the map that returns the user to the control's defined home 26 |
27 | 28 | 29 |
Go Home
30 |
31 | 32 |
Set Home
33 |
34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /testapp/control-custom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 19 | 20 | 21 | 22 | Custom Control
23 | This custom control simply returns the user to Chicago when clicked 24 |
25 | 26 | 27 |
Home1
28 |
29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /testapp/control-disableUI.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Disabling the default UI 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /testapp/control-options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Control options 10 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /testapp/control-positioning.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Control options 10 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /testapp/control-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Adding controls to the map 10 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /testapp/custom-control.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
    24 |
  • {{vm.firstThing}}
  • 25 |
  • {{vm.otherThings}}
  • 26 |
  • {{other}}
  • 27 |
28 |
29 |
30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /testapp/custom-marker-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 24 |
25 | 27 | 28 | 29 | 30 |
31 | Hi, How Are You?
32 | My Name is Trump, and people call me as Mr. President.
33 | We live in this house.
34 |
35 | 36 |
37 | If you want to visit us, please click here 38 | 39 | 40 |
41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /testapp/custom-marker-clusterer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynamic ngMap demo 6 | 7 | 8 | 9 | 10 | 42 | 43 | 44 | 45 |

Marker Cluster

46 |
47 | 48 | 49 |
50 | position:
51 | {{p[0]}}
52 | {{p[1]}} 53 |
54 |
55 |
56 | 57 | 58 | -------------------------------------------------------------------------------- /testapp/custom-marker.css: -------------------------------------------------------------------------------- 1 | .custom-marker { 2 | font-size: 2em; 3 | padding: 10px; 4 | background: #fff; 5 | -webkit-border-radius: 4px; 6 | -moz-border-radius: 4px; 7 | border-radius: 4px; 8 | border: #7F7F7F solid 1px; 9 | text-align: center; 10 | } 11 | 12 | .custom-marker:after { 13 | content: ''; 14 | position: absolute; 15 | border-style: solid; 16 | border-width: 7px 6px 0; 17 | border-color: #fff transparent; 18 | display: block; 19 | width: 0; 20 | z-index: 1; 21 | margin-left: -6px; 22 | bottom: -6px; 23 | left: 50%; 24 | } 25 | 26 | .custom-marker:before { 27 | content: ''; 28 | position: absolute; 29 | border-style: solid; 30 | border-width: 7px 6px 0; 31 | border-color: #7F7F7F transparent; 32 | display: block; 33 | width: 0; 34 | z-index: 0; 35 | margin-left: -6px; 36 | bottom: -7px; 37 | left: 50%; 38 | } 39 | -------------------------------------------------------------------------------- /testapp/directions-with-current-location.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Travel modes in directions 5 | 6 | 7 | 12 | 13 | 14 |
15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 | 27 | 32 | 33 | 34 | 35 |
36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /testapp/directions-with-custom-marker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Travel modes in directions 5 | 6 | 7 | 8 | 13 | 20 | 21 | 22 |
23 | 24 | 27 | 33 | 34 | 36 |
Start Here
37 |
38 | 40 |
Ends Here
41 |
42 |
43 | Directions path length: 44 | {{map.directionsRenderers[0].directions.routes[0].overview_path.length}} 45 |
46 | 47 |
48 |
49 | 50 | 51 | -------------------------------------------------------------------------------- /testapp/directions-with-ng-repeat-panels.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Travel modes in directions 5 | 6 | 7 | 12 | 20 | 21 | 22 | 23 |
24 |
25 | 26 | 32 | 33 | 34 |
35 |
36 |
37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /testapp/directions2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Travel modes in directions 5 | 6 | 7 | 12 | 13 | 14 |
15 | 16 | 17 | 23 | 24 | 25 | Directions path length: 26 | {{map.directionsRenderers[0].directions.routes[0].overview_path.length}} 27 |
28 | 29 |
30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /testapp/drawing-manager.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 |
18 | 21 | 29 | 30 | 31 |
32 | 33 | -------------------------------------------------------------------------------- /testapp/event-arguments.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 19 | 20 | 21 | 22 |
23 | Assigning arguments in UI events 24 |
25 | Click map to place markers 26 | 27 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /testapp/event-domlistener.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | We add a DOM event here to show an alert if the DIV containing the map is clicked. 19 |
20 | Click the map to see the alert. 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /testapp/event-properties.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 19 | 20 | 21 | 22 | Assigning arguments in UI events 23 |
24 | When zoom level changed, the contents of infoWindow also updates. 25 | 28 | 29 |
Change the zoom level
30 |
31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /testapp/event-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 26 | 27 | 28 | 29 | Simple Click Event 30 |
31 | Click the marker to zoom and drag and watch it comes back after 3 seconds. 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /testapp/events.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 38 | 39 | 40 | 41 | Events are applied to map, markers, and shapes. 42 |
43 | All event-related attributes are preceded by 'on-', i.e. on-click, on-mouseover, etc 44 |
45 |
46 | 47 | 48 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /testapp/geojson.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 21 | 22 | 23 | 24 | 26 | 27 | 28 | {{vm.geoType}} : {{vm.geoArray}} 29 | 30 | 31 | -------------------------------------------------------------------------------- /testapp/groundoverlay-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /testapp/gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var gulp = require('gulp'); 3 | var uglify = require('gulp-uglify'); 4 | var usemin = require('gulp-usemin'); 5 | 6 | gulp.task('usemin', function() { 7 | return gulp.src("map-gulp-usemin.html") 8 | .pipe(usemin({js: [uglify]})) 9 | .pipe(gulp.dest('map-gulp-usemin/')); 10 | }); 11 | 12 | -------------------------------------------------------------------------------- /testapp/icon-complex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 29 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /testapp/icon-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /testapp/images/beachflag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allenhwkim/angularjs-google-maps/78e82d8294aef14f0868445f4defe62001da9023/testapp/images/beachflag.png -------------------------------------------------------------------------------- /testapp/images/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allenhwkim/angularjs-google-maps/78e82d8294aef14f0868445f4defe62001da9023/testapp/images/spinner.gif -------------------------------------------------------------------------------- /testapp/infowindow-simple-max.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | 14 | 15 |
16 | Info Windows
17 | This example displays a marker at the center of Australia. 18 | When the user clicks the marker, an info window opens. 19 | 20 | 22 | 23 | 24 |
25 |
26 |

Uluru

27 |
28 |

29 | Uluru, also referred to as Ayers Rock, is a large 30 | sandstone rock formation in the southern part of the 31 | Northern Territory, central Australia. It lies 335 km (208 mi) 32 | south west of the nearest large town, Alice Springs; 450 km 33 | (280 mi) by road. Kata Tjuta and Uluru are the two major 34 | features of the Uluru - Kata Tjuta National Park. Uluru is 35 | sacred to the Pitjantjatjara and Yankunytjatjara, the 36 | Aboriginal people of the area. It has many springs, waterholes, 37 | rock caves and ancient paintings. Uluru is listed as a World 38 | Heritage Site. 39 |

40 |

Attribution: Uluru, 41 | 42 | http://en.wikipedia.org/w/index.php?title=Uluru 43 | 44 | (last visited June 22, 2009).

45 |
46 |
47 |
48 |
49 |
50 | 51 | 52 | -------------------------------------------------------------------------------- /testapp/infowindow-template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 35 | 36 | 37 | 38 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /testapp/infowindow_compile.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 26 | 27 | 28 | 29 | 30 | 31 |
32 | Lat: {{anchor.getPosition().lat()}}
33 | Lng: {{anchor.getPosition().lng()}}
34 |
    35 |
  • {{item}}
  • 36 |
37 |
38 |
39 | 40 | 43 | 44 | 45 |
46 | Lat: {{anchor.getPosition().lat()}}
47 | Lng: {{anchor.getPosition().lng()}}
48 |
49 |
50 | 51 | 52 |
53 | 54 | 55 | -------------------------------------------------------------------------------- /testapp/infowindow_geolookup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | Hi, I am here.
13 | Hi, I am here.
14 | Hi, I am here.
15 | Hi, I am here.
16 | Hi, I am here.
17 | Hi, I am here.
18 | Hi, I am here.
19 |
20 |
21 |
22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /testapp/infowindow_ng_click.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 34 | 35 | 36 |
37 | 38 | 41 | 42 | 43 | 44 |
45 | id: {{vm.shop.id}}
46 | name: {{vm.shop.name}}
47 | Position 1: {{vm.shop.position}}
48 | Position 2: {{anchor.getPosition()}}
49 | Position 3: {{vm.map.markers[vm.shop.id].getPosition()}}
50 | Click Here 51 |
52 |
53 |
54 | 55 | 58 | 61 |
62 | 63 | 64 | -------------------------------------------------------------------------------- /testapp/layer-bicycling.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /testapp/layer-data-dynamic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 39 | 40 | 41 |
42 | 43 | 49 | 50 | 51 |

{{letter}}

52 |
53 | 54 | 55 | -------------------------------------------------------------------------------- /testapp/layer-data-quakes-default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /testapp/layer-data-quakes-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 23 | 24 | 25 |
26 | 27 | 29 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /testapp/layer-data-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /testapp/layer-data-style.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 13 | 14 | 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /testapp/layer-dynamicmapsengine.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 21 | 22 | 23 | Circle Simple
24 | This example creates circles on the map, representing 25 | populations in North America. 26 |
27 | 28 | 34 | 35 | 36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /testapp/layer-fusiontables-heatmap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 15 | 16 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /testapp/layer-fusiontables-query.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 15 | 16 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /testapp/layer-fusiontables-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 14 | 15 | 16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /testapp/layer-fusiontables-styling.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /testapp/layer-georss.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /testapp/layer-kml-features.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 |
18 | 19 | 21 | 22 | {{description}} 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /testapp/layer-kml.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /testapp/layer-mapsengine.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /testapp/layer-style-event.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 22 | 23 | 24 |
25 | 26 | 29 | 30 |

{{vm.letter}}

31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /testapp/layer-traffic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /testapp/layer-transit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /testapp/lib/prettify-tomorrow-night.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | .prettyprint { 4 | background: #1d1f21; 5 | font-family: Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Consolas, monospace; 6 | font-size: 12px; 7 | line-height: 1.5; 8 | border: 1px solid #ccc; 9 | padding: 10px; 10 | } 11 | 12 | .pln { 13 | color: #c5c8c6; 14 | } 15 | 16 | @media screen { 17 | .str { 18 | color: #b5bd68; 19 | } 20 | 21 | .kwd { 22 | color: #b294bb; 23 | } 24 | 25 | .com { 26 | color: #969896; 27 | } 28 | 29 | .typ { 30 | color: #81a2be; 31 | } 32 | 33 | .lit { 34 | color: #de935f; 35 | } 36 | 37 | .pun { 38 | color: #c5c8c6; 39 | } 40 | 41 | .opn { 42 | color: #c5c8c6; 43 | } 44 | 45 | .clo { 46 | color: #c5c8c6; 47 | } 48 | 49 | .tag { 50 | color: #cc6666; 51 | } 52 | 53 | .atn { 54 | color: #de935f; 55 | } 56 | 57 | .atv { 58 | color: #8abeb7; 59 | } 60 | 61 | .dec { 62 | color: #de935f; 63 | } 64 | 65 | .var { 66 | color: #cc6666; 67 | } 68 | 69 | .fun { 70 | color: #81a2be; 71 | } 72 | } 73 | @media print, projection { 74 | .str { 75 | color: #006600; 76 | } 77 | 78 | .kwd { 79 | color: #006; 80 | font-weight: bold; 81 | } 82 | 83 | .com { 84 | color: #600; 85 | font-style: italic; 86 | } 87 | 88 | .typ { 89 | color: #404; 90 | font-weight: bold; 91 | } 92 | 93 | .lit { 94 | color: #004444; 95 | } 96 | 97 | .pun, .opn, .clo { 98 | color: #444400; 99 | } 100 | 101 | .tag { 102 | color: #006; 103 | font-weight: bold; 104 | } 105 | 106 | .atn { 107 | color: #440044; 108 | } 109 | 110 | .atv { 111 | color: #006600; 112 | } 113 | } 114 | /* Specify class=linenums on a pre to get line numbering */ 115 | ol.linenums { 116 | margin-top: 0; 117 | margin-bottom: 0; 118 | } 119 | 120 | /* IE indents via margin-left */ 121 | li.L0, 122 | li.L1, 123 | li.L2, 124 | li.L3, 125 | li.L4, 126 | li.L5, 127 | li.L6, 128 | li.L7, 129 | li.L8, 130 | li.L9 { 131 | /* */ 132 | } 133 | 134 | /* Alternate shading for lines */ 135 | li.L1, 136 | li.L3, 137 | li.L5, 138 | li.L7, 139 | li.L9 { 140 | /* */ 141 | } 142 | -------------------------------------------------------------------------------- /testapp/map-geolocation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Showing current location with infoWindow
10 | Note: This example requires that you consent to location sharing when 11 | prompted by your browser. If you see a blank space instead of the map, this 12 | is probably because you have denied permission for location sharing. 13 |
14 | 15 | 16 | Location found using HTML5. 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /testapp/map-gulp-usemin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Simle Map 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /testapp/map-gulp-usemin/map-gulp-usemin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Simle Map 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /testapp/map-initialized-callback.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Map Initialized Callback 5 | 6 | 7 | 15 | 16 | 17 | 18 | 19 | $scope.mymap.center: {{mymap.getCenter().lat()}} 20 | 21 | 22 | -------------------------------------------------------------------------------- /testapp/map-initialized.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Simle Map 5 | 6 | 7 | 8 | 9 | 10 | 18 | 19 | 20 | 21 | 22 | $scope.map.center: {{map.getCenter().lat()}}
23 | $scope.mymap.center: {{mymap.getCenter().lat()}} 24 | 25 | 26 | -------------------------------------------------------------------------------- /testapp/map-lazy-inint.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 27 | 28 | 29 | 30 |
31 | 33 | 34 | 37 | 38 | 39 |
40 | Lat: {{anchor.getPosition().lat()}}
41 | Lng: {{anchor.getPosition().lng()}}
42 |
    43 |
  • {{item}}
  • 44 |
45 |
46 |
47 |
48 |
49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /testapp/map-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Simle Map 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /testapp/map-with-dynamic-id.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Simle Map 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /testapp/map_control.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | All controls are messed up intentionally. 10 |

11 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /testapp/map_fit_bounds.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /testapp/map_geo_fallback_center.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /testapp/map_no_default_style.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 |

With Default Style

13 | display:block; height: 300px
14 | 15 | 16 |

Without Default Style

17 | display:block; height: 300px
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /testapp/map_options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | As defined at, https://developers.google.com/maps/documentation/javascript/reference#MapOptions, you can add any attributes except control-related to map attributes. 10 | 11 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /testapp/map_with_address.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /testapp/map_with_current_position.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 19 | 20 | 21 | 22 | NOTE: open console, then see the message from callback 23 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /testapp/map_with_dynamic_address.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | 14 | 15 |
Address : 16 | 17 | 18 | -------------------------------------------------------------------------------- /testapp/map_with_dynamic_center.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | 14 | 15 |
Latigude : 16 |
Longitude : 17 | 18 | 19 | -------------------------------------------------------------------------------- /testapp/map_zoom_to_include_markers.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 25 | 26 | 27 | 28 | 29 |

Without zoom-to-include-markers

30 | 31 | 33 | 34 | 35 |

With zoom-to-include-markers='true'

36 | 39 | 41 | 42 | 43 |

With zoom-to-include-markers='auto'

44 | Please click on map to add more markers 45 | 49 | 51 | 52 | 53 |

custom-marker zoom-to-include-markers='auto'

54 | Please click on map to add more markers 55 | 59 | 61 |
62 | position: {{p.pos[0]}}, {{p.pos[1]}} 63 |
64 |
65 |
66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /testapp/mapsenginelayer-noauth-layerid.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Circle Simple
10 | This example creates circles on the map, representing 11 | populations in North America. 12 | 13 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /testapp/mapsenginelayer-noauth-layerkey.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /testapp/maptype-base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 33 | 44 | 45 | 46 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /testapp/maptype-image-overlay.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /testapp/maptype-image.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /testapp/maptype-overlay.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /testapp/maptype-styled-complex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /testapp/maptype-styled-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /testapp/marker-animations-iteration.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 46 | 47 | 48 | 49 | Marker animations with setTimeout()
50 | If you're adding a number of markers, you may want to 51 | drop them on the map consecutively rather than all at once. 52 | This example shows how to use setTimeout() to space 53 | your markers' animation. 54 | 69 |
70 |
71 | 72 |
73 | 74 | 75 |
76 | 77 | 78 | -------------------------------------------------------------------------------- /testapp/marker-animations.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 19 | 20 | 21 | 22 | Marker Animations
23 | The following example creates a marker in Stockholm, Sweden 24 | using a DROP animation. Clicking on the marker will toggle 25 | the animation between a BOUNCE animation and no animation. 26 |
27 | 28 | 32 | 33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /testapp/marker-clusterer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynamic ngMap demo 6 | 7 | 8 | 9 | 13 | 14 | 29 | 32 | 33 | 34 | 35 |

Marker Cluster

36 |
37 |
38 | 39 |
40 | 41 | 42 | -------------------------------------------------------------------------------- /testapp/marker-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /testapp/marker-symbol-custom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Marker Symbol Custom
10 | This example uses SVG path notation to add a vector-based symbol 11 | as the icon for a marker. The resulting icon is a star-shaped symbol 12 | with a pale yellow fill and a thick yellow border. 13 | 14 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /testapp/marker-symbol-predefined.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Marker Symbol Predefined
10 | This example uses a symbol to add a vector-based icon to a marker. 11 | The symbol uses one of the predefined vector paths ('CIRCLE') supplied by the 12 | Google Maps JavaScript API. 13 | 14 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /testapp/marker-with-default-options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 | 17 | 18 | 19 |

Marker With Default Options Configured

20 | The following marker has default option, optimized="false" 21 | 23 | 24 | 25 | 26 | 27 | The following marker overides default option because 28 | user provided optimized="true" 29 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /testapp/marker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /testapp/marker_data_with_ng_repeat.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 32 | 33 | 34 | 35 |
36 | 37 | 42 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /testapp/marker_dynamic_ng_repeat.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynamic ngMap demo 6 | 7 | 8 | 28 | 29 | 30 | 31 |

Dynamic Markers Demo Using ng-repeat

32 |
33 | 34 |
35 | 36 | 37 | 38 |
39 | 40 | 41 | -------------------------------------------------------------------------------- /testapp/marker_icon.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /testapp/marker_on_street_view.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /testapp/marker_with_address.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /testapp/marker_with_current_position.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /testapp/marker_with_dynamic_address.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 |
Address : 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /testapp/marker_with_ng_repeat_dynamic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynamic ngMap demo 6 | 7 | 8 | 29 | 32 | 33 | 34 | 35 |

Dynamic Markers With ng-repeat

36 |
37 | 38 |
39 | 40 | 41 | 42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /testapp/marker_with_ng_repeat_no_watcher.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 | 17 | 18 | 19 | Draggable 20 | 21 | 26 | 27 | draggable: {{draggable}} 28 | 29 | 30 | -------------------------------------------------------------------------------- /testapp/marker_with_parent_controller.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Markers with parent controller(scope) 6 | 7 | 8 | 26 | 29 | 30 | 31 | 32 |

Markers with parent controller(scope)

33 | 34 |
35 |
36 |
37 | 38 |
39 |
40 |
41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /testapp/multiple_maps_on_a_page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /testapp/overlay-custom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /testapp/overlay-hideshow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 28 | 29 | 30 | 31 | 46 |
47 |
48 | 49 | 50 |
51 | 52 | 53 |
54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /testapp/overlay-remove.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 21 | 22 | 23 | 24 | 39 |
40 |
41 | 42 | 43 |
44 | 45 | 48 | 49 | 50 |
51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /testapp/overlay-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 23 | 24 | 25 | 26 |
27 | 28 | 29 |
30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /testapp/overlay-symbol-animate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 22 | 23 | 24 | 25 |
26 | 27 | 37 | 38 | 39 |
40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /testapp/overlay-symbol-arrow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /testapp/overlay-symbol-custom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /testapp/overlay-symbol-dashed.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /testapp/partials/custom-info-window-template.html: -------------------------------------------------------------------------------- 1 |
2 | I'm an external template
3 | Lat: {{anchor.getPosition().lat()}}
4 | Lng: {{anchor.getPosition().lng()}}
5 | 8 |
-------------------------------------------------------------------------------- /testapp/places-auto-complete-strictbounds-circle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Place Autocomplete Address Form With Circle Bound Restriction 5 | 6 | 7 | 8 | 29 | 30 | 31 | 32 | 33 | 34 | Auto Complete Type: 35 |
40 | 41 | Bounds Lat: 42 | Lng: 43 | Radius: 44 | 45 |
46 |
47 | 48 | Enter an address:
49 | 50 |
57 | 58 |
59 | Address = {{vm.place.formatted_address}}
60 | Location: {{vm.place.geometry.location}}
61 |
62 | 63 | address : {{vm.address}} 64 | 65 |
66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /testapp/places-auto-complete-strictbounds-rect.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Place Autocomplete Address Form With Rectangual Bound Restriction 5 | 6 | 7 | 8 | 28 | 29 | 30 | 31 | 32 | 33 | Auto Complete Type: 34 |
39 | 40 | Bounds Lat: 41 | Lng: 42 | Lat: 43 | Lng: 44 | 45 |
46 |
47 | 48 | Enter an address:
49 | 50 |
57 | 58 |
59 | Address = {{vm.place.formatted_address}}
60 | Location: {{vm.place.geometry.location}}
61 |
62 | 63 | address : {{vm.address}} 64 | 65 |
66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /testapp/places-auto-complete-strictbounds.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Place Autocomplete Address Form 5 | 6 | 7 | 8 | 28 | 29 | 30 | 31 | 32 | 33 | Auto Complete Type: 34 |
39 | 40 | Bounds Lat: 41 | Lng: 42 | Lat: 43 | Lng: 44 | 45 |
46 |
47 | 48 | Enter an address:
49 | 50 |
57 | 58 |
59 | Address = {{vm.place.formatted_address}}
60 | Location: {{vm.place.geometry.location}}
61 |
62 | 63 | address : {{vm.address}} 64 | 65 |
66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /testapp/places-auto-complete.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Place Autocomplete Address Form 5 | 6 | 7 | 21 | 22 | 23 | 24 | Auto Complete Type: 25 |
30 | 31 | Enter an address:
32 |
37 |
38 | Address = {{vm.place.formatted_address}}
39 | Location: {{vm.place.geometry.location}}
40 |
41 | address : {{vm.address}} 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /testapp/polygon-arrays.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 41 | 42 | 43 | 44 |
45 | 48 | 60 | 61 | 62 |
63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /testapp/polygon-autoclose.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /testapp/polygon-draggable.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 19 | 20 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /testapp/polygon-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /testapp/polyline-complex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 | 17 | 18 | 19 | 20 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /testapp/polyline-remove.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 21 | 36 | 37 | 38 | 39 |
40 | 41 | 42 |
43 | 44 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /testapp/polyline-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /testapp/rectangle-event.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 22 | 23 | 24 | 25 | Rectangle Event
26 | This example adds a user-editable rectangle to the map. 27 | When the user changes the bounds of the rectangle, 28 | an info window pops up displaying the new bounds. 29 |
30 | 31 | 36 | 37 | 38 |
39 | Rectangle moved.
40 | New north-east corner: {{vm.ne.lat()}}, {{vm.ne.lng()}}
41 | New south-west corner: {{vm.sw.lat()}}, {{vm.sw.lng()}} 42 |
43 |
44 |
45 | 46 | Rectangle moved.
47 | New north-east corner: {{vm.ne.lat()}}, {{vm.ne.lng()}}
48 | New south-west corner: {{vm.sw.lat()}}, {{vm.sw.lng()}} 49 |
50 | 51 | 52 | -------------------------------------------------------------------------------- /testapp/rectangle-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /testapp/rectangle-zoom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 20 | 21 | 22 | 23 | 27 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /testapp/scripts/get-starbucks.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This is to generate startbucks.json, locations of all starbucks world wide 3 | */ 4 | var request = require("request"); 5 | 6 | var base = "https://opendata.socrata.com/resource/92ua-293q.json"; 7 | var stores = []; 8 | 9 | for (var i=0; i<21000; i+=1000) { 10 | var url = base + "?$offset=" + i; 11 | request({ url: url, json: true }, function (error, response, body) { 12 | if (!error && response.statusCode === 200) { 13 | stores = stores.concat(body); 14 | } 15 | if (stores.length > 20000) { 16 | console.log(JSON.stringify(stores)); 17 | } 18 | }) 19 | } 20 | -------------------------------------------------------------------------------- /testapp/shape.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /testapp/shape_circle_with_current_position.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /testapp/shape_circle_with_dynamic_address.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | 14 | 15 | 19 | 23 | 24 |
Address : 25 | 26 | 27 | -------------------------------------------------------------------------------- /testapp/shape_with_ng_repeat.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 20 | 21 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /testapp/street-view-panorama.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | 14 | 15 | 16 | 17 | 18 | 27 | 28 | 29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /testapp/street-view-panorama_container.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /testapp/street-view-panorama_container2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /testapp/ui-bootstrap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AngularJS: UI-Router Quick Start 5 | 6 | 7 | 8 | 9 | 10 | 11 | 26 | 27 | 28 | 29 | 33 | 37 | 45 | 46 |
47 |
48 |
49 |
50 |
51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /testapp/ui-router2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AngularJS: UI-Router Quick Start 5 | 6 | 7 | 8 | 9 | 10 | 28 | 29 | 30 | 31 | This is to test not to share map instance if `id` is given 32 | 36 | 37 | 41 | 42 | 50 | 51 |
52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /testapp/user-editable-shapes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 14 | 15 | 16 | 17 | 18 | --------------------------------------------------------------------------------