|
POST
|
@upanshuvaid wrote: There is difference in functionality but I need functionality exactly like 3.x version not 4.x version .my organization is using 4.x version so can't switch to 3.x version . Can you clarify what you want the 4.x version of the overview map to do differently?
... View more
01-28-2021
12:15 PM
|
0
|
5
|
4467
|
|
POST
|
You can query the REST endpoint of a hosted feature layer in ArcGIS Online. However, there's no option to measure the distance from the input geometry. That would require a geoprocessing task of some kind. A quick search didn't reveal anything like that available in ArcGIS Online but I'm not that familiar with that stuff. Here's an example hosted feature layer and here's a URL to query the first 8 records within 100 miles of the input geometry (point as lon/lat). Changing the f=pjson to f=html will let you see the all the query parameters available. https://services7.arcgis.com/LXCny1HyhQCUSueu/arcgis/rest/services/Definitive_Healthcare_USA_Hospital_Beds/FeatureServer/0/query?where=1%3D1&objectIds=&time=&geometry=-90.270527%2C+38.637732&geometryType=esriGeometryPoint&inSR=&spatialRel=esriSpatialRelIntersects&resultType=none&distance=100&units=esriSRUnit_StatuteMile&returnGeodetic=false&outFields=&returnGeometry=true&featureEncoding=esriDefault&multipatchOption=xyFootprint&maxAllowableOffset=&geometryPrecision=&outSR=&datumTransformation=&applyVCSProjection=false&returnIdsOnly=false&returnUniqueIdsOnly=false&returnCountOnly=false&returnExtentOnly=false&returnQueryGeometry=false&returnDistinctValues=false&cacheHint=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&having=&resultOffset=0&resultRecordCount=8&returnZ=false&returnM=false&returnExceededLimitFeatures=true&quantizationParameters=&sqlFormat=none&token=&f=pjson
... View more
01-28-2021
12:11 PM
|
0
|
0
|
7392
|
|
POST
|
Sounds like you want to create an API rather than a web app. Look into publishing a geoprocessing service.
... View more
01-28-2021
08:20 AM
|
0
|
2
|
7405
|
|
POST
|
You can set the color but I don't think font weight applies to SVG icons. In your sample, why can't you change the color property on line 82 where you define the textSymbol for drawing the point? Also, if you are adding the icon with your own html, you can change the class name to change the color.
... View more
01-27-2021
07:10 AM
|
0
|
0
|
3029
|
|
POST
|
You have links for sample apps in both 4.x and 3.x versions of the JS API. Are you just unable to implement this in your app?
... View more
01-27-2021
06:44 AM
|
0
|
8
|
4486
|
|
POST
|
A link for your convenience 😀 UniqueValueRenderer | ArcGIS API for JavaScript 4.18
... View more
01-26-2021
06:10 AM
|
0
|
0
|
2751
|
|
POST
|
You could try using the native JavaScript fetch() API. fetch() | The Vanilla JS Toolkit
... View more
01-25-2021
06:24 AM
|
1
|
0
|
2699
|
|
POST
|
Keep in mind that you'll probably need to connect as the owner of the table to rename it. Depending on how your database is organized, you may need to work out a way to reconnect as the appropriate user each time you encounter a new schema. I did something similar here that you can use for ideas.
... View more
01-22-2021
09:34 AM
|
1
|
0
|
2622
|
|
POST
|
I'm not really sure how visible: false works on the back end of the API. I just tested this with the Query features from a FeatureLayer sample by taking out visible: false where the quakesLayer FeatureLayer was defined and removing the quakesLayer from the layers property where the map was initialized. The app still seemed to function normally. Do some experiments with your own app to be sure. As for creating a symbol, check out the Symbol Playground.
... View more
01-20-2021
10:40 AM
|
1
|
0
|
6742
|
|
POST
|
Check out this sample. The quakesLayer FeatureLayer is defined with visible: false so it doesn't display in the map. Then, the section at the end with the last three functions section of code is what queries the quakes and displays them. // query for earthquakes with the specified magnitude
// within the buffer geometry when the query button
// is clicked
queryQuakes.addEventListener("click", function () {
queryEarthquakes().then(displayResults);
});
function queryEarthquakes() {
var query = quakesLayer.createQuery();
query.where = "mag >= " + magSlider.values[0];
query.geometry = wellBuffer;
query.spatialRelationship = "intersects";
return quakesLayer.queryFeatures(query);
}
// display the earthquake query results in the
// view and print the number of results to the DOM
function displayResults(results) {
resultsLayer.removeAll();
var features = results.features.map(function (graphic) {
graphic.symbol = {
type: "simple-marker", // autocasts as new SimpleMarkerSymbol()
style: "diamond",
size: 6.5,
color: "darkorange"
};
return graphic;
});
var numQuakes = features.length;
document.getElementById("results").innerHTML =
numQuakes + " earthquakes found";
resultsLayer.addMany(features);
} Notice the results are added to a GraphicsLayer called resultsLayer. That is defined earlier as var resultsLayer = new GraphicsLayer();
... View more
01-20-2021
06:56 AM
|
0
|
2
|
6761
|
|
POST
|
Welcome! When executing a query, you can specify geometry to use as a spatial extent (intersect) for the results. Here's a sample.
... View more
01-20-2021
06:18 AM
|
0
|
0
|
6769
|
|
POST
|
It looks like you're already getting your query parameters and setting an expression. However, it doesn't look like you're doing anything to query or highlight the features. Take a look at this sample.
... View more
01-15-2021
11:22 AM
|
0
|
0
|
1409
|
|
POST
|
It's because fclist doesn't have any value; it's None. I suspect this is caused by you listing feature classes without setting an environment workspace. You can print(fclist) for debugging to verify. Where you have the comment that says "Set the workspace for ListFeatureClasses" you need to actually set the workspace 😉 workingDir = r"\\PANDA\..."
WorkingGDB = os.path.join(workingDir, "Burgess.mdb")
arcpy.env.workspace = workingGDB
fclist = arcpy.ListFeatureClasses("Ro*03")
... View more
01-15-2021
08:10 AM
|
5
|
1
|
8303
|
|
POST
|
No worries. Looks like you were able to get to the root of the problem. Carry on!
... View more
01-14-2021
01:33 PM
|
1
|
0
|
6076
|
|
POST
|
Starting with the simplest things, have you verified the PortalItem is hosted as a Feature Service with Update capabilities? Are you getting an error in the console?
... View more
01-14-2021
06:30 AM
|
1
|
2
|
6094
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 4 weeks ago | |
| 1 | 10-23-2025 03:53 PM | |
| 1 | 04-28-2026 07:25 AM | |
| 1 | 03-19-2026 08:59 AM | |
| 1 | 02-12-2026 01:37 PM |