This repository contains select samples using the ArcGIS API for JavaScript in its 3.x and 4.0 versions.
You can explore the following samples here:
This sample was featured in this blog post in a series featuring ways to use GeometryEngine in the ArcGIS API for JavaScript.
This app demonstrates how you can use the GeometryEngine to test spatial relationships of your features without making repeated network requests using a GeometryService. This can enhance the user experience while editing data. The edits and tests can be done client-side before they are pushed to the server.
Click here to view the number of network requests avoided in this app by using GeometryEngine
This app times GeometryEngine and GeometryService performing the same operation and compares the two. Spoiler Alert: GeometryEngine wins, by a lot.
Note that the speed difference depends on network speed, the browser and version used, as well as the number of input features in the operation. In this case, more than 500 points are buffered at one time, so the difference in speed is magnified.
The following samples were featured in the blog post demonstrating the various measurement features of GeometryEngine.
This sample shows the difference between geodesic buffer and planar buffer in GeometryEngine. Refer to this blog post for an explanation of when to use each.
This sample shows the difference between geodesic buffer and planar buffer in GeometryEngine using a Web Mercator Projection. Refer to this blog post for an explanation of when to use each.
View the Web Mercator live sample
View the Goode’s Homosoline live sample
The following sample was featured in the blog post demonstrating the GeometryEngine’s overlay methods.
This sample shows the difference between geodesic buffer and planar buffer in GeometryEngine using a Web Mercator Projection. Refer to this blog post for an explanation of when to use each.