POST
|
I would like to put the Search Widget in a header bar I have on my application. Right now, I added it to the default view, top-right area. Can I place the widget in a div outside of the view? Can anyone point me to the right documentation or sample? I'm using JSAPI 4.2. Thanks so much!
... View more
05-11-2017
03:31 PM
|
0
|
1
|
743
|
POST
|
I feel like pinch zoom in 3.x was smoother than in 4.x. Are you folk seeing this as well or is it just me? Just try the 3.x sample vs. the 4.x on a device. It seems the zoom levels in 3.x are more "spaced out" than in 4.x. I also see white lines that seem to outline tiles in 4.x. Seems like the map is rendering as the zoom in/out action is taking place. In 3.x looks like it renders after the zoom in/out action is complete. Is there a way to make 4.3 pinch zoom like 3.x?
... View more
05-11-2017
03:29 PM
|
0
|
0
|
666
|
POST
|
After reading through the docs more finally came up with a solution: service.getFeatureLayerViewCount = function (featureLayer) { var deferredFeatures = $q.defer(); var layerViewPromise = _view.whenLayerView(featureLayer); layerViewPromise.then(function (layerView) { var handle = layerView.watch("updating", function (newVal, oldVal, prop, target) { if (!newVal) { // console.log(prop + " CHANGED FROM " + oldVal + " TO " + newVal); layerView.queryFeatureCount().then(function (response) { // console.log(response); deferredFeatures.resolve(response); }, function (error) { console.error(error); deferredFeatures.reject(error); }); handle.remove(); } }); }); return deferredFeatures.promise; } I'm using the angular-esri libraries, but the idea is the same. Call that after the definitionExpression is set. I don't think you can even get a count from the featurelayer, had to get it from the featurelayerview. I just had to save that extra call to the server.. Thanks!
... View more
05-10-2017
04:15 PM
|
0
|
1
|
1176
|
POST
|
Sorry, I should have been more clear in my main post. I'm on 4.2, I only put the version in the hashtag section. I'll update the main question. I don't see that even in 4.2, I do see a "layerview-create" on the FeatureLayer, but I already tried that and it didn't hit it. Any other ideas? Thanks! DJ
... View more
05-10-2017
11:29 AM
|
0
|
0
|
1176
|
POST
|
I'd like to get the count of features, without making another call the the server, after the definition expression of a feature layer is changed. I'm using JSAPI 4.2
... View more
05-09-2017
06:14 PM
|
0
|
4
|
2057
|
POST
|
Thanks for replying to the other discussion and confirming my understanding of the limitations on the FeatureLayerView for querying.
... View more
03-17-2017
12:47 PM
|
0
|
0
|
583
|
POST
|
Thanks! This works! Got any insight on how to get this to filter symbols on the map? I tried setting the visible property of the graphic to false, but symbols still show on map. I suspect because the featureLayer is setup. I need to jump on the Typescript wagon, but here's the JS version for the lazy who have to support IE 11 still. function queryByAttr(lyrView, key, value) { return lyrView.featuresView.graphics.filter(function (graphic) { return graphic.attributes && graphic.attributes[key] === value}); } Thanks again!
... View more
03-17-2017
12:43 PM
|
0
|
2
|
871
|
POST
|
What is onDemand? I tried searching the 4.3 JavaScript API reference and nothing comes up under "onDemand" or "demand". Also tried searching the FeatureLayer page for both terms, and nothing comes up.
... View more
03-17-2017
11:10 AM
|
0
|
1
|
871
|
POST
|
I just posted another question similar to this, so was hoping for some clarification. When you say "it would be redundant to send request to server and get data which is already in the client for FeatureLayers" are you implying that a call to the queryFeatures() method of the FeatureLayer will not make a call to the server to get features? I'm seeing that it is, and don't want that behavior. I'm hoping we can keep the query on the client side since the data already seems to be there.
... View more
03-16-2017
07:34 PM
|
0
|
2
|
583
|
POST
|
I've been using a feature service URL off ArcGIS Online and have a Feature Layer based on that endpoint in my JSAPI 4.2 web application. I see that anytime I update the definition expression or create a query object it makes a network call to the service. I wanted to minimize server calls and work with the data on the client so I created a FeatureLayer based on graphics imported from a geojson file (based on one of the examples). Then I learned that query objects off a feature layer does not support where, out fields, etc. Per documentation, only the geometry, objectIDs, and spatialreference should be defined. Similar to using a FeatureLayerView. I'd like to do things like filtering the features, running queries to produce popups, running statistic queries, etc. on the client, and prevent the server-side call. My question then is, does the API support client-side queries? Am I using the wrong layer, should I be using a GraphicsLayer or some other layer? Or do I need to write my own methods for doing the filtering/querying on client? Much Thanks!
... View more
03-16-2017
07:16 PM
|
0
|
9
|
2291
|
POST
|
I'm working on an Angular, Ionic, ESRI application that shows EV charge stations on a map. I have a view that displays the map with feature layer of charge stations. I have another view that displays a list of charge stations pulled from the graphics property of the feature layer. My problem is that the list of charge stations is empty until the map view loads, because that's when the feature layer loads (using angular-esri directives). If I select the menu item to load the map view first, then navigate to the view that displays the charge station list, the list values are available and everything displays fine. How can I preload the map and feature layer perhaps on application start? Or what other ways can I load the data? If I can't figure it out, I have a workaround, which is to make a separate request out to the REST API feature service to get the values, but I don't want to make that extra call since the data is available when the map is loaded. Thanks in advance!
... View more
08-07-2016
10:09 PM
|
2
|
0
|
1543
|
Title | Kudos | Posted |
---|---|---|
2 | 08-07-2016 10:09 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|