POST
|
If all you're trying to do is replace TILEMATRIXSET=CZE with TILEMATRIXSET=UTM33N in the request URLs, you can do that fairly easily with a RequesInterceptor: esriConfig.request.interceptors.push({
urls: ["https://services.sentinel-hub.com/ogc/wmts/9c4df810-8939-4ef5-9962-fd51bf66ece8"],
before: function(params) {
var index1 = params.url.indexOf("TILEMATRIXSET=");
if (index1 > 0) {
var url = params.url.substring(0, index1) + "TILEMATRIXSET=UTM33N";
var index2 = params.url.indexOf("&", index1);
if (index2 > index1)
url += params.url.substr(index2);
params.url = url;
}
return null;
}
});
... View more
yesterday
|
0
|
1
|
30
|
POST
|
Are you accounting for the fact that those tiles are (likely) 512x512, as opposed to the "standard" 256x256?
... View more
|
0
|
1
|
71
|
POST
|
Below is a modified version of the MapImageLayer sample. In particular, the function "getImageHref" on lines 22-37 was added to get the URL of an exported image. The input "imageParameters" parameter is an object containing the same properties you described (similar the 3.x ImageParameters object). You can see this function is called on line 73. <html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<title>Intro to MapImageLayer | Sample | ArcGIS Maps SDK for JavaScript 4.30</title>
<link rel="stylesheet" href="https://js.arcgis.com/4.30/esri/themes/light/main.css" />
<script src="https://js.arcgis.com/4.30/"></script>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<script>
function getImageHref(mapImageLayer, imageParameters) {
var imageParams = mapImageLayer.createExportImageParameters(imageParameters.bbox, imageParameters.width, imageParameters.height);
imageParams.format = imageParameters.format;
var url = mapImageLayer.url + "/export?f=json";
Object.keys(imageParams).forEach(function(key) {
url += "&" + key + "=" + imageParams[key];
});
fetch(url).then(function(response) {
response.json().then(function(json) {
console.info(json.href);
});
});
}
require(["esri/Map", "esri/views/SceneView", "esri/layers/MapImageLayer"], (
Map,
SceneView,
MapImageLayer
) => {
/*****************************************************************
* Create a MapImageLayer instance pointing to a Map Service
* containing data about pool permits in Southern California
*****************************************************************/
const permitsLayer = new MapImageLayer({
portalItem: {
// autocasts as new PortalItem()
id: "d7892b3c13b44391992ecd42bfa92d01"
}
});
/*****************************************************************
* Add the layer to a map
*****************************************************************/
const map = new Map({
basemap: "dark-gray-vector",
layers: [permitsLayer]
});
const view = new SceneView({
container: "viewDiv",
map: map
});
/*****************************************************************
* Animate to the layer's full extent when the view loads
*****************************************************************/
view.when(() => {
permitsLayer.when(function() {
getImageHref(permitsLayer, {
bbox: permitsLayer.fullExtent,
format: "png",
height: 600,
width: 800
});
});
/*
view.goTo(permitsLayer.fullExtent)
.catch((error) => {
if (error.name != "AbortError"){
console.error(error);
}
});
*/
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>
... View more
a week ago
|
1
|
1
|
84
|
POST
|
Unfortunately, there is not. As seen in the "Known Limitations" section near the top of the LabelClass documentation, "Polygon geometries only support always-horizontal labelPlacement." Further below, the documentation for the labelPlacement property only gives the single option for polygons as well.
... View more
a week ago
|
0
|
0
|
94
|
POST
|
This is because in both cases, the editor is setting these options up based upon FeatureTemplate information defined within the service. Here you can see the information from your service: https://services.arcgis.com/HRPe58bUyBqyyiCt/arcgis/rest/services/Cryptids2/FeatureServer/0?f=pjson If you search for (Ctrl-F) "templates", you'll see the information that corresponds with the "New Feature" option for your layer. Here's the service information for the hazards layer: https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Hazards_Uptown_Charlotte/FeatureServer/0?f=pjson In this case, if you search for "types" you'll find the information that drives what's found in the Editor widget. Therefore, if you setup the templates in your map before publishing, you should get the expected results. If you're using ArcGIS Pro, this page might be a good place to start.
... View more
a week ago
|
1
|
0
|
110
|
POST
|
There isn't any out-of-the-box functionality I know of, but adding it in wouldn't be terribly difficult. The process would look something like this: 1) Get a reference to the feature you want to flash. 2) Create a new Graphic object with the same geometry as the object in step 1. 3) Assign the new graphic a custom symbol depending on geometry type. 4) Add it to the view's graphics collection. 5) After a second or so of a delay, it can then be removed from the view's graphics collection.
... View more
2 weeks ago
|
1
|
1
|
88
|
POST
|
Have you looked into the takeScreenshot method of the MapView module? Perhaps that's the missing piece you're looking for.
... View more
2 weeks ago
|
0
|
0
|
161
|
POST
|
I haven't yet transitioned to ESM modules, so don't have an answer for you. However, you might check out this post, which discusses updating Popup style via JavaScript.
... View more
3 weeks ago
|
0
|
1
|
96
|
POST
|
On line 21, instead of: query.where = "1=1"; I think you need this instead: query.where = roomsUseLayer.definitionExpression; Or better yet, you could remove line 21 altogether, because according to the documentation for createQuery, the "where" setting should already be set according to the definitionExpression. Setting it to "1=1" would overwrite that and return all features in the layer.
... View more
09-16-2024
01:47 PM
|
0
|
0
|
206
|
POST
|
On line 25 of your 4.x code you have this to zoom to the feature: view.goTo (geometry); If you want to make the layer visible after zooming, you can change that line to the following: view.goTo(geometry).then(function() {
floorOutline.visible = true;
});
... View more
09-16-2024
10:17 AM
|
1
|
4
|
223
|
POST
|
If you're just wanting to show a particular set of features at any given time, and know the objectID values of that set, then using definitionExpression would be one way to do so: function hideLayerFeatures(featureLayer) {
featureLayer.definitionExpression = "1=0";
}
function showLayerFeatures(featureLayer, ids) {
if (Array.isArray(ids))
featureLayer.definitionExpression = featureLayer.objectIdField + " IN(" + ids.join(",") + ")";
else if (typeof ids == "number")
featureLayer.definitionExpression = featureLayer.objectIdField + " = " + ids.toString();
}
... View more
09-13-2024
10:16 AM
|
0
|
6
|
284
|
POST
|
If you examine the contents of the request to generate the printout, does it appear to be sending the graphics (i.e from app.theView.graphics) as JSON, or is it sending a screenshot of them? It seems to me this problem could occur if it's doing the latter.
... View more
09-04-2024
04:13 PM
|
1
|
1
|
328
|
POST
|
You can create a FeatureLayer object from the REST endpoint URL, and get the information from its fields collection after it loads: const featureLayer = new FeatureLayer({
url: "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0"
});
featureLayer.when(function() {
featureLayer.fields.forEach(function(field) {
console.info(field.name + " ( type: " + field.type + ", alias: " + field.alias + " )");
});
});
featureLayer.load();
... View more
09-04-2024
03:44 PM
|
0
|
1
|
183
|
POST
|
This "should" be handled by the scalePreserved property of the PrintTemplate, in which case line 44 of your 4.x code should probably be set to true.
... View more
09-04-2024
01:03 PM
|
0
|
3
|
350
|
Title | Kudos | Posted |
---|---|---|
1 | a week ago | |
1 | a week ago | |
1 | 2 weeks ago | |
1 | 09-16-2024 10:17 AM | |
1 | 09-04-2024 04:13 PM |