POST
|
Kelly, Thanks. Howerver, instead of update-start wouldn't you want update-end? We would want the definitionexpression(null) to complete prior to trying to set a new defexpres correct? Wouldn't this try to update the expression at pretty much the same time as it was being cleared?
... View more
04-28-2015
01:38 PM
|
0
|
1
|
2214
|
POST
|
Kelly, Is there a good way to force a query on the entire layer instead of only what was in the definition? I set the definition based on the selection. However, if the user changes their selection it only queries the existing definition. I understand that is by design. If I clear it by setting definition to empty then it doesn't finish in time. I can set a promise I supposed and wait but wanted to see if there was some way to force a query on the layer instead of just the current definition. I thought of going back to hiding the non-selected graphics but it seems to leave them in the selection area. So if a point is around a hidden graphic when you select the visible graphic the hidden is also available. Apparently hiding the graphic doesn't prevent the popups from using it when selecting in the area.
... View more
04-28-2015
06:18 AM
|
0
|
3
|
2214
|
POST
|
Thanks again. Yes the definition expression should work perfectly.
... View more
04-22-2015
02:32 PM
|
0
|
0
|
2214
|
POST
|
Kelly thanks for pointing out the objectIdField property. This answered the question. It returned ESRI_OID. This apparently is a field desktop adds when you import the layer which complicates the matter because it is not in my original SQL dataset so I can't query the database to verify results and my query is returning incorrect results both when run in javascript and when I run directly on the service within arcgis server. I am trying to find out where this ESRI_OID is stored but not having any luck. I am in fact using the ids to determine the visible points per layer. I am doing a variety of query's to provide an array of ids that meet the requirements. It looks like the selectFeatures method only highlights the features, since I already have a class breaks renderer defined with a symbol for the layer. It doesn't hide the points in the layer that don't meet criteria, at least that I can see.
... View more
04-21-2015
03:13 PM
|
0
|
6
|
2214
|
POST
|
I have a feature Layer and am running queryids. I get the array of ids fine. However, I can't figure out where the id is coming from. The documentation says it is the "ObjectId." When I look at the feature service list of fields ObjectID is one of the fields listed but it doesn't seem to be a field that is returned to the browser, I am doing "*" as my fields so I should be getting all. I thought maybe the objectid was the array object number but I can't find any correlation between the ID from the feature service to the array object # in the browser. How can I access this Object ID in the feature layer in browser? I want to loop through my graphics in the feature layer and show the graphics that are in my ID array. Don't know what Id that query returned.
... View more
04-20-2015
01:20 PM
|
0
|
8
|
6388
|
POST
|
I am trying to find the best way to know the current state of a feature layer. I understand update-end fires when the layer is done updating and graphics are available. I can listen for this and set a global for the layers maintaining the state after the initial update and reset on update-start. However, I wanted to make sure this was necessary. I can't check loaded because that happens before update-end. I was looking for an updated but doesn't seem to be there.
... View more
04-20-2015
08:37 AM
|
0
|
0
|
2426
|
POST
|
Owen, the update-end event was the key. Just curious why if I accessed globals.featureLayers in the console without the .graphics I could access the graphics array fine. It was only when I went directly to the globals.featureLayers.graphics that it would return an empty array, until I did update-end.
... View more
03-03-2015
10:42 AM
|
0
|
2
|
1040
|
POST
|
Sarah Clark Thanks for the information. I considered it wasn't loaded but I could access other properties so I thought that wasn't it. This definitely pointed me in the right direction. Owen is correct in I had to wait for the update-end event. The load triggered too soon and was still an empty array.
... View more
03-03-2015
10:29 AM
|
0
|
0
|
1040
|
POST
|
I am adding my feature layers to an array and map as follows: dojo.forEach(globals.layers, function (addit, i) { globals.featureLayers = new FeatureLayer(addit.url, { mode: addit.mode, id: addit.id, outFields: addit.outFields, infoTemplate: addit.infoTemplate }); if (addit.type == "poly") { globals.featureLayers.setRenderer(renderer) } map.addLayer(globals.featureLayers); }); This works fine and the layers needed display in the browser. However, when I try to access the graphics array within the feature layer by doing the below in the above forEach statement: var graphicstmp = globals.featureLayers.graphics; console.log("Features Layer Properties in base ", graphicstmp) I get an empty array in graphicstmp. If I look at the globals.featureLayers array in dev tools I see the graphics object there and it is not empty. It has the properties for the layer that are displaying. So apparently I am doing something wrong with trying to access it this way globals.featureLayers.graphics. Help is appreciated. I eventually want to modify some of the properties but I first need to be able to access them.
... View more
02-25-2015
06:54 AM
|
0
|
7
|
4803
|
POST
|
Yes. NaN is what is expected when the html tags are returned for the formatted values. So is this a bug since 3.8? Do you know what changed then to make the labels return tags? I am using a regex to get rid of the html tags so I can work around the new behavior.
... View more
01-06-2015
12:31 PM
|
0
|
0
|
933
|
POST
|
This is strange. When I run the attached test on my machine it does the same thing as mine, it puts the formatting inline. If I run it in the sandbox it works fine. I ran it on three different web servers locally, apache, iisexpress, and IIS all give the the same result of putting the formatting inline. When I change back to 3.8 it works fine. I put a calculation in the sample. The calculation produces NaN on my webservers and the correct result in the sandbox. What happens if you run this file locally?
... View more
01-05-2015
01:36 PM
|
0
|
2
|
933
|
POST
|
I saw that and updated my to 3.12 and hoped that would resolve but still no luck.
... View more
01-05-2015
11:43 AM
|
0
|
4
|
933
|
POST
|
Nicholas, Thanks for the reply. Yes. I get the same results in my example. In the original layer data there is no formatting markup. However, for some reason when you pass the value to a javascript function within the popup the formatting is there for anything you have a label for. I have this for the description: "Address: {hosp_street} <br/> ICU/Total Beds: {ICUCOMP:icucomp}" The markup is passed to my icucomp function on anything I have a label specified for in my chart. Here is my icucomp function: function icucomp(value, key, data) { console.log("icucomp ", data) return (data.icu_beds / data.hosp_beds).toFixed(3); } If I go back to ArcGIS javascript version 3.8 it doesn't include the formatting. However when I paste my code using my service into the sandbox it works fine. I am at a loss now since I just copy and pasted and it is working as expected in the sandbox. Any ideas on what could cause the difference?
... View more
01-05-2015
11:33 AM
|
0
|
6
|
933
|
POST
|
Worked Perfectly. Saved a ton of time. If you do come across the different classes of the popup and how it is laid out please update this. I can't see popups in my development tools. If you know a way to do this that would be just as good since I could inspect it.
... View more
12-10-2014
03:35 PM
|
0
|
3
|
1278
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|