GithubHelp home page GithubHelp logo

esri / systems-integrations Goto Github PK

View Code? Open in Web Editor NEW
6.0 4.0 2.0 41 KB

This repository contains sample apps, scripts, and guidance for integrating ArcGIS with different systems.

License: Apache License 2.0

HTML 28.39% JavaScript 66.91% CSS 4.70%
salesforce arcgis-platform arcgis-online arcgis-enterprise

systems-integrations's Introduction

Systems Integrations

This repository contains sample apps, scripts, and guidance for integrating ArcGIS with different systems.

ArcGIS Platform

For many of the samples there is an ArcGIS Platform API Key required. You can create a free ArcGIS Developer Account at developers.arcgis.com. You can create an API Key using the developer dashboard. The developer account includes a generous free tier for some of the services and there is a pricing tab for more information about the cost of the services

ArcGIS Online and ArcGIS Enterprise

Some of the samples demonstrate integrating ArcGIS Online and ArcGIS Enterprise with a system. You will need your own license for ArcGIS Online and ArcGIS Enterprise to test these samples.

Please let us know if you have feedback, find issues, or have ideas. The team will be active on this repository.

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Terms

If you're using Esri content and services, you'll need to license your usage with an API key or an ArcGIS identity. Full details can be found here: Deployment guidelines.

License

Copyright © 2021 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's LICENSE file.

systems-integrations's People

Contributors

gavinr-maps avatar russell-sands avatar tfair avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

systems-integrations's Issues

Having issue with vectorBaseMapLayer

Promise.all error:TypeError: L.esri.Vector.vectorBasemapLayer is not a function with LWC

image

my code shown below

import { LightningElement, api, track, wire } from 'lwc';
import { getRecord } from 'lightning/uiRecordApi';
import {loadScript, loadStyle} from 'lightning/platformResourceLoader';

//Create API key using your ArcGIS Developer account developers.arcgis.com
const apiKey = "AAPK7d26ac81e074448c87dada5c283f0d0flXzs5pSuaVFJXxUOkIingEF0nQ80Q3dmKuYDfwezrifW0UoMUH3SJJeU6SiCcCL_";

const FIELDS = [
'Account.Billing_Address_Latitude__c',
'Account.BillingLongitude__c'];

const DefaultLat = 35.7796;
const DefaultLong = -78.6382;

export default class ESRIMapDemo extends LightningElement {
leafletInitialzed = false;

renderedCallback(){
  
      this.loadLeaflet();
  this.leafletInitialzed = true;
}

loadLeaflet(){
const promise1 = new Promise((resolve, reject) => {
setTimeout(() => {
resolve(loadScript(this, 'https://unpkg.com/[email protected]/dist/esri-leaflet.js'));
}, 100);
});
const promise2 = new Promise((resolve, reject) => {
setTimeout(() => {
resolve(loadScript(this, 'https://unpkg.com/[email protected]/dist/esri-leaflet-geocoder.js'));
}, 200);
});
const promise3 = new Promise((resolve, reject) => {
setTimeout(() => {
resolve(loadScript(this, 'https://unpkg.com/[email protected]/dist/esri-leaflet-vector.js'));
}, 200);
});
Promise.all([
loadStyle(this, 'https://unpkg.com/[email protected]/dist/leaflet.css'),
loadScript(this, 'https://unpkg.com/[email protected]/dist/leaflet.js'),
promise1,
promise2,
promise3,
loadStyle(this, 'https://unpkg.com/[email protected]/dist/esri-leaflet-geocoder.css'),
])
.then(() => {
this.initializeMap();
}).catch(error => {
console.log('Promise.all error:' + error);
});
}

initializeMap(){
    //var map = L.map(this.template.querySelector(".map-root")).setView([39.7392, -104.991531], 14);
    var map = L.map(this.template.querySelector(".map-root")).setView([37.837, -122.479], 8);
    
    console.log('vector====',L.esri.Vector.vectorBasemapLayer);
   
    const vectorTiles = {};
    const allEnums = [
    "ArcGIS:Imagery",
    "ArcGIS:Imagery:Standard",
    "ArcGIS:Imagery:Labels",
    "ArcGIS:LightGray"];
     vectorTiles.Default = L.esri.Vector.vectorBasemapLayer(null, {
        apiKey
    });
    
    allEnums.forEach((enumString) => {
        vectorTiles[enumString] = L.esri.Vector.vectorBasemapLayer(enumString, {
            apiKey
        });
    });

    L.control.layers(vectorTiles, null, {
      collapsed: false
    })
    .addTo(map);

    vectorTiles.Default.addTo(map);
     
}

}

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.