POST
|
Hi folks, I am trying to zoom out on my map when drawing rectangle sketch. I can zoom out, but it does only from the center of the map, not from the rectangle, view.goTo() does not work, only zoom Out. Any idea what is wrong? @Sage_Wall sketchViewModellZoom.on("create", async (event) => {
if (event.state === "complete") {
var ext = view.extent;
view.goTo({
target: event.graphic,
extent: ext.expand(1.75),
});
polygonGraphicsLayerrZoom.remove(event.graphic);
}
});
... View more
03-17-2023
01:15 AM
|
0
|
3
|
505
|
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
|
798
|
POST
|
Is there any other way to click e.g. on button and after draw rectangle and zoom?
... View more
03-09-2023
05:10 AM
|
0
|
2
|
814
|
POST
|
Is there any other way to click e.g. on button and after draw rectangle and zoom?
... View more
03-09-2023
05:10 AM
|
0
|
0
|
814
|
POST
|
@Sage_Wall Thanks a lot, i missed this part in documentation ❤️
... View more
03-08-2023
10:14 PM
|
0
|
0
|
822
|
POST
|
Hi folks, Is there any working code to draw rectangle and zoom to place? Or i gave to start working on it now? 😀
... View more
03-06-2023
10:57 PM
|
0
|
6
|
875
|
POST
|
Thanks Rene, but i could not find any topic . Can you please point me exact topic?
... View more
02-23-2023
12:37 AM
|
0
|
0
|
989
|
POST
|
Hi guys. i use API 4.24, now i want to update it on 4.25, but when i add 4.25 i get error mentioned in attached image. What might be cause? What i have to change? I have proxy setup for WMS, might it be cause? Thanks advance
... View more
02-22-2023
02:29 AM
|
0
|
6
|
1068
|
POST
|
Hi folks, I am selecting features from all layers on my map and now i want to highlight all selected features. I do it using this code: let highlight;
map.allLayers.forEach(layer => {
// Query all layers data
if (layer.type === "feature" && layer.visible){
layer.queryFeatures(query)
.then((results) => {
const graphics = results.features;
// console.log(graphics);
// do something with query results
highlight = highlight(graphics);
})
}
}); But i get error: Uncaught (in promise) TypeError: highlight is not a function; How can i simply achive this? Thanks
... View more
01-27-2023
02:13 AM
|
0
|
2
|
555
|
POST
|
Thank You guys @JoelBennett @LefterisKoumis , both code works fine, simply checking layer type 😉 Thanks again for help.
... View more
12-24-2022
11:53 AM
|
0
|
0
|
573
|
POST
|
Hi Guys, On my map i want to select multiple layers by drawing rectangle and than export selected features fields. i have this code thanks to @BlakeTerhune (From my previous topic😞 // create a new sketch view model set its layer
const sketchViewModell = new SketchViewModel({
view: view,
layer: polygonGraphicsLayerr
});
// Once user is done drawing a rectangle on the map
// use the rectangle to select features on the map and table
sketchViewModell.on("create", async (event) => {
if (event.state === "complete") {
// this polygon will be used to query features that intersect it
const geometriess = polygonGraphicsLayerr.graphics.map(function(graphic){
return graphic.geometry
});
const queryGeometry = await geometryEngineAsync.union(geometriess.toArray());
selectFeatures(queryGeometry);
}
});
// This function is called when user completes drawing a rectangle
// on the map. Use the rectangle to select features in the layer and table
function selectFeatures(geometry) {
// create a query and set its geometry parameter to the
// rectangle that was drawn on the view
var query = {
geometry: geometry,
outFields: ["*"]
};
map.allLayers.forEach(layer => {
// Query all layers data
layer.queryFeatures(query)
.then((results) => {
// do something with query results
console.log(results)
})
.catch(errorCallback);
});
}; When i draw rectangle in logs i get error: layer.queryFeatures is not a function; what i do wrong? What is wrong here and i can not see? Help
... View more
12-23-2022
01:55 AM
|
0
|
3
|
638
|
POST
|
Hi, This is not query i want it does not work for me. In the filed "monacemTa_Segrovebis_TariRi" i have all months and i want to get data only for e.g. March or April, using this query i can not perform this action. Extract gives me only month, not its data.
... View more
09-29-2022
12:59 AM
|
0
|
1
|
688
|
POST
|
Hi guys, I am trying to get particular month (e.g. January) data between 2015-2018 years. I am using query: monacemTa_Segrovebis_TariRi > '2015-01-01' AND monacemTa_Segrovebis_TariRi < '2019-01-01' AND month( monacemTa_Segrovebis_TariRi )=1 It Is working on GIS desktop version, but on web i can not use it. On web it work till "month" block, when i add "month it stops working and i get message "Invalid Query". What i did wrong? Thanks
... View more
09-27-2022
11:50 PM
|
0
|
4
|
731
|
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
|