其他分享
首页 > 其他分享> > Learn Progressive Web Apps All In One

Learn Progressive Web Apps All In One

作者:互联网

Learn Progressive Web Apps All In One

https://web.dev/learn/pwa/

Resources

React with CRA: Making a PWA
Next.js: PWA Sample
Vue: CLI PWA Plugin
Angular: Service Worker and PWA Documentation
Svelte: Build a PWA
Nuxt.js: PWA
Jekyll PWA Plugin
Gatsby: PWA
ASP.NET: Build PWAs with ASP.NET Core Blazor WebAssembly
Django: Make PWA of a Django Project
Flutter: Building a web application with Flutter
Wordpress: PWAs for Wordpress

https://web.dev/learn/pwa/conclusion/

geolocation

const geoOptions = {
  timeout: 10 * 1000,
  enableHighAccuracy: true,
  maximumAge: 0,
};

window.navigator.geolocation.getCurrentPosition(
  (position) => {
    const cords = position.coords;
    console.log(`Latitude :  ${cords.latitude}`);
    console.log(`Longitude :  ${cords.longitude}`);
  },
  (error) => {
    console.debug(`Error: ${error.code}:${error.message}`);
    /**
     * Invoke the IP based location services
     * to fetch the latitude and longitude of the user.
     */
  },
  geoOptions,
);

// Latitude :  31.2639786
// Longitude :  121.3897594

https://web.dev/mishipay/

https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API

refs


Flag Counter

©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载

标签:Web,console,Progressive,web,Apps,https,PWA,cords
来源: https://www.cnblogs.com/xgqfrms/p/16176760.html