Merge pull request #29 from Pear-Trading/finn/moremaps

Added zoom level to map
This commit is contained in:
Finn 2017-11-14 11:11:01 +00:00 committed by GitHub
commit 46d5eef360
5 changed files with 26 additions and 9 deletions

View file

@ -4,6 +4,7 @@
* Customer Leaderboards added
* Map made available to Customers
* Clustering added to Map
* Map renamed from "Supplier Map" to "Purchase Map" to fall in line with
previous change
* Added placeholder while password reset is not present

10
package-lock.json generated
View file

@ -9,6 +9,11 @@
"resolved": "https://registry.npmjs.org/@agm/core/-/core-1.0.0-beta.1.tgz",
"integrity": "sha512-IVwQGmcaE42SmYY2e5QwqOC0vrSXZCW8BhATY0Vpy3NjbiydSXi9T81hVqKLvuKaB3ves1sv3W++SB1Wj+5B6A=="
},
"@agm/js-marker-clusterer": {
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/@agm/js-marker-clusterer/-/js-marker-clusterer-1.0.0-beta.2.tgz",
"integrity": "sha512-sQzNo+2NwjgVAiy/AU3deYvemoH3CHtYvh+aH/3jq9yIK+2ZiuwhZ2oKmoBsVPEMzLjOqF07FhDLowrAAZfVRw=="
},
"@angular-devkit/build-optimizer": {
"version": "0.0.13",
"resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.0.13.tgz",
@ -4650,6 +4655,11 @@
"integrity": "sha1-8OgK4DmkvWVLXygfyT8EqRSn/M4=",
"dev": true
},
"js-marker-clusterer": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/js-marker-clusterer/-/js-marker-clusterer-1.0.0.tgz",
"integrity": "sha1-yUvoWuiJaBnlHBMfiR3StVVY3Rc="
},
"js-tokens": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",

View file

@ -19,6 +19,7 @@
"private": true,
"dependencies": {
"@agm/core": "^1.0.0-beta.1",
"@agm/js-marker-clusterer": "^1.0.0-beta.2",
"@angular/common": "4.0.3",
"@angular/compiler": "4.0.3",
"@angular/core": "4.0.3",
@ -32,6 +33,7 @@
"angular-in-memory-web-api": "^0.3.1",
"chart.js": "2.5.0",
"core-js": "2.4.1",
"js-marker-clusterer": "^1.0.0",
"moment": "^2.18.1",
"ng2-charts": "1.6.0",
"ng2-validation-manager": "^0.3.1",

View file

@ -5,6 +5,7 @@ import { ChartsModule } from 'ng2-charts/ng2-charts';
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
import { NgxPaginationModule } from 'ngx-pagination';
import { AgmCoreModule, GoogleMapsAPIWrapper } from '@agm/core';
import { AgmJsMarkerClustererModule } from '@agm/js-marker-clusterer';
import { CurrencyPipe } from '@angular/common';
@ -42,6 +43,7 @@ import { environment } from '../../environments/environment';
AgmCoreModule.forRoot({
apiKey: environment.mapApiKey
}),
AgmJsMarkerClustererModule,
BsDropdownModule,
NgxPaginationModule,
DashboardRoutingModule,

View file

@ -22,6 +22,7 @@
[zoom]="zoom"
[scaleControl]="true"
(idle)="viewBoundsChanged($event)">
<agm-marker-cluster maxZoom="13" imagePath="https://raw.githubusercontent.com/googlemaps/v3-utility-library/master/markerclustererplus/images/m">
<agm-marker
*ngFor="let m of markers"
[latitude]="m.latitude"
@ -32,6 +33,7 @@
<strong>{{m.name}}</strong>
</agm-info-window>
</agm-marker>
</agm-marker-cluster>
</agm-map>
</div>
</div>