POST
|
Hi, in ArcGIS API for JavaScript version 3, there is this Snapping Manager widget. We use it extensively to snap to roads and intersections. After a quick googling, I can't find a similar widget or component in ArcGIS API for JavaScript version 4.x. Does anyone know about how to do snapping in version 4.x? What we need to do is, in the JS web app, we want to snap graphics to roads and intersections (we already have these as map/feature services). PS. there's the Sketch widget, but at this stage we probably won't use it due to our requirements.
... View more
03-04-2021
05:45 PM
|
1
|
4
|
1881
|
POST
|
We have 2 different cached/tiled ArcGIS for Server map services, but with different spatial references. One is with the common Web Mercator Aux. spatial reference, the other is an Australia-specific one. Is it possible to use these 2 together as basemaps in the same web application? I would have the Web Mercator Aux (WKID 102100 or 3857) as the "default" i.e. added to the map first, and the Australia-specific cached map service as the "secondary", so it would project-on-the-fly. I am using ArcGIS JavaScript API 4.18. I will be using the default basemap gallery widget, but can implement our own, as I understand the out-of-box basemap gallery widget won't work with different spatial references.
... View more
03-02-2021
02:12 PM
|
1
|
0
|
493
|
POST
|
Hi, my requirement is that on a ArcGIS API for JavaScript 4.x web app, a user needs to create a short segment along a route/line/road by specifying the distance, starting point and/or route name. Examples would be: Create a segment along route ABC, 300 meters from an intersection. Create a segment along route ABC, 300 meters from a particular point on route 123, in the west/east/north/south direction. I'm not sure where to start on such task. Has anyone done anything similar? Any pointers would be appreciated! Would something like this be right? https://developers.arcgis.com/rest/services-reference/measure-to-geometry.htm Do I need the ArcGIS Roads and Highways extension? We already have a network service published. We are using ArcGIS API for JavaScript 4.x, ArcGIS for Server 10.6. (note I duplicated the question from the ArcGIS-Rest-API-Questions place as I didn't get an answer there, trying my luck here. If anyone knows how to move questions around, that would be great).
... View more
02-11-2021
01:21 PM
|
0
|
1
|
616
|
POST
|
In the end, I got it working as follows: All the "popup" / "InfoWindow" was implemented as good old plain HTML DIV elements. I print these DIV elements using the html2canvas JavaScript library. They are printed as HTML canvas. I print the map using the standard ArcGIS for Server print API. The map is printed as HTML canvas. Finally, I "merge" the two printed HTML canvases as one PNG image. (I could print everything using the html2canvas library but there were some weird issues). Hope it helps.
... View more
02-08-2021
09:50 PM
|
0
|
2
|
1003
|
POST
|
In the end, I ended up creating my own "popup" / "InfoWindow" with good old plain HTML DIV elements, so they can stay open on the map and I can do whatever i want with them.
... View more
02-08-2021
09:40 PM
|
1
|
0
|
916
|
POST
|
Hi, my requirement is that on a web app, a user needs to create a short segment along a route/line/road by specifying the distance, starting point and/or route name. Examples would be: Create a segment along route ABC, 300 meters from an intersection. Create a segment along route ABC, 300 meters from a particular point on route 123, in the west/east/north/south direction. I'm not sure where to start on such task. Any linear referencing REST API? Any pointers would be appreciated! Would something like this be right? https://developers.arcgis.com/rest/services-reference/measure-to-geometry.htm Do I need the ArcGIS Roads and Highways extension? We already have a network service published. We are using ArcGIS API for JavaScript 4.x, ArcGIS for Server 10.6.
... View more
02-08-2021
09:26 PM
|
0
|
0
|
658
|
POST
|
Hi, is there a way to keep multiple popup windows open? The default behaviour is the Map instance always ensures there is one Popup / InfoWindow open, such as when user clicks the features on a feature layer that has a Popup configured with it. My requirement is I need to keep all the popup windows open. I am using ArcGIS for JavaScript API 3.x.
... View more
01-08-2020
06:05 PM
|
0
|
2
|
1011
|
POST
|
Hi, in ArcGIS API for JavaScript v3, is it possible to print a map that has Popup or InfoTemplate being displayed? For example, in here, popups can show when clicked on the map: ArcGIS API for JavaScript Sandbox But how can I print the map including the popup? I tried the digit-print widget but no luck: ArcGIS API for JavaScript Sandbox I know that a screen-capture will work, but it won't have the usual things such as legends, titles... etc.
... View more
12-04-2019
08:21 PM
|
0
|
4
|
1164
|
POST
|
One way I can think of is create another column called "sorted", which can only be yes/true or no/false. This is a dynamic column, so when user checks a checkbox, this column will be immediately updated. Users can then sort on this column. However I'd prefer something out-of-box and this introduces an extra column which can be strange for the users.
... View more
12-01-2019
07:18 PM
|
0
|
0
|
481
|
POST
|
Hi, I have an Enhanced Grid with the Indirect Selecion plugin, so the users can select and deselect rows with checkboxes. My question is, is there a way I can make the grid to sort on the selection? In the image above I can sort on the column "crash ID". But is there a way I can click on the header (i.e. where the red question mark is) so that I can sort by checkboxes/selections? My grid creation code is as follows: this.resultsGrid = new EnhancedGrid({ style: 'height: 100%; width: 100%', id: 'resultsGrid', structure: layout, plugins: {indirectSelection: {headerSelector:true, width:"100px", styles:"text-align: center;"}}, rowSelector: '20px', keepSelection: true, });
... View more
12-01-2019
07:16 PM
|
0
|
1
|
551
|
POST
|
The best approach I found is to dynamically generate the bars as PNG files on the server. The ArcGIS API for JavaScript can then fetch the PNG files and use the usual symbol markers for each point to display the bars. Another person uses the same approach here: Drawing charts(pie or bar) on map Arcgis Api for javascript - Geographic Information Systems Stack Exchange
... View more
12-01-2019
04:33 PM
|
2
|
0
|
833
|
POST
|
Hi, I need to show some stacked/bar chart on a map based on some criteria, as shown here: The bar height is the number of overlapping points in the same location. The blue and green colours basically means the type of the overlapping points. Is there a way to achieve this, whether it's using out-of-box ArcGIS API for JavaScript functionality or some 3rd party library? I haven't been able to find anything. The sample screenshot shows 3D bars but for now 2D bars can also work. I am using ArcGIS API for JavaScript 3.22.
... View more
11-21-2019
07:05 PM
|
0
|
1
|
978
|
POST
|
Robert Scheitlin, GISP One promising way to do this, although I haven't tested fully, is to use the underlying database SDE spatial functions as the where-clause. We are using Oracle SDE ST_Geometry type, so in the database I can run plain SQL statement to find intersected points and an input polygon, like this: SELECT POINT_ID FROM MY_POINTS WHERE SDE.ST_INTERSECTS(SHAPE, SDE.ST_GEOMETRY('POLYGON ((9689836.255 4420129.191, 9690576.399 4420184.417 , 9690295.144 4419703.323, 9689836.255 4420129.191))', 3308)) = 1 AND SHAPE IS NOT NULL Here, I am using the SDE functions to do the intersect, with the input polygon given as a plain WKT string (spatial reference is 3308). Now, I am able to use the above where clause on the map service to do the same. First I need to convert the input polygon into WKT string, then basically run the above query with a "not in" to find points outside of the intersected polygon: var queryParams = new Query(); queryParams.where = 'POINT_ID NOT IN (SELECT POINT_ID FROM MY_POINTS WHERE SDE.ST_INTERSECTS(SHAPE, SDE.ST_GEOMETRY('POLYGON ((9689836.255 4420129.191, 9690576.399 4420184.417 , 9690295.144 4419703.323, 9689836.255 4420129.191))', 3308)) = 1 AND SHAPE IS NOT NULL)'; Still need to test for performance, write the actual JavaScript code, test what if the WKT string is too long... etc, but looks promising so far (e.g. I can dump that where-clause into the map service query REST end-point and it works).
... View more
08-07-2019
06:50 PM
|
0
|
0
|
498
|
POST
|
I have a map service which are points. I have a polygon shape which intersects with the points. How do I find the points that are outside (i.e. excluded / differentiated ) the polygon shape? So this is essentially the opposite of "intersect", kind of like cutting a whole in the points with the polygon. I know with intersect, I can do the following: var queryParams = new Query(); queryParams.geometry = geometry; // This is the polygon shape. queryParams.spatialRelationship = Query.SPATIAL_REL_INTERSECTS; // Optional as it is the default. // ... QueryTask will execute with the above QueryParams to find intersected points on a layer. // Is there something like: var queryParams = new Query(); queryParams.geometry = geometry; // This is the polygon shape. queryParams.spatialRelationship = Query.SPATIAL_REL_DIFFERENCE; // Or something like that. // QueryTask will execute with the QueryParams to find the difference between the points and polygon. // I have tried to use "SPATIAL_REL_RELATION" but no luck: var queryParams = new Query(); queryParams.geometry = geometry; // This is the polygon shape. queryParams.spatialRelationship = Query.SPATIAL_REL_RELATION; queryParams.relationParam = "G1 NOT INTERSECT G2"; I have a huge number of points to deal with, so it is not practical to get all points, then find the intersected points, then subtract. I am using ArcGIS API for JavaScript version 3.22.
... View more
08-06-2019
09:22 PM
|
0
|
2
|
578
|
POST
|
Thanks Robert. Using ObjectID is definitely one option, although I need to find out if there are limits to how long the layer definition string would be and performance. Another option, which will take longer time to develop (we have a very tight deadline), is to do the intersect in the back-end (e.g. GP service), then store the intersected points IDs in a database table against a unique ID (e.g. username with timestamp), join this table with the map service, and filter the map service with definition expression using the unique ID.
... View more
06-26-2019
06:14 PM
|
0
|
1
|
565
|
Title | Kudos | Posted |
---|---|---|
1 | 06-29-2023 07:45 PM | |
2 | 05-04-2023 12:08 AM | |
1 | 04-30-2023 09:28 PM | |
1 | 04-19-2021 07:09 PM | |
1 | 03-02-2021 02:12 PM |
Online Status |
Offline
|
Date Last Visited |
03-18-2024
06:56 AM
|