POST
|
Here is what I came up with to set the map scale when using the choice list: Choice List from Application: JavaScript Code: HTML Code: When choosing the option, then the mouse is up, the zoom to scale will execute. The map changes zoom. I added console statements to track the changing map scale. Here are examples of those that returned in the console.log: For 1000 Scale: For 2500 Scale: Will something like that work? I don't think the map scale will change on the print layout. We use a zoom tool where you type in the scale and then a zoom occurs on the map. When we go to print the layout, the map scale is preserved.
... View more
12-23-2020
07:15 AM
|
0
|
1
|
220
|
POST
|
Hello, we have created a zoom to scale tool within our organization, but we allow for an input box where you can type in the scale, then zoom to it on the map. perhaps you can use similar logic or get an idea from this code snippet I will provide? A Preview of the Zoom the Scale Tool within an Application: The CODE in JS and HTML: // *********************************************************************** // * Zoom to Scale - START * // *********************************************************************** // Execute Zoom to Scale when Button is Clicked on(dom.byId("zoomToScaleBtn"), "click", zoomToScale); // Zoom to Scale Function function zoomToScale () { if (dom.byId("zoomToScaleValue").value == "") { alert("You must enter in a scale value"); } else { // Return Scale Value - Calculation (/12) based on Feet not Meters var scaleValue = (dom.byId("zoomToScaleValue").value)*12; map.setScale(scaleValue); var scaleValueFeet = (scaleValue/12); console.log("The map scale is 1:" + scaleValue); console.log("Map Scale in Feet 1 inch = " + scaleValueFeet + " feet"); } } // Return Map Scale Results to Application - Calculation (/12) based on Feet NOT Meters map.on("zoom-end", function() { var returnZoomResult = document.getElementById("zoomToScaleResults"); var scale = map.getScale()/12; var roundScale = Math.round(scale); returnZoomResult.innerHTML = roundScale + " feet"; }); // *********************************************************************** // * Zoom to Scale - END * // *********************************************************************** <!-- ************************************ --> <!-- * ZOOM TO SCALE * --> <!-- ************************************ --> <div id="zoomToScaleTextBoxFrame"> <input type="search" id="zoomToScaleValue" placeholder="Zoom to Scale (Feet)" onkeypress="if (event.keyCode == 13) document.getElementById('zoomToScaleBtn').click()" /> <button id="zoomToScaleBtn" title="Zoom to Scale"></button> </div> Print layout scale: I am wondering if you can choose the scale within the map first, then run the print task? Or are you wanting to choose the scale when you are initiating the print task?
... View more
12-22-2020
09:49 AM
|
0
|
3
|
236
|
POST
|
Good morning. Has anyone else noticed the buggy nature of the layer list widget and the legend when working with JavaScript API version 4x? The issue has to do with the symbology changing in the legend when checking on the web service layer in the layer list. When the map loads, the layer list looks good and the legend looks good. If you click on any layers within the layer list, the symbology changes to the incorrect symbology in other map services. I am using the basic out-of-the box JS API settings. My base map layer does have a group layer. I have logged in a bug with ESRI. Here are some screenshot examples: 01. Layer List on Application Load Legend Onload: Now if I toggle back to the layer list, then turn off both web services in the layer list, the symbology will change for the base map service when I toggle back to the legend. ESRI has duplicated this behavior using their data. The behavior is inconsistent. Notice the incorrect symbology for the Base Map service shown below: There are line and polygon features for the base map that show point features from the GPS layer. The LayerList/Legend in JS API 3x has better functionality. Hopefully, other people have encountered this issue. This should be resolved, because having a functioning layer list with legend is crucial for our applications. If the symbology changes, then end users will notice and the application is not functional. Finally, here is the code I use for the layer list widget and legend in the 4x environment: Thank you for the review.
... View more
12-08-2020
05:35 AM
|
0
|
0
|
96
|
POST
|
Hello everyone. Not sure if this has been reported, but I believe I found a bug associated with the Directions widget for the Web App Builder Developer Edition. This was not an issue in Version 2.15, but is an issue in Version 2.16 and 2.17. The Issue: - If the layer list is added, the Direction widget will not allow for typing in an address for the second routing choice. The second option will only allow for typing in one digit and nothing else. If the layer list is removed, the Directions widget will work. Has anyone else reported this issue. A staff member from ESRI was also able to verify the issue. Any known work arounds or a simple way to fix this issue? Thank you!
... View more
08-04-2020
02:44 PM
|
0
|
0
|
110
|
POST
|
Funny I came across this thread because I was looking to change the order of the popups. To my disappointment, I learned it cannot be done. I agree that it would be extremely nice to be able to re-order the popups within a javaScript application. ESRI...can you please consider this functionality? We need more controls on what we can and can not do with popups. Also, allow for easily changing the pixel tolerance on when a user clicks to identify a popup in the mobile environment. Now you have to tap...tap..tap..until you get lucky enough to activate the popup when clicking on a point.
... View more
03-11-2020
09:46 AM
|
6
|
0
|
276
|
POST
|
Hello everyone! Looking to create a sequential ID number in the advanced data editor form when a new feature is added. For example, if the unique ID (ASSETID) is NULL when added, I want to look at the latest unique ID number assigned (example: 50000), then add a + 1. The unique ID number would be 50001. Here is an example of the data editor form I have put together: In my particular case, a new feature has been added, but I want the Facility ID to be populated with the latest sequential number (based on Facility ID). Is this possible with the 4x API? Any guidance will be greatly appreciated. Thank you! Ian
... View more
02-13-2020
05:28 AM
|
0
|
0
|
125
|
POST
|
Hello Everyone! Looking at the possibility of creating a simple application where a polygon is drawn and then a buffer is produced from the polygon. I already know there is a sample to do this and can make this work. Here is the challenge, I need the polygon to be exact...something like 6 feet x 8 feet or 8 feet x 12 feet and etc. Does the JS API support specifying exact lengths and widths of building a polygon almost like a COGO type tool? From what I have seen, I am not sure this is supported. I need the height and width to be exact. Drawing the polygon is easy, but when needing to specify the exact height and width..this become a challenge. I am wanting to do an application rather than installing ArcGIS Desktop. Has anyone made this work?
... View more
08-23-2019
07:45 AM
|
0
|
0
|
106
|
POST
|
Robert, thank you for the response. Oh... I see. I was checking out the popup wrapper to check, but now that makes sense. I may stick with what I have for the time being. I have used CSS to modify field positions and etc.
... View more
05-09-2019
07:06 AM
|
1
|
0
|
79
|
POST
|
Hello everyone. I have created numerous applications using the InfoTemplate, however, I have been experimenting with some popups. I noticed the API allows for resizing the popup, say 500px by 500px. However, when attempting to use the: popup.resize(500,500); The popup does not resize to this size. The width looks good, but the height does not honor the 500px height. Is there an explanation on why this may not work? I am referring to this sample: https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=popup_relatedrecords Also, here is a screenshot of my results: I may want different sizes of popups for various features. Anyone else have this issue? Does this really work effectively?
... View more
05-09-2019
06:54 AM
|
0
|
2
|
149
|
Online Status |
Offline
|
Date Last Visited |
12-29-2020
08:59 AM
|