Giter Site home page Giter Site logo

andrewjbateman / angular-arcgis-multimaps Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 2.0 15.53 MB

:clipboard: Angular multi-page app using RxJS operators and ArcGIS esri-mapping solutions from Esri to display a map. Tailwind CSS used for reduced styles build bundle. For the About page info. the Github API is accessed using Angular httpClient and the RxJS take(1) method.

JavaScript 0.05% TypeScript 4.15% HTML 2.17% SCSS 90.27% CSS 3.36%
angular arcgis rxjs tailwind tailwindcss pwa angular-universal esri-javascript-api esri rxjs7 javascript typescript angular17

angular-arcgis-multimaps's Introduction

Angular ArcGIS Multimaps

  • Angular multi-page app using RxJS operators and ArcGIS API mapping from Esri to display map *** Note: to open web links in a new window use: ctrl+click on link**

๐Ÿ“„ Table of contents

๐Ÿ“š General info

  • Basic PWA app with Tailwind CSS
  • Esri-map view refactored to use @arcgis/core mapView and WebMap with a GraphicsLayer to allow sketching
  • WebView map specified using a portalItem id
  • About page - info. about the app
  • Contact page - info. about the author - data from Github API
  • Location page uses sessionStorage to store user coordinates and these are lost the moment the browser is closed
  • Progressive Web App (PWA) capability added. The PWA is still evolving and I believe worth including in an app but needs to be kept up to date
  • ArcGIS API for Javascript CDN link in esri-map component.
  • ArcGIS for Developers offers a full suite of tools and resources to build mapping and analytics solutions. Use ArcGIS APIs to create location-based applications for web, desktop, and mobile devices.
  • Esri - about
  • RxJS subscriptions objects used to represent the execution of observables

๐Ÿ“ท Screenshots

Example screenshot Example screenshot Example screenshot Example screenshot

๐Ÿ“ถ Technologies

๐Ÿ’พ Setup

  • Install dependencies by running npm i then enter:
  • npm start for a dev server. Navigate to http://localhost:4200/.
  • npm run build for a PWA build folder (not working)
  • http-server -p 8080 -c-1 dist/angular-arcgis-multimaps/ then select http://127.0.0.1:8080 to see PWA app running on a dev server (ng serve does not work)
  • The app will automatically reload if you change any of the source files

๐Ÿ”ฆ Testing

  • ng test to execute the unit tests via Karma.
  • ng lint to lint all files
  • ng e2e to execute the end-to-end tests via Protractor.

๐Ÿ’ป Code Examples

  • extract from app/pages/location/services/coords.service.ts
    // handle error if geolocation request unsuccesful
    function handleError(error: any) {
      let errorStr;
      switch (error.code) {
        case error.PERMISSION_DENIED:
          errorStr = 'User denied the request for Geolocation.';
          break;
        case error.POSITION_UNAVAILABLE:
          errorStr = 'Location information is unavailable.';
          break;
        case error.TIMEOUT:
          errorStr = 'The request to get user location timed out.';
          break;
        case error.UNKNOWN_ERROR:
          errorStr = 'An unknown error occurred.';
          break;
        default:
          errorStr = 'An unknown error occurred.';
      }
      console.error('An error occurred: ' + errorStr);
    }

๐Ÿ†’ Features

  • Tailwind purges unused CSS to make a very small styles build bundle
  • 100% perfect Lighthouse score for About page

๐Ÿ“‹ Status & To-Do List

  • Status: Working
  • To-Do: Nothing

๐Ÿ‘ Inspiration

โœ‰๏ธ Contact

angular-arcgis-multimaps's People

Contributors

andrewjbateman avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.