weixin_33749131 2016-05-08 13:56 采纳率: 0%
浏览 45

使用Google Maps Do`s Donot`s

What are things to keep in mind while using Google maps api(especially with Javascript). What care must be taken for slow connections.

What are Dos Donots?

Is CDN url mandatory for using angular maps? e.g:http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js

What would happen if internet connection is lost..

  • 写回答

1条回答 默认 最新

  • weixin_33716154 2016-05-08 20:33
    关注

    If you're building a hybrid app (Cordova/Ionic) keep a local copy of the libraries you use and import them in index.html using the relative path, that way these libraries will always be available offline.

    If you're building a webapp minimize (Closure is just an example) your libraries and code. Some libraries come minimized already, for the ones that don't (or your own source) you're gonna have to take care of this yourself. This cuts down the size of the code by a lot and speeding your loading times.

    You might be interested in ocLazyLoad. It provides a way to lighten up your index.html and speed up your loading times by deferring the load of dependencies and components to only when first needed.

    Good luck!

    评论

报告相同问题?