angular / angular/components

Document approaches for lazy-loading the Google Maps API

Đang mở
#17,828 27 bình luận 5 reaction 1 người được giao Được @mbehrlich nhận Xem trên GitHub
area: google-maps docs feature help wanted P3
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

#### Feature Description

So great to see google maps being added as apart of this library. I have had an internal version for my own projects for some time(back since angular.js and now upgraded/rewrite for angular 2+) now which wrapped the google maps lib to provide an angular integration.

One of the major issues we had was you do not want to wait for or load the google maps api on every page when it isn't needed. For our use case we were only using it on a details page for 2 records + on some reports if they happened to have a map. It required some heavy changes to make all google map related calls actually start from a promise/observable which loads the sdk first if it isn't already present.

I get that there is the `async` and other script tags to defer loading but still once you need this feature it is basically a must have and it also requires some hard API changes so I'd really hope it's could be applied sooner rather than later.

I currently have directives/components for the following:
- routes
- markers
- heat maps
- the map itself

@mbehrlich From release notes I think you are the primary person working on maps. Would be great to get your thoughts on this.

#### Use Case

Most apps aren't loading maps on every page and the maps sdk is quite large if you aren't using it.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.