New answers tagged

0

The first thing to check when you get different behaviours in different browsers is the validity of your markup since they treat invalid html very differently. Check the html of your page after the second query parameter using a validator such as https://validator.w3.org/. If this does not work I would suggest posting the problematic code in your question ...


1

This link provides some good sources to get you started: https://developers.arcgis.com/javascript/3/jssamples/map_explicitlayerlist.html Dynamically create a list of all the loaded layers referencing this code snippet https://developers.arcgis.com/javascript/3/jssamples/map_dynamiclayerlist.html You may then tie the updateLayerVisibilty() method from a ...


0

I think your for loop is incorrect. Since texasPipeline.graphics is an array, you would use forEach instead of for ... in. You can get even fancier by using array.map to turn them into an array of graphics in one line. Here's a JSFiddle illustrating that. Hope this helps! https://jsfiddle.net/gavinr/rbcagx93/


0

Akis, I think the answer to "Q3" on the blog post Clarifying 3 questions about Web AppBuilder for ArcGIS probably best answers your question. Just an added note that you can certainly author a Web Map that does not share data to the public, and then use Web AppBuilder to build an app based on that web map. Either: create a web map that contains a Hosted ...


0

I also was unable to replicate with very similar configuration to @lheberlie. The only other thing I can think of is to make sure there aren't any other HTML elements hovering above the Map's Z-level.


1

I could not replicate this behavior: ArcGIS API for JavaScript: version 3.17 iOS: "5.0 (iPhone; CPU iPhone OS 9_3_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13F69 (5885985328)" cordova: version 6.2.0 Make sure to add the geolocation plugin via cordova plugin add cordova-plugin-geolocation The code has been modified from the default ...


0

Modify your function: //function to select the park function getParkFeature(in_park_name) { var sfs = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT, new Color([255,0,0]), 2),new Color([255,255,0,0.25]) ); var query = new Query(); query.where = "NAME='" + in_park_name + "'"; ...


1

No, the ArcGIS JSAPI itself does not provide any tools for caching map layers or features layer on the client side. However, there are generic html/javascript tools for storing data that could be used to store it and then read in to populate e.g. a feature layer. For example IndexedDB which is used in the no longer maintained https://github.com/Esri/offline-...


0

I think you need to add mode when you initialize the Feature layer, like: var myfeatureLayer = new FeatureLayer("http://arcgis-serveruf-1981283418.us-east-1.elb.amazonaws.com/arcgis/rest/services/MyFiles/LandParcels/FeatureServer/0",{ mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"] }); I hope this would help.


0

After the "selection-change" event, you can call the infoWindow's getSelectedFeature() method to get the feature currently shown in the infoWindow. You might need to test if the feature exists before you do anything with it, because the selection change event fires when the previously selected feature is removed from the selection. Here is a code sample that ...


1

I think you're close, just a few notes about what you need to do to get this working: The major note is that you need to wrap your code that looks at the attributes in on on event handler, so you're waiting until the layer's data is actually loaded before you try to change it. I could not find STATEFP in your service ... looks like STATE is what you want. ...


0

I have what you want working, creating the map object after the Popup is opened, and destroying it when closed. It's not a perfect example (there seems to be a small error), but I think it gets you pointed in the right direction: Example code: https://jsfiddle.net/gavinr/uhfc4t0z/5/ Video in action: http://i.imgur.com/e9HCvIj.gifv


1

As raykendo pointed out, the require functions were not in the correct order. Once that was corrected the label was displayed.


1

you can create a FeatureLayer via a FeatureCollection, which is essentially just all your data, with a schema defined. You pass your FeatureCollection instead of the FeatureLayer URL: var featureLayer = new FeatureLayer(featureCollection, { showLabels: true }); Helpful links: FeatureLayer Constructor from FeatureCollection FeatureSet Feature Layer ...


2

in 4.x of our ArcGIS API for JavaScript, its as easy as checking FeatureLayer.renderer. in 3.x, besides looping through individual graphics, you can also find the renderer documented in the service metadata. esriRequest({ "url": serviceUrl, "content": { "f": "json" }, "callbackParamName": "callback" }). then(function (evt) { console....


1

If your FeatureLayer uses a SimpleRenderer, you may access its symbol with myFeatureLayer.renderer.symbol. If not, you have to check the symbol per Graphic. You can either ask its Renderer about the symbol with the getSymbol() method, or you can iterate over the array of graphics and get the symbol for each one: var symbols = [] myFeatureLayer.graphics....



Top 50 recent answers are included