*** Note: to open web links in a new window use: ctrl+click on link**
esri-map
component.
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)ng test
to execute the unit tests via Karma.ng lint
to lint all filesng e2e
to execute the end-to-end tests via Protractor.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);
}
[email protected]