|
POST
|
Is this referring to the same issue here: Zoom in ArcGIS 4.0 beta does not work ?
... View more
10-16-2015
10:04 AM
|
0
|
0
|
651
|
|
POST
|
Hi, The navigation controls are documented in the MapView and SceneView class descriptions: MapView: MapView | API Reference | ArcGIS API for JavaScript SceneView: SceneView | API Reference | ArcGIS API for JavaScript As of now, you can only zoom in by scrolling forward or double clicking. It sounds like you're referring to the Shift + left mouse drag action that allows you to draw an extent and zoom to it. This action currently isn't supported in the 4.0beta, but it will be added in a future release.
... View more
10-16-2015
09:58 AM
|
1
|
0
|
745
|
|
POST
|
Saloni RR The problem is you declare two Map instances with the same name. Remove the second one and your app will work with the added layer. Here's the revised fiddle: Working with JavaScript API Beta 4.1 - JSFiddle
... View more
10-12-2015
02:34 PM
|
1
|
1
|
1313
|
|
POST
|
The plan is to include Geoprocessor in beta2, which will be released sometime this fall. The specific date of this release has not been determined yet. Regarding the second question - multiple versions of the API cannot be used in the same app. You'll run into all sorts of issues loading modules. I'm not sure if this is what you're looking for, but you could certainly create two separate apps and load them into the same web page using iframes.
... View more
10-05-2015
03:05 PM
|
0
|
0
|
1313
|
|
POST
|
Geoprocessor is not supported in the 4.0 beta 1 API.
... View more
10-05-2015
11:20 AM
|
0
|
2
|
1313
|
|
POST
|
Hi John, Thanks for letting us know about this issue. This is a bug in beta1 that will be fixed in beta2. Let us know if you see this issue persist after the beta2 release.
... View more
09-29-2015
04:04 PM
|
0
|
0
|
388
|
|
POST
|
You will only need to require esri/core/Collection if you need to explicitly create your own collection, which you probably won't have to do most of the time. It is inherited by the classes that use it. So although you may not require esri/core/Collection in your app, you can still use its methods to work with collections like layers and graphics. A Collection is an object, not an array, so working with collections feels a bit awkward at times. That's why map.layers[0] returns undefined, because layers isn't an array. As I referenced in the previous comment I wrote a few minutes ago, you can use .getItemAt() directly on any collection to get an item at a specific index. While map.layers.getAll()[0] works, it's a little simpler to write, map.layers.getItemAt(0). Both return the same result, but the latter is the preferred method of doing so. You can also use other methods to get items if you don't now the id or the index - find(), filter(), and map() can help you get the item in the collection you may be looking for.
... View more
09-29-2015
01:18 PM
|
2
|
1
|
1781
|
|
POST
|
Right now, I can't think of a reason to directly use items. So Collections are for playing with the data and to reference the layer, I'll want to stick with map.getLayer(id). Is that about right? That's kind of (if not exactly) what I'm doing right now in code. What spawned this post is that I added several layers at once and wanted to test how many were showing on the map. I'm assuming that I could map.getLayer by Id for any of those layers. I only tested map.layers.items which returns [], so I thought something was wrong. Yes, map.getLayer(id) should be fine for your workflow. It will work for any of the layers in the map.layers collection. map.layers.length will tell you the number of operational layers that are added to your map. If you don't know the id, but you know the index, you can use getItemAt(index) on the collection. For example: layer = map.layers.getItemAt(index);
... View more
09-29-2015
01:08 PM
|
2
|
0
|
1781
|
|
POST
|
1. Yes, API objects prefixed with an underscore are intended for internal use only. 2. I'm not able to reproduce this. Can you post a live sample where we can see an empty collection in map.layers.items? 3. I'm not sure there's one proper way to reference layers programmatically. It all depends on the workflow, but there are a number of ways you can go about it. A review of Collections would probably be helpful here. I noticed you're drilling down to the items property in order to get the length, or number of layers in the map. map.layers.items.length is not the proper way of getting the length. You should be using map.layers.length instead. Collection.items is a property of the collection that is an array, but we don't document this because and we don't for a reason. That is because you should use the methods of Collection when working with items in the collection. Collections act much like arrays but can be more helpful because you can leverage the change event to know when an item has been added, removed, or moved inside the Collection. Arrays don't allow you to do this. So you can reference layers using any of the methods available in Collection - getItem(), getItemAt(), findIndex(), map(), filter(), etc. In short - take advantage of Collection; it has the same capabilities of an array, but with the extra event handling as well. Collection.items is an array, which means you can't take advantage of the change event. I hope this helps. We plan on adding additional documentation to the page on Collections so that it is more clear how to use them. Also, keep in mind that the method names may change to more closely match the corresponding methods in Array.
... View more
09-28-2015
04:01 PM
|
2
|
5
|
1781
|
|
POST
|
how would I display a feature Layer with 3D API? Do I have to create a scene layer? This response is just building off the other two. Yes, you can display a FeatureLayer in the 3D view (SceneView); and no, you do not have to create a SceneLayer to view features in the view. The question of how to display a FeatureLayer in 3D is up to you. As you can see from Rene Rubalcava's sample, you can use the default rendering of the layer (in this case, I believe SimpleFillSymbols for polygons). "2D" symbols may be draped on top of the basemap. But, as you can probably tell, in beta 1 it behaves kind of weird and flashy. As you can see from Domenico Ciavarella's sample, he takes advantage of symbols that behave better in 3D. I would suggest you play around with the symbols from Symbol3D and its subclasses: Symbol3D | API Reference | ArcGIS API for JavaScript Ultimately, it depends on the story you want to tell with your app, but taking advantage of the 3D symbology is a pretty safe way to go when visualizing FeatureLayers in 3D. Take a look at this sample: Extrude polygon by visual variables | ArcGIS API for JavaScript which uses an ExtrudeSymbol3DLayer to extrude polygon features from a featureLayer in 3D. Obviously, this isn't the best visualization technique in all use cases, but it's worth exploring as we release future betas of the API. In short, yes, you can absolutely display FeatureLayers in a SceneView, and there are many ways you can do it. The best way depends on your data and your message.
... View more
08-28-2015
09:40 AM
|
0
|
1
|
1055
|
|
POST
|
William, I'm not sure I completely understand the scenario either - and it looks like Robert also hit on this point - but you can set up a map click event to grab the feature's graphic, which contains its attributes, then send the desired attribute value to your query. For example, something like this: map.on("click", function(evt){
//if you click a graphic, grab the desired attribute
if(evt.graphic){
var yourVariable = evt.graphic.attributes.FIELDNAME;
}
else{
return;
}
//send yourVariable to queryTask
}); Is this the type of workflow you're looking for, or are you trying to grab an attribute value by clicking it inside an infoWindow?
... View more
08-27-2015
05:18 PM
|
1
|
3
|
2137
|
|
POST
|
FYI, the id property on the Basemap will appear in the documentation in the beta2 release.
... View more
08-26-2015
12:35 PM
|
0
|
0
|
1940
|
|
POST
|
Charlie, Anything that does not appear in the 4.0 documentation is not supported. New features/functionality will be released in each of the beta versions of 4.0. Our goal is to have every class currently available in 3.14 to be a part of the final 4.0 release.
... View more
08-25-2015
09:05 AM
|
2
|
0
|
615
|
|
POST
|
I'm not sure exactly sure. That's why I was purposefully vague . If I could guess, I would say not in a beta release, but I'm really not sure about it. What I do know is that it will be worked in at some point, but it hasn't been heavily discussed yet. There are other capabilities that need to be in place first.
... View more
08-19-2015
01:48 PM
|
0
|
0
|
901
|
|
POST
|
Specifying a vertical coordinate system isn't possible in 4.0 beta 1. All z-values are in meters. Defining vertical coordinate systems will be available in a later release of the API, but unfortunately it's not available in beta 1. You can try to work around the issue by converting your z-values to meters for now.
... View more
08-19-2015
09:53 AM
|
0
|
2
|
901
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-06-2025 03:09 PM | |
| 1 | 04-29-2025 08:36 AM | |
| 1 | 08-20-2024 08:06 AM | |
| 1 | 08-13-2024 11:53 AM | |
| 1 | 07-22-2024 11:04 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-06-2025
03:01 PM
|