POST
|
My guess is that since the length is 0, it runs through it once, pushing a null value to parcel.
... View more
05-04-2023
01:46 PM
|
0
|
1
|
301
|
POST
|
This is the basic bit of knowledge that I can't figure out. I am clicking on my map and it is highlighting the feature and adding the feature's information to the featureTable, so I know the graphic exists somewhere. I just can't figure out what variable contains the geometry of the highlighted graphic.
... View more
05-04-2023
01:33 PM
|
0
|
0
|
307
|
POST
|
Unfortunately this isn't the case, since features is null.
... View more
05-04-2023
01:31 PM
|
0
|
3
|
307
|
POST
|
So I am both new to Javascript and new to this ArcGIS API. I know I'm just missing some sort of basic knowledge so I figured I'd turn to the experts. I have just came back from not doing any coding for about a year, so things are definitely not fresh. I'm attempting to use the GeometryEngine with the 4.26 API to buffer a radius from a given feature/set of features. Currently it's saying that the geometry is null (line 9 in the code below), so it isn't seeing any of the features data inside this function. I am sure I had this working at one point. Can anyone tell me how to get the features data accessible from inside this function? (If you need more information about the rest of my code just let me know). function buffertheSelection(event) {
if (bufferSelection.classList[2] === "button-text") {
var parcel = [];
var dist = [];
dist.push(300);
bufferSelection.classList.remove("button-text");
bufferSelection.classList.add("active");
for (i=0; i < features.length; i++){
parcel.push(features[i].feature.geometry);
}
const ptBuff = geometryEngine.buffer(parcel, dist, "feet", true);
featureTable.clearSelectionFilter();
bufferGraphic = new Graphic ({
geometry: ptBuff[0].extent,
symbol: {
type: "simple-fill",
color: ([153, 255, 255, 0.5])
}
});
bufferGraphic.layer === parcelSearchLayer;
view.graphics.add(bufferGraphic);
featureTable.filterGeometry = ptBuff[0].extent;
} else {
bufferSelection.classList.remove("active");
bufferSelection.classList.add("button-text");
view.graphics.remove(bufferGraphic);
}
} Thanks for taking a look!
... View more
05-03-2023
01:21 PM
|
1
|
7
|
367
|
POST
|
About 70% of the time my FeatureTable loads, it just reads "data error" instead of the table populating with my data. At first I assumed it was because of the amount of data that's being returned (there are 107k parcels in my county), but after looking at the "Using Feature Table (no map)" example, that one has over 700k features and doesn't have any issues. I've taken the code from that example, simply replaced the feature layer with my locally hosted feature layer, and am still almost always getting the data error, so I can definitely narrow the issue down to my service and not the code. I've looked through the settings of my service and I don't really see anything that looks wrong. It doesn't always throw an error in the console, but when it does, it looks like this: Does anyone have any ideas of what I can look at tweaking to get this to work more consistently?
... View more
07-15-2020
07:57 AM
|
0
|
0
|
243
|
POST
|
Thanks for the reply. Doesn't look like the Developers tools page is going to give us too helpful of information. The preview page has a few more lines than the response page, but both of them basically look like this. No details. {error: {code: 400, message: "Unable to complete operation.", details: []}} error: {code: 400, message: "Unable to complete operation.", details: []} code: 400 details: [] message: "Unable to complete operation." When I look at the json it's passing, it looks correct to me. I'll talk to some of my network people about trying to get this map accessible outside our network to allow you to troubleshoot further. Thank you again for helping me out.
... View more
07-13-2020
09:48 AM
|
1
|
0
|
580
|
POST
|
Thanks for the reply. I've adjusted my code to move to 3.33 and also tried the other service and I appear to be getting the same results. Here is the full error: error = Error: Unable to complete operation. at Object.B.f.load (https://js.arcgis.com/3.33/init.js:957:296) at https://js.arcgis.com/3.33/init.js:88:429 at c (https://js.arcgis.com/3.33/init.js:104:350) at e (https://js.arcgis.com/3.33/init.js:104:139) at b.Deferred.resolve.callback (https://js.arcgis.com/3.33/init.js:105:479) at c (https://js.arcgis.com/3.33/init.js:105:63) at e (https://js.arcgis.com/3.33/init.js:104:139) at b.Deferred.resolve.callback (https://js.arcgis.com/3.33/init.js:105:479) at https://js.arcgis.com/3.33/init.js:93:98 at m (https://js.arcgis.com/3.33/init.js:108:248) 548 debugger; 549 alert(error); 550 } 551 552 function printResult(result) { 553 debugger; 554 window.open(result.url, "_blank") 555 } 556 557 var template = new PopupTemplate({ 558 title: "<table style=width:100%><tr><th>PARCEL NUMBER</th><th>OWNER</th><th>ADDRESS</th><th>ADDRESS 2</th><th>CITY</th><th>ST</th><th>ZIP</th><tr><tr><td><a href=https://qpublic.schneidercorp.com/application.aspx?AppID=855&LayerID=15999&PageTypeID=4&PageID=7114&Q=1569379244&KeyValue={PIN_DSP}>{PIN_DSP}</a></td><td>{OWNER_NAME}</td><td>{ADDRESS_1}</td><td>{ADDRESS_2}</td><td>{CITY_NAME}</td><td>{ST}</td><td>{ZIPCODE}</td></th></table>", 559 fieldInfos: [ 560 { fieldName: "PIN_DSP", visible: false }, 561 { fieldName: "OWNER_NAME", visible: false }, 562 { fieldName: "ADDRESS_1", visible: false }, 563 { fieldName: "ADDRESS_2", visible: false }, 564 { fieldName: "CITY_NAME", visible: false }, 565 { fieldName: "ST", visible: false }, 566 { fieldName: "ZIPCODE", visible: false } 567 ], 568 }); 569 570 var PLSSLayer = new ArcGISDynamicMapServiceLayer("http://172.27.8.54:6080/arcgis/rest/services/PropertyApp/TwnSecRng/MapServer",{ 571 "id": "PLSS Lines", 572 "visible": true, 573 useMapImage: true, 574 }); Line 548, Column 2 Coverage: n/a Debugger paused Watch Call Stack printError index.html:548 (anonymous) PrintTask.js:6 c init.js:104 e init.js:104 reject.errback init.js:106 c init.js:105 e init.js:104 reject.errback init.js:106 (anonymous) init.js:64 c init.js:104 e init.js:104 reject.errback init.js:106 _errorHandler init.js:2372 (anonymous) init.js:64 f PrintTask.js:13 _errorHandler init.js:2372 (anonymous) init.js:64 error Geoprocessor.js:14 (anonymous) init.js:974 c init.js:104 e init.js:104 reject.errback init.js:106 c init.js:105 e init.js:104 reject.errback init.js:106 c init.js:105 e init.js:104 reject.errback init.js:106 c init.js:105 e init.js:104 reject.errback init.js:106 (anonymous) init.js:971 c init.js:104 e init.js:104 reject.errback init.js:106 c init.js:105 e init.js:104 reject.errback init.js:106 c init.js:105 e init.js:104 resolve.callback init.js:105 c init.js:105 e init.js:104 resolve.callback init.js:105 c init.js:105 e init.js:104 resolve.callback init.js:105 c init.js:105 e init.js:104 resolve.callback init.js:105 c init.js:105 e init.js:104 resolve.callback init.js:105 (anonymous) init.js:93 m init.js:108 k init.js:108 resolve init.js:110 a init.js:109 m init.js:108 k init.js:108 resolve init.js:110 a init.js:109 m init.js:108 k init.js:108 resolve init.js:110 a init.js:109 m init.js:108 k init.js:108 resolve init.js:110 d init.js:140 f init.js:145 load (async) r init.js:145 m init.js:141 b.xhr init.js:93 b.xhrGet init.js:93 B init.js:964 f init.js:967 G init.js:974 (anonymous) init.js:975 c init.js:104 B.then.then init.js:106 always init.js:114 z init.js:975 execute Geoprocessor.js:14 c.<computed> init.js:1151 _execute PrintTask.js:13 (anonymous) PrintTask.js:6 (anonymous) init.js:64 c init.js:104 e init.js:104 resolve.callback init.js:105 c init.js:105 e init.js:104 resolve.callback init.js:105 c init.js:105 e init.js:104 resolve.callback init.js:105 (anonymous) init.js:969 c init.js:104 e init.js:104 resolve.callback init.js:105 c init.js:105 e init.js:104 resolve.callback init.js:105 c init.js:105 e init.js:104 resolve.callback init.js:105 c init.js:105 e init.js:104 resolve.callback init.js:105 c init.js:105 e init.js:104 resolve.callback init.js:105 c init.js:105 e init.js:104 resolve.callback init.js:105 (anonymous) init.js:93 m init.js:108 k init.js:108 resolve init.js:110 a init.js:109 m init.js:108 k init.js:108 resolve init.js:110 a init.js:109 m init.js:108 k init.js:108 resolve init.js:110 a init.js:109 m init.js:108 k init.js:108 resolve init.js:110 d init.js:140 f init.js:145 load (async) r init.js:145 m init.js:141 b.xhr init.js:93 b.xhrGet init.js:93 B init.js:964 f init.js:967 G init.js:974 (anonymous) init.js:975 c init.js:104 B.then.then init.js:106 always init.js:114 z init.js:975 execute PrintTask.js:6 PrintTool index.html:538 (anonymous) index.html:414 Scope
... View more
07-10-2020
09:42 AM
|
0
|
2
|
580
|
POST
|
Strugging to figure out why my PrintTask is returning an error. Here is a screenshot of both my routine and the error that is being returned. I know that in 10.7 or so the json formatting is picky, but the Export Web Map service we're using was created with 10.1 so I don't think that's what is going on. If seeing the entire error would be beneficial let me know. It's a couple pages of text so I figured I'd spare you the wall of text if anyone could make sense of the Object.b.g.load error on its own. Thank you so much.
... View more
07-10-2020
08:56 AM
|
0
|
4
|
693
|
POST
|
That makes sense. Thank you. My problem now is that it only seems to be placing the InfoWindow at one of the locations. If I use evt.geometry.getPoint(0) it places it at the location of the first parcel I click. If I use evt.geometry.getPoint(i) it places it at the last parcel I click. Is there a proper way to do this when using multipoint? Here is the full function, for reference: function showFeatureSetMulti(fset,evt, infoTemplate) { map.graphics.clear(); featureSet = fset; var numFeatures = featureSet.features.length; var features = fset.features; var content = ""; for (var i=0; i<numFeatures; i++) { var graphic = featureSet.features; content = graphic.attributes.OWNER_NAME; infoTemplate = new InfoTemplate("${PIN_DSP}","<b>${OWNER_NAME}<br>${ADDRESS_1}<br>${ADDRESS_2}<br>${CITY_NAME}, ${ST}<br>${ZIPCODE}</b>"); graphic.setInfoTemplate(infoTemplate); document.getElementById("doMultiSela").className = "none"; var array = fset.features; map.infoWindow.setFeatures(array); map.infoWindow.show(); } var point = evt.geometry.getPoint(i); map.infoWindow.show(point); }
... View more
06-02-2020
02:22 PM
|
0
|
1
|
369
|
POST
|
So I am currently able to select multiple parcels with Multipoint and it's currently populating my InfoWindow with the correct information, but I'm wanting the InfoWindow to move to the corresponding parcel when it is highlighted using the location that the user clicked for that particular parcel. Currently I have a variable in a for loop that is housing the coordinate array called multi: var multi = evt.geometry.points; This array has the coordinates as [0] and [1], but of course the InfoWindow wants them as X and Y. I've attempted to use the getPoint method to push these coordinates to the X and Y properties so that the InfoWindow can use them, but I can't seem to figure out how to use it properly in this instance. I've tried it like this, but it throws an error saying the property [0] is undefined: var infoloc = evt.geometry.getPoint(multi); I assumed since it just needed an index in the brackets that this would work, but I am mistaken. Can anyone point me in the right direction? Thank you.
... View more
06-02-2020
11:43 AM
|
0
|
3
|
403
|
POST
|
So I'm using an InfoTemplate to display info on parcels. When clicking on a parcel the InfoTemplate knows exactly where to go since there is a defined coordinate with the mouse click. I also have a selection that allows you to click and drag an extent to select multiple parcels and I'm having trouble controlling where the InfoWindow is popping up. I found some xmin/xmax, ymin/ymax coordinates in some of the geometry properties, so I figured I'd try finding the "middle" of these and displaying the InfoWindow there, but it doesn't seem to be working. I'm sure there's an easier way to do this, or to find the middle of a parcel to display the window, but I wanted to see if I am on the right track. var coordxmin = evt.geometry.xmin; var coordxmax = evt.geometry.xmax; var coordx = coordxmax + coordxmin; var coordxhalf = coordx / 2.0; var coordymin = evt.geometry.ymin; var coordymax = evt.geometry.ymax; var coordy = coordymax + coordymin; var coordyhalf = coordy / 2.0; var fcoords = { x: coordxhalf, y: coordyhalf, }; map.infoWindow.show(fcoords) I'm basically trying to create a variable and force the x/y coordinates into the properties of it so that map.infoWindow.show pops up there, but it seems to be overwriting my X value with something else and I'm confused as to why it's doing that. Let me know if there's an easier way to accomplish what I'm trying to do, as always. I'm very new to this! Thank you in advance.
... View more
05-08-2020
12:55 PM
|
0
|
2
|
338
|
POST
|
That worked perfectly. Thank you! I was hung up on that for days.
... View more
02-21-2019
01:45 PM
|
0
|
1
|
373
|
POST
|
A few general questions about InfoWindow, if you'll indulge me. Right now I have an infoTemplate set with one of my ArcGISDynamicServiceLayers. It works as it should. When I click on a parcel on the map, it pops up the InfoWindow with the information as set in the InfoTemplate. infoTemplate = new InfoTemplate("${PIN_DSP}","<b>${OWNER_NAME}</b>"); var parcelsLayer = new ArcGISDynamicMapServiceLayer("http://172.27.8.54/okaloosagis/rest/services/PropertyApp/ParcelService/MapServer", { "id": "Parcels", "visible": true, disableClientCaching: true, useMapImage: true }); parcelsLayer.setInfoTemplates({ 14: {infoTemplate: infoTemplate} }) Next I added the ability to use the Extent draw feature to select multiple parcels at once. I wanted to use the same InfoTemplate to display any number of parcels that I select, with the ability to click on Previous/Next Feature to move between them. function showFeatureSet(fset,evt, infoTemplate) { map.graphics.clear(); featureSet = fset; var numFeatures = featureSet.features.length; var features = fset.features var content = ""; debugger; for (var i=0; i<numFeatures; i++) { var graphic = featureSet.features; content = graphic.attributes.OWNER_NAME; infoTemplate = new InfoTemplate("${PIN_DSP}","<b>${OWNER_NAME}</b>"); graphic.setInfoTemplate(infoTemplate); graphic.symbol = fillSymbol; map.graphics.add(graphic); map.infoWindow.setContent(content); } map.infoWindow.show(evt.screenPoint); } I don't think this is the correct way to do it, for many reasons. One, I read that the InfoTemplate defaults to highlighting the parcel, as it does when I click on a single parcel. In this situation, I have to physically use a fillSymbol, which I didn't think I had to do. Secondly, I can't figure out how to load the multiple parcels into the InfoWindow so that it prompts me with "Next Feature/Previous Feature" like I've seen it do if I click in the middle of two single parcels. In the code that I've tried, I can either get it to show multiple parcels in a single InfoWindow with all the data jumbled together, or it just shows the last parcel loaded from the group selected. Lastly, how would you recommend I tell the InfoWindow where to load in a "select by extent" kind of situation? It doesn't seem to register evt.ScreenPoint, so it's just displaying it in the top left corner unless previously used, in which it just loads it wherever it was displayed previously. I apologize if this is way too many questions at once, and I appreciate your time.
... View more
02-21-2019
10:14 AM
|
0
|
3
|
439
|
POST
|
No, it isn't throwing any errors. I was just assuming that might be the issue since that was a line I didn't see in any of the live examples given in the API reference. It's just returning undefined/undefined in the InfoWindow. (So clearly it is getting the number of returns correct, but not the actual data itself, which is curious).
... View more
02-13-2019
01:28 PM
|
0
|
1
|
445
|
Title | Kudos | Posted |
---|---|---|
1 | 05-03-2023 01:21 PM | |
1 | 07-13-2020 09:48 AM |
Online Status |
Offline
|
Date Last Visited |
05-04-2023
10:10 PM
|