POST
|
A polyLine is just a series of points inside a 'paths' array. You can just use a javascript .forEach() to go through each point in the array create a new Point from the coordinates and to output the screenPoint. Note polyLines can have multiple line segments so you'll want to check each line segment as well. //pseduoCode example const polyLine = feature.geometry // Your polyLine feature. polyLine.paths.forEach((path) => { //for each line segment inside your polyLine path.forEach((coordinates) => { //for each coordinate in your line segment const newPoint = new Point(...) //create a new Point using the path coordinates let screenPoint = view.toScreen(newPoint ); console.log(screenPoint.x, screenPoint.y); }) })
... View more
3 weeks ago
|
0
|
0
|
47
|
POST
|
What about LengthGeodetic? https://developers.arcgis.com/arcade/function-reference/geometry_functions/#lengthgeodetic
... View more
03-28-2024
07:54 AM
|
0
|
0
|
123
|
POST
|
the solution is here https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-workflow-in-editor-widget-issue/m-p/1390713#M83848
... View more
03-17-2024
11:43 PM
|
0
|
0
|
115
|
POST
|
Thank you very much, this is exactly what i wanted 3>
... View more
03-03-2024
10:08 PM
|
0
|
0
|
175
|
POST
|
Have you submitted a technical support request for this issue? That seems to be the best way forward.
... View more
12-21-2023
01:28 PM
|
0
|
0
|
238
|
POST
|
Apologies for borrowing this thread, but this question seems relevant: I cannot find any definitive answer or documentation when it comes to relying on DojoConfig for package loading. I'm in the middle of migrating a large ASP.NET / ArcGIS Javascript application from 4.21 to 4.27. I'm really hoping DojoConfig will be supported throughout the remainder of the 4.x lifecycle to buy me a few years of doing the following. It's mainly for my own folders. let locationPath = location.pathname.replace(/\/[^/]+$/, '');
window.dojoConfig = {
async: true, parseOnLoad: false, packages: [
{ name: "appJavascript", location: locationPath + "/js" },
{ name: "appJavascriptClasses", location: locationPath + "/js/classes" },
{ name: "appHtml", location: locationPath + "/html" },
{ name: "dojo", location: "../../4.21/dojo" },
{ name: "dijit", location: "../../4.21/dijit" }
],
has: {
"esri-native-promise": true
}
} The last two lines for /dojo and /dijit are really just examples of possibilities. I'm actually trying to cleanse my code of any Dojo references and only use plain vanilla Javascript. This must remain in AMD design, not ES modules. If I'm able to rid the code of all Dojo classes, I'd still need to make use of DojoConfig which appears to be necessary for the Require.js part of the SDK. Unless someone knows how to replace DojoConfig with vanilla Javascript...? I could not piece together a solution without loading require.js and using the "data-main" attribute, which I'd rather avoid.
... View more
09-07-2023
07:45 AM
|
0
|
0
|
580
|
POST
|
Thanks Jeffry, you gave me right direction, i simply change projection of clicked point and it works fine. Thanks Working code: var beforeLandslideUrl =
"https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer";
var beforeLandslideLayer = new ElevationLayer({
url: beforeLandslideUrl
});
view.on("click", function(event) {
var xyztext = document.getElementById("xyzcheckbox");
if(xyztext.checked == true){
// Query both elevation layers for the elevation at the clicked map position
let sr1 = new SpatialReference({ wkid: 32638 });
var position = event.mapPoint;
let projectedPoints = projection.project(position, sr1);
console.log(projectedPoints);
var queryBeforeLandslide = beforeLandslideLayer.queryElevation(position);
// When both query promises resolve execute the following code
promiseUtils
.eachAlways([queryBeforeLandslide])
.then(function(results) {
var posBeforeLandslide = results[0].value.geometry;
document.getElementById('xspan').innerHTML = "X: " + posBeforeLandslide.x.toFixed(2);
document.getElementById('yspan').innerHTML = "Y: " + posBeforeLandslide.y.toFixed(2);
document.getElementById('zspan').innerHTML = "Z: " + posBeforeLandslide.z.toFixed(2);
})
}
else
{
//view.graphics.removeAll();
}
});
... View more
09-07-2023
01:24 AM
|
0
|
0
|
345
|
POST
|
Hi guyz, I try to get JSON data from GIS server using PHP, but i couldn't, i use this code: <?php
$curl= curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_URL, 'http://127.0.0.0:6080/arcgis/rest/services/Water_Incidents/GWP_WATER_2023/FeatureServer/0/query?where=1%3D1&objectIds=&time=&geometry=&geometryType=esriGeometryPoint&inSR=&spatialRel=esriSpatialRelIntersects&distance=&units=esriSRUnit_Foot&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&havingClause=&gdbVersion=&historicMoment=&returnDistinctValues=false&returnIdsOnly=false&returnCountOnly=false&returnExtentOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&multipatchOption=xyFootprint&resultOffset=&resultRecordCount=&returnTrueCurves=false&returnExceededLimitFeatures=false&quantizationParameters=&returnCentroid=false&timeReferenceUnknownClient=false&sqlFormat=standard&resultType=&featureEncoding=esriDefault&datumTransformation=&f=json');
$res = curl_exec($curl);
curl_close($curl);
$jo = json_decode($res);
echo $jo->features;
?> how can i get this data any idea? Thanks
... View more
07-13-2023
06:26 AM
|
0
|
0
|
360
|
POST
|
Thanks @David_McRitchie, it works great, you saved me a lot of time ❤️
... View more
07-06-2023
05:46 AM
|
0
|
0
|
341
|
POST
|
Thank you for your reply. I will split into small pieces and add to mosaic, but how i will split still don't know.
... View more
07-04-2023
11:42 PM
|
0
|
0
|
276
|
POST
|
Hi all, Now i am trying to make translation to my map. I just need some pointers on where to start, how to start... I thin, e.g if map main language is Georgian and when click on English, change label field and refresh featurelayer. But i do not know if it will change labels text on map, do anyone have experience if this will work? or it is better to make clone of my map and translate it? Thanks for your advices
... View more
03-31-2023
05:34 AM
|
0
|
0
|
305
|
POST
|
I saw your codepen and I am also trying to do something similar but the only difference is I want the total of the point be displayed in a pop up when I click on a state. Do you have any idea of how to do that ? Any ideas will be welcome. @UndralBatsukh Thank you.
... View more
03-12-2023
12:28 PM
|
0
|
0
|
1543
|
POST
|
Thank you very much @Sage_Wall , now i will make some changes for myself 😉
... View more
03-10-2023
02:43 AM
|
0
|
0
|
783
|
Title | Kudos | Posted |
---|---|---|
1 | 08-22-2022 11:57 PM | |
1 | 08-31-2022 12:41 AM | |
1 | 08-23-2022 02:49 AM | |
1 | 05-10-2022 05:12 AM | |
1 | 01-13-2022 10:03 AM |
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|