arcgis-js-api | Minified version of the ArcGIS API for JavaScript | REST library
kandi X-RAY | arcgis-js-api Summary
kandi X-RAY | arcgis-js-api Summary
Minified version of the ArcGIS API for JavaScript
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of arcgis-js-api
arcgis-js-api Key Features
arcgis-js-api Examples and Code Snippets
Community Discussions
Trending Discussions on arcgis-js-api
QUESTION
I have downloaded the npm i --save esri-loader @esri/react-arcgis but why is it i cant load the map? did i miss something?
...ANSWER
Answered 2022-Jan-04 at 16:36Sorry for not directly responding to your described error, but I would not use esri-loader with newer versions of ArcGIS for JavaScript API. Why not npm as ES modules which do not require a separate script loader?
This way you can do simple imports like this:
import WebMap from "@arcgis/core/WebMap";
Here are the initial setup instructions:
Finally, here is a sample react app from Esri using exactly that:
QUESTION
I'm going to display a customContent in arcgis popup template in Angular 11 application. But the value of graphic.attributes is not coming to the innerText. In console log I can see the graphic objects are coming as expected. But it's showing undefined for grahpic.attributes Can anyone help with to solve this issue?
...ANSWER
Answered 2021-Dec-17 at 19:15Ok, so it seems that the parameter of CustomContent
creator
function is of the form {graphic: Graphic}
.
The never
error is because not type was assigned, so you can assign any
to actually avoid it. I am not exactly sure of the correct type.
This is the key part of the example,
QUESTION
Is there a way to return all the attributes(fields) in a feature layer for a PopupTemplate, without declaring all of them in the fieldInfos
object in Angular?
.ts
...ANSWER
Answered 2021-Dec-10 at 12:28If you just want to create the default popup template (the table with all the fields), then you just need to use FeatureLayer
function createPopupTemplate
, it will do everything for you (ArcGIS JS API - FeatureLayer createPopupTemplate).
Now if you want to do some extra configuration, you can use the same method or popupUtils
method, wich has an extra parameter.
Here is an example I made for you to show a possible use, in there all I do is to change alias
values to make it look nicer.
QUESTION
I am working on a project with Vue. I run Vue Cli and I added the Typescript plugin. I have several vulnerabilities. When I run npm audit fix
it can't resolve the dependency conflict:
ANSWER
Answered 2021-Nov-01 at 04:56Your package.json
has a mix of dev dependencies with versions that start with ~
and ones that start with ^
. That's probably because some dev dependencies were installed with older versions of npm
that defaulted to ~
which is more conservative than ^
. As a first step, change the 8 ~
versions to ^
, remove node_modules
and (if it exists) package-lock.json
and run npm install
again. I tested this locally and it didn't reduce the number of vulnerabilities reported by npm audit
but it did reduce the number of outdated packages which is a step in the right direction.
Let's simplify things by only looking at the audit results for your production dependencies and ignoring (at least for the moment) issues in your dev dependencies. npm audit --only=prod
reports only 5 issues, all moderate. Running npm audit --only=prod --force fix
updates @capacitor/cli
from 2.x to 3.x. That's a breaking change so you'll want to test it, but if that works for you, congratulations because npm audit --only=prod
reports no vulnerabilities.
At this point, you could possibly choose not to worry much about the other issues reported by npm audit
. However if you wanted to fix them, here is the potentially tedious/arduous path I'd recommend:
- Do a manual audit of all of your dev dependencies to make sure you aren't including things you don't need. Maybe you have things that are installed that you aren't using. Uninstall them. Maybe you have things installed that are nice-to-have but you don't really need. Consider uninstalling them too.
- Run
npm outdated
to see what could be manually updated via a breaking change. Try doing those updates.
QUESTION
I'm using React [^17.0.1] and arcgis-js-api [^4.18.1] for the app,
After 'npm start' I'm receiving the below errors,
The console errors are below,
...ANSWER
Answered 2021-May-14 at 13:56Try upgrading to 4.19. What you are seeing looks like a configuration issue that was changed at 4.19.
QUESTION
I am trying to set up a proxy using node, express, and an instance of cors-anywhere for my arcgis-js-api app. My server file looks like this:
...ANSWER
Answered 2020-Dec-09 at 13:30I checked the browser console and noticed that the url being sent to the proxy instead of this
http://localhost:3030/proxy/https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer?f=json
looks like this
http://localhost:3030/proxy/https:/maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer?f=json
Not sure why it's happening, but as a quick fix you can replace
QUESTION
I am trying to pull a layer into my arcgis-js-api application and I'm having a hard time. The layer is here:
https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer
And I am trying to add it in this way:
...ANSWER
Answered 2020-Dec-04 at 16:52Ok, I think now we can summarize.
In order for this to work you need to set a proxy. Like you mention ESRI provides some implementations on different techs.
I fork their repository in order to include an easy test setup using docker and docker-compose. resource-proxy fork
After clone it run,
QUESTION
Here is my code in which I am setting and calling a popup in arcgis-js-api (4.xx) via one rest call... the problem I have an external variable I would like to populate within the field 'place' this external variable doesn't come from the same rest call, I have the value, not sure why it won't accept it in the field?
...ANSWER
Answered 2020-Jul-01 at 17:57You will not be able to add external data like a field. But you could use a function to define the content. Take a look at this example that I made for you, in there author
is the global value.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install arcgis-js-api
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page