POST
|
Well, I won't be able to test this until I get back to work but you may be right based on the REST API documentation: ArcGIS REST API When you register an existing runtime geodatabase with a FeatureService you use the replicaOptions parameter like so: replicaOptions = {"registerExistingData": {"refReplicaId": "{4721B2DD-CAE4-4a0f-B4E2-EAEB0AA80B0A}", "refReplicaServerGen": 100}} The documentation on this property states: Versioned data (layer property: isDataVersioned = true) is not supported with the replicaOptions parameter at this time. Thus this appears to be a limitation of ArcGIS Server, unless the docs are out of date and support has since been added.
... View more
04-05-2017
04:31 PM
|
1
|
1
|
1260
|
POST
|
Was this application built with the Javascript API or with Web App Builder? If it was built with Web App Builder there is not much I can do but if it was built with the API I might be able to fix it.
... View more
04-28-2015
02:00 PM
|
0
|
1
|
263
|
POST
|
Chris, I took a look at your code on GitHub. You declare the variable myobject on line 89 but then try to use the variable myObject on line 137. Variables are case sensitive in Javascript. Change the variable on line 137 to myobject and it should work.
... View more
04-28-2015
01:57 PM
|
2
|
1
|
315
|
POST
|
The following method worked for me: var temp = '{"FeatureOutputFields":["SQMI", "STATE_NAME", "STATE_FIPS", "SUB_REGION", "STATE_ABBR"]}'; var temp1 = JSON.parse(temp); query.outFields = temp1.FeatureOutputFields; You can test the application here: Edit fiddle - JSFiddle
... View more
01-28-2015
05:25 AM
|
1
|
0
|
418
|
POST
|
If you pass the map object to your module as a parameter in the constructor you should be able to access that map's properties and methods. Almost all of the widgets in the API have the map object passed to them in this manner. Do you have a code sample available that I can test?
... View more
01-28-2015
05:12 AM
|
0
|
0
|
364
|
POST
|
This is how I have fixed this problem in the past. If you look at your browser's console you should see a CORS related error. This is why adding the proxy rule fixes the issue.
... View more
01-28-2015
05:06 AM
|
0
|
0
|
312
|
POST
|
I spent some time testing this yesterday. Your code produces NaN on my local server and in the sandbox. I don't know if this is expected behavior or not. I did produce a workaround for this issue though. The following is the calcit function I use in my application (note that it uses jQuery): function calcit(value, key, data) { var number_Fin = $.parseHTML( data.Number_Fin ); var number_Sta = $.parseHTML( data.Number_Sta ); return (number_Fin[0].innerHTML / number_Sta[0].innerHTML).toFixed(3); }
... View more
01-06-2015
05:22 AM
|
0
|
1
|
749
|
POST
|
Would it be possible to post your code to JSFiddle or zip it up and post it here?
... View more
01-05-2015
11:58 AM
|
0
|
3
|
749
|
POST
|
Not sure if this is the difference but the Sandbox is using version 3.12.
... View more
01-05-2015
11:39 AM
|
0
|
5
|
749
|
POST
|
This code should do what you want: var features = <your array of features> var maxX, maxY, minX, minY; for(var i = 0; i < features.length; i++) { if(i == 0) { maxX = features.geometry.x; minX = features.geometry.x; maxY = features.geometry.y; minY = features.geometry.y; } else { if(features.geometry.x > maxX) { maxX = features.geometry.x; } if(features.geometry.x < minX) { minX = features.geometry.x; } if(features.geometry.y > maxY) { maxY = features.geometry.y; } if(features.geometry.y < minY) { minY = features.geometry.y; } } } var extent = new Extent(minX, minY, maxX, maxY, new SpatialReference({ wkid:4326 })); I tested this with a point feature layer. If you are using polygons you will have to use the polygon class's getExtent() method instead of geometry.x or geometry.y. So your code would look something like: features.getExtent().xmin and features.getExtent().ymax
... View more
12-17-2014
01:05 PM
|
2
|
1
|
1101
|
POST
|
I believe this sample: Edit fiddle - JSFiddle implements the behavior you desire.
... View more
12-17-2014
11:10 AM
|
0
|
1
|
976
|
POST
|
Working with this sample: ArcGIS API for JavaScript Sandbox , I do not encounter the problem you are describing. I added the following lines of code to the application: map.on("click" ,function(evt) { console.log(map.infoWindow.features[0].attributes); }); The attributes are displayed with name value pairs without any HTML formatting. Is there anything I am doing wrong?
... View more
12-17-2014
10:24 AM
|
0
|
7
|
749
|
POST
|
I agree with Owen, I can't think of a way to do this using only REST.
... View more
12-17-2014
09:34 AM
|
0
|
0
|
1101
|
POST
|
Can you provide your code (or upload it to JSFiddle)? Also, have you thought about changing the selection symbol to match point symbol? For example you could use a yellow fire hydrant as the selection symbol to indicate that it has been selected.
... View more
12-17-2014
09:27 AM
|
0
|
0
|
596
|
POST
|
I've seen this sort of thing happen before when working with fonts. I downloaded your code and rewrote the part that creates the text symbols. Using the verbose method of creating the symbol fixed the issue for me. This is the code I used: var font = new Font(); font.setSize("15pt"); font.setWeight(Font.WEIGHT_BOLDER); font.setFamily("Candara"); var color = new Color(); color.setColor([255, 255, 255]); var textSymbol = new TextSymbol() textSymbol.setText(zero.toFixed(1).toString()+"'"); textSymbol.setFont(font); textSymbol.setColor(color); textSymbol.setAlign(Font.ALIGN_MIDDLE); textSymbol.setAngle(0); totalLength += zero; mx = (parseFloat(x1)+parseFloat(x))/2; my = (parseFloat(y1)+parseFloat(y))/2; var labelPoint = new Point(mx,my); var labelPointGraphic = new Graphic(); labelPointGraphic.setGeometry(labelPoint); labelPointGraphic.setSymbol(textSymbol);
... View more
12-17-2014
09:24 AM
|
2
|
1
|
748
|
Title | Kudos | Posted |
---|---|---|
1 | 01-28-2015 05:25 AM | |
1 | 04-05-2017 04:31 PM | |
2 | 04-28-2015 01:57 PM | |
2 | 12-17-2014 01:05 PM | |
2 | 12-17-2014 09:24 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|