POST
|
Thank you. Huge oversight on my part not to add another async/wait at the beginning.
... View more
02-29-2024
12:48 PM
|
0
|
0
|
302
|
POST
|
Empty is just treated like 100%. Are you importing with the .css extension in your sass file? I would import the css in your JavaScript file rather than the sass file so it doesn't try to process it.
... View more
02-26-2024
09:06 AM
|
0
|
0
|
93
|
POST
|
Looks like you are adding the features. You want to add the OBJECTID response.features[iii].attributes.OBJECTID You can see this sample here. https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=widgets-featuretable-popup-interaction
... View more
02-26-2024
09:01 AM
|
1
|
0
|
82
|
POST
|
Sorry for the confusion, here's the map with the other layers removed: The call to fetch the image is successful so that's working. I still can't figure out why the renderer isn't assigning the symbol to the feature. I modified my code a bit to create a new attribute that better describes each unique value. public addCollisionGraphicLayer(mapView: __esri.MapView): void {
const graphicsArr = [];
const groupJsonArr = this.mapStateObj.groupJson;
console.log(groupJsonArr);
groupJsonArr.forEach((graphic: string) => {
const parsedGraphic = JSON.parse(graphic)
if (this.environment.production) {
graphicsArr.push(Graphic.fromJSON(parsedGraphic.shownGraphic));
} else {
const devGraphic = this.getGraphicFromLocal(parsedGraphic);
console.log('dev graphic', devGraphic);
graphicsArr.push(devGraphic);
}
});
const symbol: __esri.PictureMarkerSymbolProperties = {
url: '/assets/collision-diagram/icons/CrashSymbols/Black/FrontToRear.png',
width: '200px',
height: '200px'
};
const crashRenderer = {
type: 'unique-value',
field: 'symbolType',
uniqueValueInfos: [{
value: 'Front to Rear',
symbol: new PictureMarkerSymbol(symbol)
}]
}
const featureLayerProperties: __esri.FeatureLayerProperties = {
source: graphicsArr,
id: 'groupLayer',
title: 'Group Layer',
objectIdField: 'crashId',
renderer: crashRenderer as __esri.RendererProperties
};
this.collisionMap.addFeatureLayer(featureLayerProperties, mapView).catch((error: any) => console.error(error));
}
private getGraphicFromLocal(graphic: any): Graphic {
console.log('graphic symbol', graphic);
// Create a new Point geometry
const pointGeometry = new Point({
x: graphic.shownGraphic.geometry.x,
y: graphic.shownGraphic.geometry.y,
spatialReference: graphic.shownGraphic.geometry.spatialReference
});
// Create a new graphic object
const localGraphic = new Graphic({
geometry: pointGeometry,
// symbol: graphic.shownGraphic.symbol,
attributes: {
...graphic.shownGraphic.attributes,
symbolType: graphic.symbol
}
});
return localGraphic;
}
... View more
02-22-2024
11:07 AM
|
0
|
0
|
190
|
POST
|
The Feature widget only supports a single graphic, if you want multiple graphics, you can use the Features widget, however I'm not sure about the UX of having multiple graphics populate it on hover, as when you navigate to the Features UI, it will probably change the graphics before your mouse gets there. pointer-move is the right event you are looking for, and that side panel example is on the right track, just wrong widget.
... View more
02-15-2024
07:07 AM
|
1
|
0
|
154
|
POST
|
Thank you for posting your question here @MauricioBarrera. Would you be interested in discussing your project, and why you are creating a custom print component?
... View more
02-13-2024
08:55 AM
|
0
|
0
|
103
|
POST
|
That works for my example. I have a little more digging to do for the actual Angular implementation, but we can call this resolved. Thanks!
... View more
02-08-2024
09:27 AM
|
0
|
0
|
225
|
POST
|
This probably means there was not a result for that address, so you probably need to add some checks that you have a valid result.
... View more
01-19-2024
12:15 PM
|
0
|
0
|
350
|
POST
|
FeatureServer services don't have a /find endpoint. https://developers.arcgis.com/rest/services-reference/enterprise/feature-service.htm find works for MapServer endpoints
... View more
01-18-2024
08:45 AM
|
1
|
0
|
161
|
POST
|
Hello @SafaaMamdouh , Thank you so much for your code. It is clear and easy to understand. The thing is, that it asks the user for credentials (which I prefer not to) or if it is written hard coded in the code, it is very easy to find (you just open F12 and see it). I'm looking for 2 options, depend on the identity store: a. If it is a BUILT-IN identity store, I'm looking for a way to dedicate a user that will have the permissions to view the service and kind of a web service (in server side) that will get this user name and password and create a token based on this user & password, something like the proxy.ashx that was supported in the past. Now I understand that it is not recommended/supported anymore. b. If it is WINDOWS identity store, I'm looking for a way to fetch the user name & password of the user and generate the token accordingly. I hope I explained myself well.... Thanks again, Miri
... View more
12-27-2023
11:33 PM
|
0
|
0
|
346
|
POST
|
Here's an updated version of your script with placeholders for the API key and portal ID: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> <title>Lumen Web Map</title> <style> html, body, #viewDiv { padding: 0; margin: 0; height: 100%; width: 100%; } </style> <link rel="stylesheet" href="https://js.arcgis.com/4.19/esri/themes/light/main.css"> <script src="https://js.arcgis.com/4.19/"></script> <script> require([ "esri/config", "esri/WebMap", "esri/views/MapView", "esri/widgets/ScaleBar", "esri/widgets/Legend" ], function (esriConfig, WebMap, MapView, ScaleBar, Legend) { esriConfig.apiKey = "YOUR_API_KEY"; const webmap = new WebMap({ portalItem: { id: "YOUR_PORTAL_ID" } }); const view = new MapView({ container: "viewDiv", map: webmap }); }); </script> </head> <body> <div id="viewDiv"></div> </body> </html> Make sure to replace "YOUR_API_KEY" and "YOUR_PORTAL_ID" with your actual API key and portal ID.
... View more
12-19-2023
11:34 PM
|
0
|
0
|
444
|
POST
|
LayerView queries are all clientside, so if the data is not currently in the view, it's not available. If you want to guarantee you can find results in all your data (in/outside the view), you need to query the layer directly.
... View more
12-13-2023
06:42 AM
|
1
|
0
|
257
|
POST
|
This can be accomplished via CustomContent for the PopupTemplate. The ImageMediaInfo is probably the cleanest way to do it for images. Here is a blog post on pulling images from a third-party API that might help too.
... View more
12-11-2023
07:18 AM
|
0
|
0
|
1553
|
POST
|
Thank you, it really works and not only for a feature layer. Is it possible to do the same thing for array of layers or I should use this script for each needed layer separately? Update: solved. I understood that esriConfig.request.interceptors.push means that interceptors is array so we can add several elements into it.
... View more
12-08-2023
10:54 PM
|
0
|
0
|
1031
|
Title | Kudos | Posted |
---|---|---|
1 | Friday | |
1 | Tuesday | |
2 | 4 weeks ago | |
1 | 4 weeks ago | |
1 | 4 weeks ago |
Online Status |
Offline
|
Date Last Visited |
yesterday
|