Max Chu | 3c8b65f | 2017-07-19 17:47:59 -0700 | [diff] [blame] | 1 | <div class = "row"> |
| 2 | <div class = "col-xs-12"> |
| 3 | <h1>Metronet Map</h1> |
| 4 | <div map-lazy-load="https://maps.googleapis.com/maps/api/js?key=AIzaSyA3rQOp26I5a21VQhwLal8Z1x3XGHjXfm4"> |
| 5 | <ng-map |
| 6 | default-style="false" |
| 7 | class="metronet" |
| 8 | id="foobar" |
| 9 | center="0,0" |
| 10 | disable-default-u-i="true" |
| 11 | map-type-id="ROADMAP" |
| 12 | zoom-control="true" |
| 13 | min-zoom="2" |
| 14 | styles="{{vm.mapStyles}}" |
| 15 | > |
| 16 | <!--Markers--> |
| 17 | <marker |
| 18 | ng-repeat="uni in vm.unis" |
| 19 | id="marker-{{uni.id}}" |
| 20 | position="{{uni.latlng.toString()}}" |
| 21 | icon="{{vm.MapConfig.marker}}" |
| 22 | on-click="vm.showUni(uni)" |
| 23 | > |
| 24 | </marker> |
| 25 | |
| 26 | <!--Marker Info Window--> |
| 27 | |
| 28 | <info-window id = "uni-info"> |
| 29 | <div class = "marker-info"> |
| 30 | <h4>{{vm.current_uni.name}}</h4> |
| 31 | <p> |
| 32 | <b>LatLng: </b>{{vm.current_uni.latlng.toString()}}<br/> |
| 33 | <b>Cpe id: </b>{{vm.current_uni.cpe_id}}<br/> |
| 34 | <b>Tenant: </b>{{vm.current_uni.tenant}}<br/> |
| 35 | </p> |
| 36 | <button ng-show="vm.canCreateEline" ng-click="vm.createConnection(vm.current_uni)()">Create connection</button> |
| 37 | <button ng-show="!vm.canCreateEline && !uni.eline_start" ng-click="vm.finishConnection(vm.current_uni)">Finish connection</button> |
| 38 | </div> |
| 39 | </info-window> |
| 40 | |
| 41 | <!--Connections--> |
| 42 | |
| 43 | <shape |
| 44 | ng-repeat="eline in vm.elines" |
| 45 | name="polyline" |
| 46 | id="eline-{{eline.id}}" |
| 47 | path="{{eline.path}}" |
| 48 | stroke-color="{{vm.colorLine(eline.backend_status)}}" |
| 49 | stroke-opacity="1.0" |
| 50 | stroke-weight="5" |
| 51 | on-click="vm.elinePanel({{eline}}, true)" |
| 52 | > |
| 53 | </shape> |
| 54 | |
| 55 | </ng-map> |
| 56 | |
| 57 | </div> |
Max Chu | dafc0ba | 2017-08-15 11:03:09 -0700 | [diff] [blame] | 58 | Changes may not display until page refresh. |
Max Chu | 3c8b65f | 2017-07-19 17:47:59 -0700 | [diff] [blame] | 59 | </div> |
| 60 | </div> |
| 61 | <!--"https://maps.googleapis.com/maps/api/js?key=AIzaSyA3rQOp26I5a21VQhwLal8Z1x3XGHjXfm4"--> |