|
POST
|
Thanks for the work around. This doesn't seem to be fully working either unfortunately though. Try clicking the biggest bubble in the example on the bottom right side. It doesn't log any results. Is there a place where I can track a bug like this and watch for fixes?
... View more
10-03-2017
10:01 AM
|
0
|
5
|
1940
|
|
POST
|
What can I expect for a bug fix like this? Do I have to wait for 4.6 for a fix?
... View more
10-03-2017
08:22 AM
|
0
|
7
|
1940
|
|
POST
|
Why doesn't the mapview.hitTest method return any results? Consider the simple example below: If you modify this sample: Access features with pointer events | ArcGIS API for JavaScript 4.5 and add the opacity property to the feature layer like this ... var layer = new FeatureLayer({ url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Hurricanes/MapServer/1", opacity: .4, outFields: ["*"] }); ... The hit test response will not contain and values in the results array. Here is a jsbin link showing what I am talking about: JS Bin - Collaborative JavaScript Debugging
... View more
10-02-2017
05:04 PM
|
0
|
14
|
3431
|
|
POST
|
Robert, Thank you so much! This worked perfectly! Not sure how I missed this in the documentation. You always seem to be the one answering questions here on GeoNet. I greatly appreciate it! Jack
... View more
07-05-2017
02:23 PM
|
0
|
0
|
2006
|
|
POST
|
In esri's 3.x or 4.x version, how can I search a feature layer by a field that has duplicate records? For example, I want to search my feature layer with employers. If I type "Mcdonalds", I get a list full of suggestions that all say "Mcdonalds" like this: What I want to show in the suggestions is something like this: Mcdonalds - address1 Mcdonalds - address2 Mcdonalds - address3 Mcdonalds - address4 Here is a section of my code for initializing the search widget. I am specifying the "displayName" option: var sources = [{ featureLayer: new FeatureLayer({ url: url, popupTemplate: popupTemplate }), searchFields: layer.search.searchFields, displayField: layer.search.displayField, name: layer.search.title || layer.title, outFields: layer.search.outFields, placeholder: layer.search.placeHolder }] var search = new Search({ viewModel: { view: app.mapView, maxSuggestions: 4 }, sources: sources },'divID'); I am pretty sure there is no way in the api to do this. Has anyone done this in their project or have any recommendations?
... View more
06-27-2017
01:33 PM
|
0
|
3
|
2943
|
|
POST
|
Thanks Robert Scheitlin, GISP, I have reached out to ESRI and my understanding is that this will be fixed with the 4.4 release. I am still looking for an event that fires after everything loads in the map. Something similar to the "Load" event that was in the 3.x version of the api. Any suggestions?
... View more
06-05-2017
01:44 PM
|
0
|
0
|
1104
|
|
POST
|
In the 4.x api, I want to change the title attribute of the dom element in the locate widget. The default value is "Default map view" which sounds misleading to the user. I was thinking of using jquery to target the "esri-locate" and "esri-icon-locate" classes like this: $(".esri-locate, .esri-icon-locate").prop('title', 'your new title'); This works when I run it in the console, but I can't figure out in which event I should put this to make sure the dom element is available. Any help would be appreciated. arcgis api for javascript 4 widget location event listener widget configuration
... View more
05-31-2017
10:22 AM
|
0
|
2
|
1682
|
|
POST
|
One thing you can try to improve printing time is to optimize your Json that is passed to the service. You can access this Json right before it is used in the print task like this: esriRequest.setRequestPreCallback(myCallbackFunction); function myCallbackFunction(arguments) { //Check for an execute request if (arguments.url.indexOf("execute") > -1) { //Get the text that would be sent to the service var txtJson = arguments.content.Web_Map_as_JSON; //Parse the JSON to make it easier to change var tempObj = JSON.parse(txtJson); // Make your changes / Optimizations here // For example "tempObj.operationalLayers[1].featureCollection.layers[0].layerDefinition.name = "Test";" // Convert back to Json arguments.content.Web_Map_as_JSON = JSON.stringify(tempObj); return arguments; } else { return arguments; } } I would also recommend optimizing your out fields in all feature layers. If you aren't using the field in the renderer, you probably don't need to send it to the print service.
... View more
05-01-2017
10:18 AM
|
0
|
0
|
1061
|
|
POST
|
Thank you so much for your question! I had the EXACT same issue when trying to do a hittest. I ended up using your try catch solution, because your final solution didn't seem to work in my case. I am updating the renderer after it loads, so even though updating is false once, it is actually still updating later and the event breaks if you try to move the mouse at the wrong time. The try catch worked great. Didn't realize there was a Try Catch in javascript. I understand it isn't the best possible solution, but oh well. Thanks again.
... View more
05-01-2017
09:44 AM
|
0
|
0
|
2598
|
|
POST
|
Looks like they added a few more events since this question was asked. I think the "pointer-move" event should work for you. Something like this: app.mapView.on("pointer-move", function(event) { console.log(event); //Do some stuff here }); Here is the documentation:
... View more
03-16-2017
10:51 AM
|
0
|
0
|
2155
|
|
POST
|
If you come across this post and are looking for an answer in Esri Javascript 4.0, try this: view.ui.remove("attribution"); This will remove the widget from the ui of the view. In 4.0, the attibution widget is added by default. Alternatively, you can specify the widgets you want created automatically in the default UI object when defining your view See DefaultUI | API Reference | ArcGIS API for JavaScript 4.0 Fore more details.
... View more
07-25-2016
03:46 PM
|
0
|
0
|
2172
|
|
POST
|
Thanks Steve, I knew it was probably too good to be true.
... View more
07-11-2016
04:06 PM
|
0
|
0
|
661
|
|
POST
|
I would like to use this network service http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Network/USA/NAServer/Route in a directions widget to calculate simple routes in my javascript app. Is this allowed by esri?
... View more
07-11-2016
01:29 PM
|
0
|
2
|
2125
|
|
POST
|
Thanks a bunch. I was stuck on this for a while. I had a bug that was producing a sort of feedback loop. I think it was trying to process two animations at once and was causing it to freak out. Setting to 0 ensures the event post processing is complete before the next event post processing begins.
... View more
05-26-2016
04:36 PM
|
0
|
0
|
1088
|
|
POST
|
We have a proxy setup already and the request is using the post method. It is working now, so it is no longer a big deal. I ended up reducing the number of properties that were being passed by restricting the out_fields property from * down to just a few fields. In doing this, it reduced the overall size of the json object that was being passed to the service and is now allowing me to successfully print my map. Thanks for your help Yue.
... View more
02-18-2016
07:48 AM
|
0
|
0
|
1160
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-31-2019 09:53 AM | |
| 1 | 10-11-2019 10:41 AM | |
| 1 | 10-11-2019 10:42 AM | |
| 1 | 07-30-2018 09:34 AM | |
| 1 | 05-29-2019 09:03 AM |
| Online Status |
Offline
|
| Date Last Visited |
04-29-2022
11:52 AM
|