diff --git a/analysis/analyze-hotspots/README.md b/analysis/analyze-hotspots/README.md index a68b3ce198..c896716861 100644 --- a/analysis/analyze-hotspots/README.md +++ b/analysis/analyze-hotspots/README.md @@ -14,18 +14,18 @@ Select a start and end date using the datepickers between 1/1/1998 and 5/31/1998 To analyze hotspots using a geoprocessing service: -1. Create a `GeoprocessingTask` with the URL set to the endpoint of the geoprocessing service. -2. Create a query string with the date range as an input of `GeoprocessingParameters`. -3. Use the `GeoprocessingTask` to create a `GeoprocessingJob` with the parameters. -4. Start the job and wait for it to complete and return a `GeoprocessingResult`. -5. Get the resulting `ArcGISMapImageLayer` using `geoprocessingResult.getMapImageLayer()`. -6. Add the layer to the map's operational layers. +1. Create a `GeoprocessingTask` with the URL set to the endpoint of the geoprocessing service. +2. Create a query string with the date range as an input of `GeoprocessingParameters`. +3. Use the `GeoprocessingTask` to create a `GeoprocessingJob` with the parameters. +4. Start the job and wait for it to complete and return a `GeoprocessingResult`. +5. Get the resulting `ArcGISMapImageLayer` using `geoprocessingResult.getMapImageLayer()`. +6. Add the layer to the map's operational layers. ## Relevant API -* ArcGISMapImageLayer -* GeoprocessingJob -* GeoprocessingParameters -* GeoprocessingResult -* GeoprocessingString -* GeoprocessingTask \ No newline at end of file +* ArcGISMapImageLayer +* GeoprocessingJob +* GeoprocessingParameters +* GeoprocessingResult +* GeoprocessingString +* GeoprocessingTask diff --git a/analysis/distance-measurement-analysis/README.md b/analysis/distance-measurement-analysis/README.md index 3b3c4df6b3..cde7f92105 100644 --- a/analysis/distance-measurement-analysis/README.md +++ b/analysis/distance-measurement-analysis/README.md @@ -14,15 +14,15 @@ Choose a unit system for the measurement in the UI dropdown. Click any location To measure distances with the `LocationDistanceMeasurement` analysis: -1. Create an `AnalysisOverlay` and add it to your scene view's analysis overlay collection: `sceneView.getAnalysisOverlays().add(analysisOverlay)`. -2. Create a `LocationDistanceMeasurement`, specifying the `startLocation` and `endLocation`. These can be the same point to start with. Add the analysis to the analysis overlay: `analysisOverlay.getAnalyses().add(LocationDistanceMeasurement)`. The measuring line will be drawn for you between the two points. -3. The `measurementChanged` callback will fire if the distances change. You can get the new values for the `directDistance`, `horizontalDistance`, and `verticalDistance` from the `MeasurementChangedEvent` returned by the callback. The distance objects contain both a scalar value and a unit of measurement. +1. Create an `AnalysisOverlay` and add it to your scene view's analysis overlay collection: `sceneView.getAnalysisOverlays().add(analysisOverlay)`. +2. Create a `LocationDistanceMeasurement`, specifying the `startLocation` and `endLocation`. These can be the same point to start with. Add the analysis to the analysis overlay: `analysisOverlay.getAnalyses().add(LocationDistanceMeasurement)`. The measuring line will be drawn for you between the two points. +3. The `measurementChanged` callback will fire if the distances change. You can get the new values for the `directDistance`, `horizontalDistance`, and `verticalDistance` from the `MeasurementChangedEvent` returned by the callback. The distance objects contain both a scalar value and a unit of measurement. ## Relevant API -* AnalysisOverlay -* LocationDistanceMeasurement -* UnitSystem +* AnalysisOverlay +* LocationDistanceMeasurement +* UnitSystem ## Additional information @@ -30,4 +30,4 @@ The `LocationDistanceMeasurement` analysis only performs planar distance calcula ## Tags -Analysis, 3D \ No newline at end of file +Analysis, 3D diff --git a/analysis/line-of-sight-geoelement/README.md b/analysis/line-of-sight-geoelement/README.md index 4e750bdfc6..30600cb42a 100644 --- a/analysis/line-of-sight-geoelement/README.md +++ b/analysis/line-of-sight-geoelement/README.md @@ -14,16 +14,16 @@ A line of sight will display between a point on the Empire State Building (obser To show a line of sight between two graphics: -1. Create an `AnalysisOverlay` and add it to the `SceneView`'s analysis overlays collection. -2. Create a `GeoElementLineOfSight`, passing in observer and target `GeoElement`s (feautures or graphics). Add the line of sight to the analysis overlay's analyses collection. -3. To get the target visibility when it changes, add a `TargetVisibilityChangedListener` to the line of sight. The changed event will give the `TargetVisibility`. +1. Create an `AnalysisOverlay` and add it to the `SceneView`'s analysis overlays collection. +2. Create a `GeoElementLineOfSight`, passing in observer and target `GeoElement`s (feautures or graphics). Add the line of sight to the analysis overlay's analyses collection. +3. To get the target visibility when it changes, add a `TargetVisibilityChangedListener` to the line of sight. The changed event will give the `TargetVisibility`. ## Relevant API -* AnalysisOverlay -* GeoElementLineOfSight -* LineOfSight.TargetVisibility +* AnalysisOverlay +* GeoElementLineOfSight +* LineOfSight.TargetVisibility ## Tags -Analysis \ No newline at end of file +Analysis diff --git a/analysis/line-of-sight-location/README.md b/analysis/line-of-sight-location/README.md index fda54fb359..c78a223bc1 100644 --- a/analysis/line-of-sight-location/README.md +++ b/analysis/line-of-sight-location/README.md @@ -12,17 +12,17 @@ Click to turn on the mouse move event listener. Then move the mouse where you wa To create a line of sight and update it with the mouse: -1. Create an `AnalysisOverlay` and add it to the scene view. -2. Create a `LocationLineOfSight` with initial observer and target locations and add it to the analysis overlay. -3. Make an `EventHandler` to capture mouse movement. Turn the screen point into a scene point with `sceneView.screenToLocationAsync(screenPoint)`. -4. Update the target location with `lineOfSight.setTargetLocation(scenePoint)`. +1. Create an `AnalysisOverlay` and add it to the scene view. +2. Create a `LocationLineOfSight` with initial observer and target locations and add it to the analysis overlay. +3. Make an `EventHandler` to capture mouse movement. Turn the screen point into a scene point with `sceneView.screenToLocationAsync(screenPoint)`. +4. Update the target location with `lineOfSight.setTargetLocation(scenePoint)`. ## Relevant API -* 3D -* AnalysisOverlay -* ArcGISTiledElevationSource -* ArcGISScene -* Camera -* LocationLineOfSight -* SceneView \ No newline at end of file +* 3D +* AnalysisOverlay +* ArcGISTiledElevationSource +* ArcGISScene +* Camera +* LocationLineOfSight +* SceneView diff --git a/analysis/viewshed-camera/README.md b/analysis/viewshed-camera/README.md index 7b4fa8d7a1..98449e0d9d 100644 --- a/analysis/viewshed-camera/README.md +++ b/analysis/viewshed-camera/README.md @@ -14,17 +14,17 @@ The sample will start with a viewshed created from the initial camera location, To create and update a viewshed from a camera: -1. Get a `Camera` either by creating it, or by getting the current camera from the scene with `sceneView.getCurrentViewpointCamera()`. -2. Create a `LocationViewshed` passing in the `Camera` plus a min/max distance. -3. To update the viewshed with a new camera, use `viewshed.updateFromCamera(camera)` +1. Get a `Camera` either by creating it, or by getting the current camera from the scene with `sceneView.getCurrentViewpointCamera()`. +2. Create a `LocationViewshed` passing in the `Camera` plus a min/max distance. +3. To update the viewshed with a new camera, use `viewshed.updateFromCamera(camera)` ## Relevant API -* 3D -* AnalysisOverlay -* ArcGISTiledElevationSource -* ArcGISScene -* ArcGISSceneLayer -* Camera -* LocationViewshed -* SceneView \ No newline at end of file +* 3D +* AnalysisOverlay +* ArcGISTiledElevationSource +* ArcGISScene +* ArcGISSceneLayer +* Camera +* LocationViewshed +* SceneView diff --git a/analysis/viewshed-geoelement/README.md b/analysis/viewshed-geoelement/README.md index cbf99972b0..77acf00536 100644 --- a/analysis/viewshed-geoelement/README.md +++ b/analysis/viewshed-geoelement/README.md @@ -12,18 +12,18 @@ Once the scene is done loading, click on a location for the tank to drive to. It To attach a viewshed to a `GeoElement`: -1. Create a `Graphic` and add it to a `GraphicsOverlay`. -2. Use a `SimpleRenderer` in the `GraphicsOverlay` which has a heading expression set. This way you can relate the viewshed's heading to the `GeoElement`'s heading. -3. Create a `GeoElementViewshed` with the graphic, heading/pitch offsets, and min/max distance. -4. To offset the viewshed's observer location from the center of the graphic, use `viewshed.setOffsetX()`, etc. +1. Create a `Graphic` and add it to a `GraphicsOverlay`. +2. Use a `SimpleRenderer` in the `GraphicsOverlay` which has a heading expression set. This way you can relate the viewshed's heading to the `GeoElement`'s heading. +3. Create a `GeoElementViewshed` with the graphic, heading/pitch offsets, and min/max distance. +4. To offset the viewshed's observer location from the center of the graphic, use `viewshed.setOffsetX()`, etc. ## Relevant API -* 3D -* AnalysisOverlay -* ArcGISTiledElevationSource -* ArcGISScene -* ArcGISSceneLayer -* GeoElementViewshed -* Graphic -* SceneView \ No newline at end of file +* 3D +* AnalysisOverlay +* ArcGISTiledElevationSource +* ArcGISScene +* ArcGISSceneLayer +* GeoElementViewshed +* Graphic +* SceneView diff --git a/analysis/viewshed-geoprocessing/README.md b/analysis/viewshed-geoprocessing/README.md index 72ae815396..a2c99312a1 100644 --- a/analysis/viewshed-geoprocessing/README.md +++ b/analysis/viewshed-geoprocessing/README.md @@ -12,19 +12,19 @@ After the geoprocessing task finishes loading (the spinner will stop), click any To create a viewshed from a geoprocessing service: -1. Create a `GeoprocessingTask` with the URL set to the viewshed endpoint of a geoprocessing service . -2. Create a `FeatureCollectionTable` and add a new `Feature` whose geometry is the `Point` where you want to create the viewshed. -3. Make `GeoprocessingParameters` with an input for the viewshed operation `parameters.getInputs().put("Input_Observation_Point", new GeoprocessingFeatures(featureCollectionTable))`. -4. Use the `GeoprocessingTask` to create a `GeoprocessingJob` with the parameters. -5. Start the job and wait for it to complete and return a `GeoprocessingResult`. -6. Get the resulting `GeoprocessingFeatures` using `geoprocessingResult.getOutputs().get("Viewshed_Result")`. -7. Iterate through the viewshed features in `geoprocessingFeatures.getFeatures()` to use their geometry or display the geometry in a graphic. +1. Create a `GeoprocessingTask` with the URL set to the viewshed endpoint of a geoprocessing service . +2. Create a `FeatureCollectionTable` and add a new `Feature` whose geometry is the `Point` where you want to create the viewshed. +3. Make `GeoprocessingParameters` with an input for the viewshed operation `parameters.getInputs().put("Input_Observation_Point", new GeoprocessingFeatures(featureCollectionTable))`. +4. Use the `GeoprocessingTask` to create a `GeoprocessingJob` with the parameters. +5. Start the job and wait for it to complete and return a `GeoprocessingResult`. +6. Get the resulting `GeoprocessingFeatures` using `geoprocessingResult.getOutputs().get("Viewshed_Result")`. +7. Iterate through the viewshed features in `geoprocessingFeatures.getFeatures()` to use their geometry or display the geometry in a graphic. ## Relevant API -* FeatureCollectionTable -* GeoprocessingFeatures -* GeoprocessingJob -* GeoprocessingParameters -* GeoprocessingResult -* GeoprocessingTask \ No newline at end of file +* FeatureCollectionTable +* GeoprocessingFeatures +* GeoprocessingJob +* GeoprocessingParameters +* GeoprocessingResult +* GeoprocessingTask \ No newline at end of file diff --git a/analysis/viewshed-location/README.md b/analysis/viewshed-location/README.md index 795b640dfb..57f89de15a 100644 --- a/analysis/viewshed-location/README.md +++ b/analysis/viewshed-location/README.md @@ -12,15 +12,15 @@ Use the corner UI controls to change the properties of the viewshed and see them To create a viewshed from a location and directional parameters: -1. Create a `LocationViewshed` passing in the observer location, heading, pitch, horizontal/vertical angles, and min/max distances. -2. Set the property values directly on the viewshed instance for location, direction, range, and visibility properties. The colors are global, so change them via the static properties on `Viewshed`. +1. Create a `LocationViewshed` passing in the observer location, heading, pitch, horizontal/vertical angles, and min/max distances. +2. Set the property values directly on the viewshed instance for location, direction, range, and visibility properties. The colors are global, so change them via the static properties on `Viewshed`. ## Relevant API -* 3D -* AnalysisOverlay -* ArcGISTiledElevationSource -* ArcGISScene -* ArcGISSceneLayer -* LocationViewshed -* SceneView \ No newline at end of file +* 3D +* AnalysisOverlay +* ArcGISTiledElevationSource +* ArcGISScene +* ArcGISSceneLayer +* LocationViewshed +* SceneView \ No newline at end of file diff --git a/display_information/add-graphics-with-renderer/README.md b/display_information/add-graphics-with-renderer/README.md index 8d9188a9f4..7be5662892 100644 --- a/display_information/add-graphics-with-renderer/README.md +++ b/display_information/add-graphics-with-renderer/README.md @@ -1,34 +1,29 @@ -

Add Graphics with Renderer

+# Add Graphics with Renderer -

Specify a graphic's symbol with a renderer.

+Specify a graphic's symbol with a renderer. -

A renderer allows you to change the style of all graphics in an overlay by only changing one copy of the symbol. A renderer will only effect -graphics that do not specify their own symbol.

+A renderer allows you to change the style of all graphics in an overlay by only changing one copy of the symbol. A renderer will only effect graphics that do not specify their own symbol. -

+![](AddGraphicsWithRenderer.png) -

How it works

+## How it works -

To show a Graphic in a GraphicsOverlay using a renderer:

+To show a `Graphic` in a `GraphicsOverlay` using a renderer: -
    -
  1. Create a GraphicsOverlay and add it to the MapView
  2. -
  3. Create a Graphic, specifying only its geometry
  4. -
  5. Create a single Symbol such as a SimpleMarkerSymbol
  6. -
  7. Create a renderer with the symbol such as new SimpleRenderer(symbol)
  8. -
  9. Set the renderer on the graphics overlay with graphicsOverlay.setRenderer(renderer)
  10. -
+1. Create a `GraphicsOverlay` and add it to the `MapView` +2. Create a `Graphic`, specifying only its geometry +3. Create a single `Symbol` such as a `SimpleMarkerSymbol` +4. Create a renderer with the symbol such as `new SimpleRenderer(symbol)` +5. Set the renderer on the graphics overlay with `graphicsOverlay.setRenderer(renderer)` -

Relevant API

+## Relevant API - +* ArcGISMap +* Graphic +* GraphicsOverlay +* MapView +* Point +* SimpleFillSymbol +* SimpleLineSymbol +* SimpleMarkerSymbol +* SimpleRenderer diff --git a/display_information/add-graphics-with-symbols/README.md b/display_information/add-graphics-with-symbols/README.md index 7931f2f328..4fc4fc9518 100644 --- a/display_information/add-graphics-with-symbols/README.md +++ b/display_information/add-graphics-with-symbols/README.md @@ -1,51 +1,45 @@ -

Add Graphics with Symbols

- -

Draw simple graphics with marker, line, polygon, and text symbols.

- -

- -

How it works

- -

To display a Graphic using a symbol:

- -
    -
  1. Create a GraphicsOverlay and add it to the MapView, MapView.getGraphicsOverlay.add().
  2. -
  3. To create a graphic using a SimpleMarkerSymbol. -
    • create a Point where the graphic will be located
    • -
    • create a simple marker symbol that will display at that point
    • -
    • assign point and symbol to graphic, Graphic(point, symbol)
  4. -
  5. To create a graphic using a SimpleLineSymbol. -
    • create a PointCollection that will hold all the points that make up the line
    • -
    • create a Polyline using the point collection, Polyline(PointCollection)
    • -
    • create a simple line symbol that will display over those collected points
    • -
    • assign polyline and symbol to graphic, Graphic(polyline, symbol)
  6. -
  7. To create a graphic using a SimepleFillSymbol. -
    • create a point collection that will hold all the points that make up the line
    • -
    • create a Polygon using the point collection, Polygon(PointCollection)
    • -
    • create a simple line symbol that will display as an outline for points collected
    • -
    • create a simeple fill symbol, using line symbol from above, that will fill the region in between the points collected with a single color
    • -
    • assign polygon and symbol to graphic, Graphic(polygon, symbol)
  8. -
  9. To create a graphic using a TextSymbol. -
    • create a point where the graphic will be located
    • -
    • create a text symbol, that will display at that point
    • -
    • assign point and symbol to graphic, Graphic(point, symbol)
  10. -
  11. Add graphic to graphics overlay to display it to the map view.
  12. -
- -

Relevant API

- - - - +# Add Graphics with Symbols + +Draw simple graphics with marker, line, polygon, and text symbols. + +![](AddGraphicsWithSymbols.png) + +## How it works + +To display a `Graphic` using a symbol: + +1. Create a `GraphicsOverlay` and add it to the `MapView`, `MapView.getGraphicsOverlay.add()`. +2. To create a graphic using a `SimpleMarkerSymbol`. + * create a `Point` where the graphic will be located + * create a simple marker symbol that will display at that point + * assign point and symbol to graphic, `Graphic(point, symbol)` +3. To create a graphic using a `SimpleLineSymbol`. + * create a `PointCollection` that will hold all the points that make up the line + * create a `Polyline` using the point collection, `Polyline(PointCollection)` + * create a simple line symbol that will display over those collected points + * assign polyline and symbol to graphic, `Graphic(polyline, symbol)` +4. To create a graphic using a `SimepleFillSymbol`. + * create a point collection that will hold all the points that make up the line + * create a `Polygon` using the point collection, `Polygon(PointCollection)` + * create a simple line symbol that will display as an outline for points collected + * create a simeple fill symbol, using line symbol from above, that will fill the region in between the points collected with a single color + * assign polygon and symbol to graphic, `Graphic(polygon, symbol)` +5. To create a graphic using a `TextSymbol`. + * create a point where the graphic will be located + * create a text symbol, that will display at that point + * assign point and symbol to graphic, `Graphic(point, symbol)` +6. Add graphic to graphics overlay to display it to the map view. + +## Relevant API + +* Graphic +* GraphicsOverlay +* MapView +* Point +* PointCollection +* Polygon +* Polyline +* SimepleFillSymbol +* SimpleLineSymbol +* SimpleMarkerSymbol +* TextSymbol diff --git a/display_information/dictionary-renderer-graphics-overlay/README.md b/display_information/dictionary-renderer-graphics-overlay/README.md index 36cb75f7bd..d345238ea6 100644 --- a/display_information/dictionary-renderer-graphics-overlay/README.md +++ b/display_information/dictionary-renderer-graphics-overlay/README.md @@ -1,48 +1,41 @@ -

Dictionary Renderer with Graphics Overlay

- -

Display mil2525d symbols.

- -

The dictionary renderer creates these graphics using a local mil2525d style file and a XML file with key, -value attributes for each graphic.

- -

- -

How it works

- -

To apply a DictionaryRenderer and display mil2525d graphics:

- -
    -
  1. Create a SymbolDicitonary, SymbolDictionary(specificationType, dictionaryPath). -
    • specificationType, this will be the mil2525d.stylx local file
    • -
    • dictionaryPath, path to the mil2525d.stylx local file
  2. -
  3. Load the dictionary asynchronouly, DictionarySymbol.loadAsync(). -
    • this will allows the application to continue working while the dictionary loads all symbol primitives found within the mil2525d specification
  4. -
  5. Create a DictionaryRenderer, DictionaryRenderer(SymbolDictionary). -
    • apply it to the GraphicsOverlay.setRenderer(DictionaryRenderer)
  6. -
  7. Parse through local XML file creating a mapping of key,value pairs for each block of attributes. -
    • use the name of the attribute as key and text within that attribute as the value
  8. -
  9. Create a graphic for each mapping of attributes. -
    • _wkid key, holds the geometry's spatial reference
    • -
    • controlpoints, creates the shape of the geometry
    • -
    • other attributes explain to dictionary symbol how to display graphic
    • -
    • add graphic to GraphicsOverlay.getGraphics().add(Graphic)
  10. -
- -

Relevant API

- - - - +# Dictionary Renderer with Graphics Overlay + +Display mil2525d symbols. + +The dictionary renderer creates these graphics using a local mil2525d style file and a XML file with key, value attributes for each graphic. + +![](DictionaryRendererGraphicsOverlay.png) + +## How it works + +To apply a `DictionaryRenderer` and display mil2525d graphics: + +1. Create a `SymbolDicitonary`, `SymbolDictionary(specificationType, dictionaryPath)`. + * specificationType, this will be the mil2525d.stylx local file + * dictionaryPath. path to the mil2525d.stylx local file +2. Load the dictionary asynchronouly, `DictionarySymbol.loadAsync()`. + * this will allows the application to continue working while the dictionary loads all symbol primitives found within the mil2525d specification +3. Create a `DictionaryRenderer`, `DictionaryRenderer(SymbolDictionary)`. + * apply it to the `GraphicsOverlay.setRenderer(DictionaryRenderer)` +4. Parse through local XML file creating a mapping of key,value pairs for each block of attributes. + * use the name of the attribute as key and text within that attribute as the value +5. Create a graphic for each mapping of attributes. + * \_wkid key, holds the geometry's spatial reference + * *control* points, creates the shape of the geometry + * other attributes explain to dictionary symbol how to display graphic + * add graphic to `GraphicsOverlay.getGraphics().add(Graphic)` + +## Relevant API + +* ArcGISMap +* Basemap +* DictionaryRenderer +* Graphic +* GraphicsOverlay +* LayerViewStatus +* MapView +* Point +* PointCollection +* Polygon +* Polyline +* SymbolDictionary diff --git a/display_information/display-grid/README.md b/display_information/display-grid/README.md index 8312ee9124..312b046e49 100644 --- a/display_information/display-grid/README.md +++ b/display_information/display-grid/README.md @@ -1,37 +1,31 @@ -

Display Grid

+# Display Grid -

Display a variety of grids on a map.

+Display a variety of grids on a map. -

+![](DisplayGrid.png) -

How to use the sample

+## How to use the sample -

Select the different grid style options and click "Update" to set the grid.

+Select the different grid style options and click "Update" to set the grid. -

How it works

+## How it works -

To show and style a grid:

+To show and style a grid: -
    -
  1. Create an instance of one of the Grid types.
  2. -
  3. Grid lines and labels can be styled per grid level with grid.setLineSymbol(gridLevel, lineSymbol) - and grid.setTextSymbol(gridLevel, textSymbol).
  4. -
  5. The label position can be set with grid.setLabelPosition(labelPosition).
  6. -
  7. For the LatitudeLongitudeGrid type, you can specify a label format of DECIMAL_DEGREES - or DEGREES_MINUTES_SECONDS.
  8. -
  9. To set the grid, use mapView.setGrid(grid).
  10. -
+1. Create an instance of one of the `Grid` types. +2. Grid lines and labels can be styled per grid level with `grid.setLineSymbol(gridLevel, lineSymbol)` and `grid.setTextSymbol(gridLevel, textSymbol)`. +3. The label position can be set with `grid.setLabelPosition(labelPosition)`. +4. For the `LatitudeLongitudeGrid` type, you can specify a label format of `DECIMAL_DEGREES` or `DEGREES_MINUTES_SECONDS`. +5. To set the grid, use `mapView.setGrid(grid)`. -

Relevant API

+## Relevant API - +* Grid +* LatitudeLongitudeGrid +* LineSymbol +* MapView +* MgrsGrid +* SimpleLineSymbol +* TextSymbol +* UsngGrid +* UtmGrid diff --git a/display_information/format-coordinates/README.md b/display_information/format-coordinates/README.md index 8d8c7fddd7..d1981163d1 100644 --- a/display_information/format-coordinates/README.md +++ b/display_information/format-coordinates/README.md @@ -1,40 +1,30 @@ -

Format Coordinates

- -

Write coordinates in a variety of common formats.

- -

Convert a map location Point in WGS84 to a String in a number of different -coordinate notations (and vice versa) including decimal degrees; degrees, minutes, seconds; Universal Transverse -Mercator (UTM), and United States National Grid (USNG).

- -

- -

How to use the sample

- -

Click on the map to see a callout with the clicked location's coordinate formatted in 4 different ways. You can -also put a coordinate string in any of these formats in the text field. Hit Enter and the coordinate string will be -converted to a map location which the callout will move to.

- -

How it works

- -

To convert between a Point and different coordinate formats using the -CoordinateFormatter:

-
    -
  1. Get or create a map Point with a spatial reference.
  2. -
  3. Use one of the static "to" methods on CoordinateFormatter such as - CoordinateFormatter.toLatitudeLongitude(point, CoordinateFormatter.LatitudeLongitudeFormat.DECIMAL_DEGREES, - 4) to get the formatted string.
  4. -
  5. To go from a formatted string to a Point, use one of the "from" static methods like - CoordinateFormatter.fromUtm(coordinateString, map.getSpatialReference(), CoordinateFormatter.UtmConversionMode - .LATITUDE_BAND_INDICATORS).
  6. -
- -

Relevant API

- - +# Format Coordinates + +Write coordinates in a variety of common formats. + +Convert a map location Point in WGS84 to a String in a number of different coordinate notations (and vice versa) including decimal degrees; degrees, minutes, seconds; Universal Transverse Mercator (UTM), and United States National Grid (USNG). + +![](FormatCoordinates.png) + +## How to use the sample + +Click on the map to see a callout with the clicked location's coordinate formatted in 4 different ways. You can also put a coordinate string in any of these formats in the text field. Hit Enter and the coordinate string will be converted to a map location which the callout will move to. + +## How it works + +To convert between a `Point` and different coordinate formats using the +`CoordinateFormatter`: + +1. Get or create a map `Point` with a spatial reference. +2. Use one of the static "to" methods on `CoordinateFormatter` such as + `CoordinateFormatter.toLatitudeLongitude(point, CoordinateFormatter.LatitudeLongitudeFormat.DECIMAL_DEGREES,4)` to get the formatted string`. +3. To go from a formatted string to a `Point`, use one of the "from" static methods like `CoordinateFormatter.fromUtm(coordinateString, map.getSpatialReference(), CoordinateFormatter.UtmConversionMode.LATITUDE_BAND_INDICATORS)`. + +## Relevant API + +* ArcGISMap +* ArcGISTiledLayer +* Basemap +* Callout +* CoordinateFormatter +* MapView diff --git a/display_information/identify-graphics/README.md b/display_information/identify-graphics/README.md index e091067f51..1a3d652277 100644 --- a/display_information/identify-graphics/README.md +++ b/display_information/identify-graphics/README.md @@ -1,31 +1,27 @@ -

Identify Graphics

+# Identify Graphics -

Determine if a graphic was clicked.

+Determine if a graphic was clicked. -

How to use the sample

+## How to use the sample -

When you click on a graphic on the map, you should see an alert.

+When you click on a graphic on the map, you should see an alert. -

+![](IdentifyGraphics.png) -

How it works

+## How it works -

To identify a Graphic from the MapView.

+To identify a `Graphic` from the `MapView`. -
    -
  1. Create a GraphicsOverlay and add it to the MapView.
  2. -
  3. Add Graphic along with a SimpleFillSymbol.
  4. -
  5. Add the graphic to the graphics overlay.
  6. -
  7. Identify the graphics on the specified location, MapView.identifyGraphicsOverlayAsync(graphicsOverlay, point, tolerance, max results) method.
  8. -
+1. Create a `GraphicsOverlay` and add it to the MapView. +2. Add Graphic along with a `SimpleFillSymbol`. +3. Add the graphic to the graphics overlay. +4. Identify the graphics on the specified location, `MapView.identifyGraphicsOverlayAsync(graphicsOverlay, point, tolerance, max results)` method. -

Relevant API

+## Relevant API - +* Graphic +* GraphicsOverlay +* MapView +* PointCollection +* Polygon +* SimpleFillSymbol diff --git a/display_information/show-callout/README.md b/display_information/show-callout/README.md index 93574eb713..cf161c9455 100644 --- a/display_information/show-callout/README.md +++ b/display_information/show-callout/README.md @@ -1,31 +1,27 @@ -

Show Callout

+# Show Callout -

Show a callout at the clicked location.

+Show a callout at the clicked location. -

+![](ShowCallout.png) -

How to use the sample

+## How to use the sample -

Click anywhere on the map to show a callout with the clicked location's coordinates.

+Click anywhere on the map to show a callout with the clicked location's coordinates. -

How it works

+## How it works -

To show a Callout with the clicked location's coordinates:

+To show a `Callout` with the clicked location's coordinates: -
    -
  1. Use MapView.setOnMouseClicked() to create a click event handler.
  2. -
  3. Create a new Point2D object from the events getX() and getY() coordinates.
  4. -
  5. Get the Points location on the map, MapView.screenToLocation(Point2D).
  6. -
  7. Get the MapView's callout, MapView.getCallout().
  8. -
  9. Use Callout.setDetail() to display map's point Point.getX() and Point.getY() to screen.
  10. -
  11. Show the callout, Callout.showCalloutAt(point), and dismiss on the next click with Callout.dismiss().
  12. -
+1. Use `MapView.setOnMouseClicked()` to create a click event handler. +2. Create a new Point2. object from the events getX() and getY() coordinates. +3. Get the `Point`s location on the map, `MapView.screenToLocation(Point2D)`. +4. Get the `MapView`'s callout, `MapView.getCallout()`. +5. Use `Callout.setDetail()` to display map's point `Point.getX()` and `Point.getY()` to screen. +6. Show the callout, `Callout.showCalloutAt(point)`, and dismiss on the next click with `Callout.dismiss()`. -

Relevant API

+## Relevant API - +* ArcGISMap +* Callout +* MapView +* Point diff --git a/display_information/show-labels-on-layer/README.md b/display_information/show-labels-on-layer/README.md index ddf396333c..a4e5816fee 100644 --- a/display_information/show-labels-on-layer/README.md +++ b/display_information/show-labels-on-layer/README.md @@ -1,34 +1,24 @@ -

Show Labels on Layer

+# Show Labels on Layer -

Add custom labels to a layer.

+Add custom labels to a layer. -

+![](ShowLabelsOnLayer.png) -

How it works

+## How it works -

To show labels on a feature layer:

+To show labels on a feature layer: -
    -
  1. First, create a FeatureLayer with a ServiceFeatureTable using an online feature - service.
  2. -
  3. Create a TextSymbol to use for displaying the label text.
  4. -
  5. Create a JSON string for the label definition. -
      -
    • Set the "LabelExpressionInfo.expression" key to express what the text the label should display. You can - use fields of the feature by using $feature.field_name in the expression. -
    • To use the text symbol, set the "symbol" key to the symbol's JSON representation using textSymbol.toJson().
    • -
    -
  6. -
  7. Create a label definition from the JSON using LabelDefinition.fromJson(json). -
  8. Add the definition to the feature layer with featureLayer.getLabelDefinitions().add(labelDefinition) - .
  9. -
  10. Lastly, enable labels on the layer using featureLayer.setLabelsEnabled().
  11. -
+1. First, create a `FeatureLayer` with a `ServiceFeatureTable` using an online feature service. +2. Create a `TextSymbol` to use for displaying the label text. +3. Create a JSON string for the label definition. + * Set the "LabelExpressionInfo.expression" key to express what the text the label should display. You can use fields of the feature by using `$feature.field_name` in the expression. + * To use the text symbol, set the "symbol" key to the symbol's JSON representation using `textSymbol.toJson()`. +4. Create a label definition from the JSON using `LabelDefinition.fromJson(json)`.` +5. Add the definition to the feature layer with `featureLayer.getLabelDefinitions().add(labelDefinition)`. +6. Lastly, enable labels on the layer using `featureLayer.setLabelsEnabled()`. -

Relevant API

+## Relevant API - +* FeatureLayer +* LabelDefinition +* TextSymbol diff --git a/display_information/sketch-on-map/README.md b/display_information/sketch-on-map/README.md index b41dec134c..74af75e840 100644 --- a/display_information/sketch-on-map/README.md +++ b/display_information/sketch-on-map/README.md @@ -1,47 +1,33 @@ -

Sketch on Map

+# Sketch on Map -

Use the Sketch Editor to edit, or sketch a new point, line, or polygon geometry on to a map.

+Use the Sketch Editor to edit, or sketch a new point, line, or polygon geometry on to a map. -

+![](SketchOnMap.png) -

How to use the sample

+## How to use the sample -

Choose which geometry type to sketch from one of the available buttons. Choose from points, multipoints, polylines, polygons, freehand polylines and freehand polgons.

+Choose which geometry type to sketch from one of the available buttons. Choose from points, multipoints, polylines, polygons, freehand polylines and freehand polygons. -

Use the control panel to cancel the sketch, undo or redo changes made to the sketch and to save the sketch to the graphics overlay. There is also the option to select a saved graphic and edit its geometry using the Sketch Editor. The graphics overlay can be cleared using the clear all button.

+Use the control panel to cancel the sketch, undo or redo changes made to the sketch and to save the sketch to the graphics overlay. There is also the option to select a saved graphic and edit its geometry using the Sketch Editor. The graphics overlay can be cleared using the clear all button. +## How it works -

How it works

+1. Create a `SketchEditor` and set it to the MapView with `mapView.setSketchEditor(sketchEditor)`. +2. Use `SketchEditor.start(SketchCreationMode.chooseGeometryType)` to start sketching. If editing an existing graphic's geometry, use `SketchEditor.start(graphic.getGeometry)`. +3. Check to see if undo and redo are possible during a sketch session using `sketchEditor.canUndo()` and `sketchEditor.canRedo()`. If it's possible, use `sketchEditor.undo()` and `sketchEditor.redo()`. +4. Check if sketch is valid using `sketchEditor.isSketchValid()`, then allow the sketch to be saved to the `Graphics Overlay`. +5. Get the geometry of the sketch using `sketchEditor.getGeometry()`, and create a new `Graphic` from that geometry. Add the graphic to the `Graphics Overlay`. +6. To exit the sketch editor, use `sketchEditor.stop()`. -
    -
  1. Create a SketchEditor and set it to the MapView with mapView.setSketchEditor(sketchEditor).
  2. +## Relevant API -
  3. Use SketchEditor.start(SketchCreationMode.chooseGeometryType) to start sketching. If editing an existing graphic's geometry, use SketchEditor.start(graphic.getGeometry).
  4. +* Geometry +* Graphic +* GraphicsOverlay +* MapView +* SketchCreationMode +* SketchEditor -
  5. Check to see if undo and redo are possible during a sketch session using sketchEditor.canUndo() and sketchEditor.canRedo(). If it's possible, use sketchEditor.undo() and sketchEditor.redo().
  6. - -
  7. Check if sketch is valid using sketchEditor.isSketchValid(), then allow the sketch to be saved to the Graphics Overlay.
  8. - -
  9. Get the geometry of the sketch using sketchEditor.getGeometry(), and create a new Graphic from that geometry. Add the graphic to the Graphics Overlay.
  10. - -
  11. To exit the sketch editor, use sketchEditor.stop().
  12. - -
- -

Relevant API

- - - -

Tags

- -

draw, edit, Geometry, Graphic, GraphicsOverlay, SketchCreationMode, SketchEditor

+## Tags +draw, edit, Geometry, Graphic, GraphicsOverlay, SketchCreationMode, SketchEditor diff --git a/display_information/update-graphics/README.md b/display_information/update-graphics/README.md index ffd67e468c..da9911c01c 100644 --- a/display_information/update-graphics/README.md +++ b/display_information/update-graphics/README.md @@ -1,63 +1,56 @@ -

Update Graphics

+# Update Graphics -

Change a graphic's symbol, attributes, and geometry.

+Change a graphic's symbol, attributes, and geometry. -

A graphic's geometry is its location on a map. The symbol controls how a graphic will be displayed to a map. And the -attributes store information about the graphic in key value pairs.

+A graphic's geometry is its location on a map. The symbol controls how a graphic will be displayed to a map. And the attributes store information about the graphic in key value pairs. -

+![](UpdateGraphics.gif) -

How to use the sample

+## How to use the sample -

Update Graphic's Location: +Update Graphic's Location: - click on a graphic, then click the update location button - - now click a new location on the map to move graphic

+ - now click a new location on the map to move graphic -

Update Graphic's Description: +Update Graphic's Description: - click on a graphic, then click the update description button - - enter a new description and click ok

- -

Update Graphic's Symbol: - - click on a graphic, then choose a symbol from the update symbol drop down box

- -

How it works

- -

How to change a Graphic's symbol, attributes, and geometry:

- -
    -
  1. Create a GraphicsOverlay and attach it to the MapView.
  2. -
  3. Create graphics using a Point and SimpleMarkerSymbol. -
    • point gives the x,y-coordinate location of where SimpleMarkerSymbol will be located
  4. -
  5. Add two Attributes to each graphic, Graphic.getAttributes().put(). -
    • first attribute key NAME and value the name for that graphic
    • -
    • second attribute key DESCRIPTION and value a description for that graphic
  6. -
  7. Add graphics to the graphics overlay, GraphicsOverlay.getGraphics().add(graphic).
  8. -
  9. Identify graphic that user has selected using MapView.identifyGraphicsOverlayAsync(GraphicsOverlay,Point2D, tolerance, maximumResults). -
    • graphics overlay, the one that was created above
    • -
    • point2D, from the user mouse click
    • -
    • tolerance, places buffer around the point2d
    • -
    • maxiumum result, sets the maximum amount of graphics to return near that point2d
  10. -
  11. Select graphic that user selected. -
    • the identify will return a list of graphics
    • -
    • go through that list and set each graphic's selection to true, Graphic.setSelected()
  12. -
  13. To update graphic's location. -
    • create a point from the user mouse click, MapView.screenToLocation()
    • -
    • set that point as the selected graphic's new geometry, Graphic.setGeometry()
  14. -
  15. To update graphic's attribute. -
    • get attrubutes of selected graphic and set DESCRIPTION key, Graphic.getAttributes().put("DESCRIPTION",)
  16. -
  17. To update graphic's symbol. -
    • get symbol from the drop down box
    • -
    • assign that symbol to the selected graphic, Graphic.setSymbol()
  18. -
- -

Relevant API

- - - - + - enter a new description and click ok + +Update Graphic's Symbol: + - click on a graphic, then choose a symbol from the update symbol drop down box + +## How it works + +How to change a `Graphic`'s symbol, attributes, and geometry: + +1. Create a `GraphicsOverlay` and attach it to the `MapView`. +2. Create graphics using a `Point` and `SimpleMarkerSymbol`. + * point gives the x,y-coordinate location of where SimpleMarkerSymbol will be located +3. Add two Attributes to each graphic, `Graphic.getAttributes().put()`. + * first attribute key NAME and value the name for that graphic + * second attribute key DESCRIPTION and value a description for that graphic +4. Add graphics to the graphics overlay, `GraphicsOverlay.getGraphics().add(graphic)`. +5. Identify graphic that user has selected using `MapView.identifyGraphicsOverlayAsync(GraphicsOverlay,Point2D, tolerance, maximumResults)`. + * graphics overlay, the one that was created above + * point2D, from the user mouse click + * tolerance, places buffer around the point2d + * maxiumum result, sets the maximum amount of graphics to return near that point2d +6. Select graphic that user selected. + * the identify will return a list of graphics + * go through that list and set each graphic's selection to true, `Graphic.setSelected()` +7. To update graphic's location. + * create a point from the user mouse click, `MapView.screenToLocation()` + * set that point as the selected graphic's new geometry, `Graphic.setGeometry()` +8. To update graphic's attribute. + * get attrubutes of selected graphic and set DESCRIPTION key, `Graphic.getAttributes().put("DESCRIPTION",)` +9. To update graphic's symbol. + * get symbol from the drop down box + * assign that symbol to the selected graphic, `Graphic.setSymbol()` + +## Relevant API + +* ArcGISMap +* Graphic +* GraphicsOverlay +* MapView +* SimpleMarkerSymbol diff --git a/editing/add-features/README.md b/editing/add-features/README.md index 4021978102..41207aa775 100644 --- a/editing/add-features/README.md +++ b/editing/add-features/README.md @@ -1,34 +1,30 @@ -

Add Features

+# Add Features -

Add new features to an online feature service.

+Add new features to an online feature service. -

A FeatureLayer created using this SeviceFeatutreTable that is applied to the ArcGISMap will display any new Features automatically.

+A FeatureLayer created using this SeviceFeatutreTable that is applied to the ArcGISMap will display any new Features automatically. -

+![](AddFeatures.gif) -

How to use the sample

+## How to use the sample -

Click on a location in the MapView to add a Feature at that location.

+Click on a location in the MapView to add a Feature at that location. -

How it works

+## How it works -

To add a feature to a ServiceFeatureTable and update it's server with that Feature:

+To add a feature to a `ServiceFeatureTable` and update it's server with that `Feature`: -
    -
  1. Create a service feature table from a URL, new ServiceFeatureTable("URL").
  2. -
  3. Create a FeatureLayer from the service feature table, new FeatureLayer(ServiceFeatureTable).
  4. -
  5. Create a feature with attributes and a location using service feature table, ServiceFeatureTable.createFeature(attributes, location).
  6. -
  7. Apply the addition to the service feature table, ServiceFeatureTable.addFeatureAsync(Feature).
  8. -
  9. Update the new feature to the server, ServiceFeatureTable.applyEditsAsync().
  10. -
+1. Create a service feature table from a URL, `new ServiceFeatureTable("URL")`. +2. Create a `FeatureLayer` from the service feature table, `new FeatureLayer(ServiceFeatureTable)`. +3. Create a feature with attributes and a location using service feature table, `ServiceFeatureTable.createFeature(attributes, location)`. +4. Apply the addition to the service feature table, `ServiceFeatureTable.addFeatureAsync(Feature)`. +5. Update the new feature to the server, `ServiceFeatureTable.applyEditsAsync()`. -

Relevant API

+## Relevant API - \ No newline at end of file +* ArcGISMap +* Feature +* FeatureEditResult +* FeatureLayer +* MapView +* ServiceFeatureTable diff --git a/editing/delete-features/README.md b/editing/delete-features/README.md index 9d45f6a251..e12ba4b6a7 100644 --- a/editing/delete-features/README.md +++ b/editing/delete-features/README.md @@ -1,33 +1,29 @@ -

Delete Features

+# Delete Features -

Delete features from an online feature service.

+Delete features from an online feature service. -

How to use the sample

+## How to use the sample -

To delete a feature. +To delete a feature. - click on a feature on the Map - - click on the delete button

+ - click on the delete button -

+![](DeleteFeatures.gif) -

How it works

+## How it works -

To delete a Feature from a ServiceFeatureTable:

+To delete a `Feature` from a `ServiceFeatureTable`: -
    -
  1. Create a service feature table from a URL.
  2. -
  3. Create a FeatureLayer from the service feature table.
  4. -
  5. Select features from the feature layer via FeatureLayer.selectFeatures().
  6. -
  7. Remove the selected features from the ServiceFeatureTable using ServiceFeatureTable.deleteFeaturesAsync().
  8. -
  9. Update the table on the server using ServiceFeatureTable.applyEditsAsync().
  10. -
+1. Create a service feature table from a URL. +2. Create a `FeatureLayer` from the service feature table. +3. Select features from the feature layer via `FeatureLayer.selectFeatures()`. +4. Remove the selected features from the ServiceFeatureTable using `ServiceFeatureTable.deleteFeaturesAsync()`. +5. Update the table on the server using `ServiceFeatureTable.applyEditsAsync()`. -

Relevant API

+## Relevant API - +* ArcGISMap +* Feature +* FeatureLayer +* MapView +* ServiceFeatureTable diff --git a/editing/edit-and-sync-features/README.md b/editing/edit-and-sync-features/README.md index f99a52b07e..07bf8dea92 100644 --- a/editing/edit-and-sync-features/README.md +++ b/editing/edit-and-sync-features/README.md @@ -1,56 +1,47 @@ -

Edit and sync features

+# Edit and sync features -

Synchronize offline edits with a feature service.

+Synchronize offline edits with a feature service. -

+![](EditAndSyncFeatures.png) -

Use case

+## Use case -

By generating a local geodatabase, a user can take an offline copy of a feature service, make changes to it while still offline, and later synchronize their edits to the online feature service. For example, an infrastructure survey worker could use this functionality to save an up-to-date geodatabase to their device, perform their survey work in a remote area without internet connection, and later sync their results to an online geodatabase when regaining internet access.

+By generating a local geodatabase, a user can take an offline copy of a feature service, make changes to it while still offline, and later synchronize their edits to the online feature service. For example, an infrastructure survey worker could use this functionality to save an up-to-date geodatabase to their device, perform their survey work in a remote area without internet connection, and later sync their results to an online geodatabase when regaining internet access. -

How to use the sample

+## How to use the sample -
    -
  1. Pan and zoom to the area you would like to download point features for, ensuring that all desired features are within the red rectangle.
  2. -
  3. Click on the Generate Geodatabase button to make an offline database of the area. Once the job completes successfully, the available features within this area will be displayed.
  4. -
  5. A feature can be selected by tapping on it. The selected feature can be moved to a new location by tapping anywhere on the map.
  6. -
  7. Once a successful edit has been made to a feature, the Sync Geodatabase button is enabled. Press this button to synchronize the edits made to the local geodatabase with the remote feature service.
  8. -
+1. Pan and zoom to the area you would like to download point features for, ensuring that all desired features are within the red rectangle. +2. Click on the Generate Geodatabase button to make an offline database of the area. Once the job completes successfully, the available features within this area will be displayed. +3. A feature can be selected by tapping on it. The selected feature can be moved to a new location by tapping anywhere on the map. +4. Once a successful edit has been made to a feature, the Sync Geodatabase button is enabled. Press this button to synchronize the edits made to the local geodatabase with the remote feature service. -

How it works

+## How it works -
    -
  1. Create a GeodatabaseSyncTask from a URL.
  2. -
  3. Use createDefaultGenerateGeodatabaseParametersAsync() on the geodatabase sync task to create GenerateGeodatabaseParameters, passing in an Envelope extent as the parameter.
  4. -
  5. Create a GenerateGeodatabaseJob from the GeodatabaseSyncTask using generateGeodatabaseAsync(...) passing in parameters and a path to the local geodatabase.
  6. -
  7. Start the GenerateGeodatabaseJob and, on success, load the Geodatabase.
  8. -
  9. On successful loading, call getGeodatabaseFeatureTables() on the Geodatabase and add it to the ArcGISMap's operational layers.
  10. -
  11. To sync changes between the local and web geodatabases: -
      -
    • Create a SyncGeodatabaseParameters object, and set it's sync direction with syncGeodatabaseParameters.SyncDirection().
    • -
    • Create a SyncGeodatabaseJob from GeodatabaseSyncTask using .syncGeodatabaseAsync(...) passing the SyncGeodatabaseParameters and Geodatabase as arguments.
    • -
    • Start the SyncGeodatabaseJob to synchronize the edits.
    • -
    -
  12. -
+1. Create a `GeodatabaseSyncTask` from a URL. +2. Use `createDefaultGenerateGeodatabaseParametersAsync()` on the geodatabase sync task to create `GenerateGeodatabaseParameters`, passing in an `Envelope` extent as the parameter. +3. Create a `GenerateGeodatabaseJob` from the `GeodatabaseSyncTask` using `generateGeodatabaseAsync(...)` passing in parameters and a path to the local geodatabase. +4. Start the `GenerateGeodatabaseJob` and, on success, load the `Geodatabase`. +5. On successful loading, call `getGeodatabaseFeatureTables()` on the `Geodatabase` and add it to the `ArcGISMap`'s operational layers. +6. To sync changes between the local and web geodatabases: + * Create a `SyncGeodatabaseParameters` object, and set it's sync direction with `syncGeodatabaseParameters.SyncDirection()`. + * Create a `SyncGeodatabaseJob` from `GeodatabaseSyncTask` using `.syncGeodatabaseAsync(...)` passing the `SyncGeodatabaseParameters` and `Geodatabase` as arguments. + * Start the `SyncGeodatabaseJob` to synchronize the edits. -

Relevant API

+## Relevant API - +* FeatureLayer +* FeatureTable +* GenerateGeodatabaseJob +* GenerateGeodatabaseParameters +* GeodatabaseSyncTask +* SyncGeodatabaseJob +* SyncGeodatabaseParameters +* SyncLayerOption -

About the data

+## About the data -

The basemap for this sample is a San Francisco offline tile package, provided by ESRI to support ArcGIS Runtime SDK Samples. The WildfireSync feature service elements illustrate a collection schema for wildfire information.

+The basemap for this sample is a San Francisco offline tile package, provided by ESRI to support ArcGIS Runtime SDK Samples. The * WildfireSync * feature service elements illustrate a collection schema for wildfire information. -

Tags

+## Tags -

feature service, geodatabase, offline, synchronize

+feature service, geodatabase, offline, synchronize diff --git a/editing/edit-feature-attachments/README.md b/editing/edit-feature-attachments/README.md index e0502614fe..9d9101460f 100644 --- a/editing/edit-feature-attachments/README.md +++ b/editing/edit-feature-attachments/README.md @@ -1,40 +1,35 @@ -

Edit Feature Attachments

+# Edit Feature Attachments -

Add or remove feature attachments.

+Add or remove feature attachments. -

+![](EditFeatureAttachments.gif) -

How to use the sample

+## How to use the sample -

To add an attachment. - - click on a feature and then click add attachment button in panel

+To add an attachment. + - click on a feature and then click add attachment button in panel -

To delete an attachment. - - click on a feature, select an attachment from attachment list, and click delete attachment button

+To delete an attachment. + - click on a feature, select an attachment from attachment list, and click delete attachment button -

How it works

+## How it works -

To get a Feature from a ServiceFeatureTable and add or delete Attachment:

+To get a `Feature` from a `ServiceFeatureTable` and add or delete `Attachment`: -
    -
  1. Create a service feature table from a URL.
  2. -
  3. Create a FeatureLayer from the service feature table.
  4. -
  5. Select features from the feature layer, FeatureLayer.selectFeatures().
  6. -
  7. To fetch the feature's attachments, cast to an ArcGISFeature and useArcGISFeature.fetchAttachmentsAsync().
  8. -
  9. To add an attachment to the selected ArcGISFeature, create an attachment and use ArcGISFeature.addAttachmentAsync().
  10. -
  11. To delete an attachment from the selected ArcGISFeature, use the ArcGISFeature.deleteAttachmentAsync().
  12. -
  13. After a change, apply the changes to the server using ServiceFeatureTable.applyEditsAsync().
  14. -
+1. Create a service feature table from a URL. +2. Create a `FeatureLayer` from the service feature table. +3. Select features from the feature layer, `FeatureLayer.selectFeatures()`. +4. To fetch the feature's attachments, cast to an `ArcGISFeature` and use`ArcGISFeature.fetchAttachmentsAsync()`. +5. To add an attachment to the selected ArcGISFeature, create an attachment and use `ArcGISFeature.addAttachmentAsync()`. +6. To delete an attachment from the selected ArcGISFeature, use the `ArcGISFeature.deleteAttachmentAsync()`. +7. After a change, apply the changes to the server using `ServiceFeatureTable.applyEditsAsync()`. -

Relevant API

- - +## Relevant API +* ArcGISFeature +* ArcGISMap +* Attachment +* Feature +* FeatureLayer +* MapView +* ServiceFeatureTable diff --git a/editing/update-attributes/README.md b/editing/update-attributes/README.md index 0345acbb05..e6f52039d0 100644 --- a/editing/update-attributes/README.md +++ b/editing/update-attributes/README.md @@ -1,33 +1,29 @@ -

Update Attributes

+# Update Attributes -

Update feature attributes in an online feature service.

+Update feature attributes in an online feature service. -

+![](UpdateAttributes.gif) -

How to use the sample

+## How to use the sample -

To change the feature's damage property. +To change the feature's damage property. - select feature from the map - - from drop down box select a damage type

+ - from drop down box select a damage type -

How it works

+## How it works -

To get a Feature from a ServiceFeatureTable and update its attributes:

+To get a `Feature` from a `ServiceFeatureTable` and update its attributes: -
    -
  1. Create a service feature table from a URL.
  2. -
  3. Create a FeatureLayer from the service feature table.
  4. -
  5. Select features from the feature layer, FeatureLayer.selectFeatures.
  6. -
  7. To update the feature's attribute use the ArcGISFeature.getAttributes().put().
  8. -
  9. After a change, apply the changes on the server using ServiceFeatureTable.applyEditsAsync().
  10. -
+1. Create a service feature table from a URL. +2. Create a `FeatureLayer` from the service feature table. +3. Select features from the feature layer, `FeatureLayer.selectFeatures`. +4. To update the feature's attribute use the `ArcGISFeature.getAttributes().put()`. +5. After a change, apply the changes on the server using `ServiceFeatureTable.applyEditsAsync()`. -

Relevant API

+## Relevant API - +* ArcGISMap +* Feature +* FeatureLayer +* MapView +* ServiceFeatureTable diff --git a/editing/update-geometries/README.md b/editing/update-geometries/README.md index b4b0342cbe..ff63d5dba9 100644 --- a/editing/update-geometries/README.md +++ b/editing/update-geometries/README.md @@ -1,32 +1,28 @@ -

Update Geometries

+# Update Geometries -

Update a feature's location in an online feature service.

+Update a feature's location in an online feature service. -

+![](UpdateGeometries.gif) -

How to use the sample

+## How to use the sample -

To update a feature's location. - - click on a feature from the map and then click on another location to move it

+To update a feature's location. + - click on a feature from the map and then click on another location to move it -

How it works

+## How it works -

To get a Feature from a ServiceFeatureTable and change it's geometry:

+To get a `Feature` from a `ServiceFeatureTable` and change it's geometry: -
    -
  1. Create a service feature table from a URL.
  2. -
  3. Create a FeatureLayer from the service feature table.
  4. -
  5. Select features from the feature layer, FeatureLayer.selectFeatures.
  6. -
  7. Change the selected feature's location using Feature.setGeometry(Geometry).
  8. -
  9. After a change, update the table on the server using ServiceFeatureTable.applyEditsAsync().
  10. -
+1. Create a service feature table from a URL. +2. Create a `FeatureLayer` from the service feature table. +3. Select features from the feature layer, `FeatureLayer.selectFeatures`. +4. Change the selected feature's location using `Feature.setGeometry(Geometry)`. +5. After a change, update the table on the server using `ServiceFeatureTable.applyEditsAsync()`. -

Relevant API

+## Relevant API - +* ArcGISMap +* Feature +* FeatureLayer +* MapView +* ServiceFeatureTable diff --git a/feature_layers/change-feature-layer-renderer/README.md b/feature_layers/change-feature-layer-renderer/README.md index 94c4e98d3e..54017e2382 100644 --- a/feature_layers/change-feature-layer-renderer/README.md +++ b/feature_layers/change-feature-layer-renderer/README.md @@ -1,32 +1,27 @@ -

Change Feature Layer Renderer

+# Change Feature Layer Renderer -

Change how a feature layer looks with a renderer.

+Change how a feature layer looks with a renderer. -

+![](ChangeFeatureLayerRenderer.gif) -

How to use the sample

+## How to use the sample -

Use the buttons in the control panel to change the renderer.

+Use the buttons in the control panel to change the renderer. -

How it works

+## How it works -

To change the FeatureLayer's Renderer:

+To change the `FeatureLayer`'s `Renderer`: - +* Create a `ServiceFeatureTable` from a URL. +* Create a feature layer from the service feature table. +* Create a new renderer (in this case, a `SimpleRenderer`). +* Change the feature layer's renderer using `FeatureLayer.setRenderer(SimpleRenderer)`. -

Relevant API

- - +## Relevant API +* ArcGISMap +* FeatureLayer +* MapView +* Renderer +* ServiceFeatureTable +* SimpleRenderer diff --git a/feature_layers/feature-collection-layer-query/README.md b/feature_layers/feature-collection-layer-query/README.md index 113ac12f19..2a3d0b1c5c 100644 --- a/feature_layers/feature-collection-layer-query/README.md +++ b/feature_layers/feature-collection-layer-query/README.md @@ -1,33 +1,30 @@ -

Feature Collection Layer Query

- -

Create a feature collection layer which shows the result of a SQL query from a service feature table.

- -

- -

How it works

- -
    -
  1. Create a ServiceFeatureTable object from a URL, and store it as a FeatureTable object.
  2. -
  3. Create a QueryParameters object and specify the where clause with QueryParameters.setWhereClause().
  4. -
  5. Query the features stored in the feature table with FeatureTable.queryFeaturesAsync(query).
  6. -
  7. Once complete, instantiate a FeatureCollectionTable with the results of the query from the FeatureQueryResult object.
  8. -
  9. Create a FeatureCollection object, and add the feature collection table to it.
  10. -
  11. Create a FeatureCollectionLayer object from the feature collection.
  12. -
  13. Display the layer by adding it to the map's operational layers with mapView.getMap().getOperationalLayers().add(featureCollectionLayer).
  14. -
- -

Relevant API

- - - -

Tags

-

FeatureQueryResult, FeatureCollection, FeatureCollectionLayer, FeatureCollectionTable, query

+# Feature Collection Layer Query + +Create a feature collection layer which shows the result of a SQL query from a service feature table. + +![](FeatureCollectionLayerQuery.png) + +## How it works + +1. Create a `ServiceFeatureTable` object from a URL, and store it as a `FeatureTable` object. +2. Create a `QueryParameters` object and specify the where clause with `QueryParameters.setWhereClause()`. +3. Query the features stored in the feature table with `FeatureTable.queryFeaturesAsync(query)`. +4. Once complete, instantiate a `FeatureCollectionTable` with the results of the query from the `FeatureQueryResult` object. +5. Create a `FeatureCollection` object, and add the feature collection table to it. +6. Create a `FeatureCollectionLayer` object from the feature collection. +7. Display the layer by adding it to the map's operational layers with `mapView.getMap().getOperationalLayers().add(featureCollectionLayer)`. + +## Relevant API + +* FeatureCollection +* FeatureCollectionLayer +* FeatureCollectionTable +* FeatureLayer +* FeatureTable +* FeatureQueryResult +* QueryParameters +* ServiceFeatureTable + +## Tags + +FeatureQueryResult, FeatureCollection, FeatureCollectionLayer, FeatureCollectionTable, query diff --git a/feature_layers/feature-collection-layer/README.md b/feature_layers/feature-collection-layer/README.md index 31da0fe180..ba98f93f62 100644 --- a/feature_layers/feature-collection-layer/README.md +++ b/feature_layers/feature-collection-layer/README.md @@ -1,37 +1,30 @@ -

Feature Collection Layer

+# Feature Collection Layer -

Combine feature tables with different geometries into a single layer.

+Combine feature tables with different geometries into a single layer. -

+![](FeatureCollectionLayer.png) -

How it works

+## How it works -

To display a FeatureCollection as a FeatureCollectionLayer on an ArcGISMap using different FeatureCollectionTables:

+To display a `FeatureCollection` as a `FeatureCollectionLayer` on an `ArcGISMap` using different `FeatureCollectionTable`s: -
    -
  1. Create a feature collection layer using a new feature collection, new FeatureCollectionLayer(featureCollection)
  2. -
  3. The layer is then added to the map, ArcGISMap.getOperationalLayers().add(featureCollectionLayer).
  4. -
  5. A feature collection table is then created for the GeometryTypes Point Polyline Polygon, new FeatureCollectionTable(fields, geometryType, spatialRefernce) -
      -
    • Fields is a list of the feature's attributes, which this one defines its name.
    • -
    -
  6. -
  7. A SimpleRenderer is then assigned to each table which will render any Features from that table using the Symbol that was set.
  8. -
  9. The table is then added to the feature collection, FeatureCollection.getTables().add(featureCollectionTable).
  10. -
  11. To create a feature from the feature collection table use the createFeature method passing an attribute and geometry for that feature, FeatureCollectionTable.createFeature(attributes, geometry).
  12. -
  13. Add new feature to the table, FeatureCollectionTable.addFeatureAsync(feature).
  14. -
+1. Create a feature collection layer using a new feature collection, `new FeatureCollectionLayer(featureCollection)` +2. The layer is then added to the map, `ArcGISMap.getOperationalLayers().add(featureCollectionLayer)`. +3. A feature collection table is then created for the `GeometryType`s `Point` `Polyline` `Polygon`, `new FeatureCollectionTable(fields, geometryType, spatialRefernce)` + * `Field`s is a list of the feature's attributes, which this one defines its name. +4. A `SimpleRenderer` is then assigned to each table which will render any `Feature`s from that table using the `Symbol` that was set. +5. The table is then added to the feature collection, `FeatureCollection.getTables().add(featureCollectionTable)`. +6. To create a feature from the feature collection table use the createFeature method passing an attribute and geometry for that feature, `FeatureCollectionTable.createFeature(attributes, geometry)`. +7. Add new feature to the table, `FeatureCollectionTable.addFeatureAsync(feature)`. -

Relevant API

+## Relevant API - +* FeatureCollection +* FeatureCollectionLayer +* FeatureCollectionTable +* Feature +* Field +* SimpleFillSymbol +* SimpleLineSymbol +* SimpleMarkerSymbol +* SimpleRenderer diff --git a/feature_layers/feature-layer-definition-expression/README.md b/feature_layers/feature-layer-definition-expression/README.md index 73df9de2d2..ac570df28e 100644 --- a/feature_layers/feature-layer-definition-expression/README.md +++ b/feature_layers/feature-layer-definition-expression/README.md @@ -1,28 +1,24 @@ -

Feature Layer Definition Expression

+# Feature Layer Definition Expression -

Filter which features are shown using an expression.

+Filter which features are shown using an expression. -

+![](FeatureLayerDefinitionExpression.gif) -

How to use the sample

+## How to use the sample -

Use the buttons in the control panel to apply or reset definition expression.

+Use the buttons in the control panel to apply or reset definition expression. -

How it works

+## How it works -

To limit the Features in your FeatureLayer:

+To limit the `Feature`s in your `FeatureLayer`: -
    -
  1. Create a ServiceFeatureTable from a URL.
  2. -
  3. Create a feature layer from the service feature table.
  4. -
  5. Set the limit of the features on your feature layer using FeatureLayer.setDefinitionExpression(Expression).
  6. -
+1. Create a `ServiceFeatureTable` from a URL. +2. Create a feature layer from the service feature table. +3. Set the limit of the features on your feature layer using `FeatureLayer.setDefinitionExpression(Expression)`. -

Relevant API

+## Relevant API - +* ArcGISMap +* FeatureLayer +* MapView +* ServiceFeatureTable diff --git a/feature_layers/feature-layer-dictionary-renderer/README.md b/feature_layers/feature-layer-dictionary-renderer/README.md index 0faeb7243c..a2243ca93b 100644 --- a/feature_layers/feature-layer-dictionary-renderer/README.md +++ b/feature_layers/feature-layer-dictionary-renderer/README.md @@ -1,45 +1,40 @@ -

Dictionary Renderer with Feature Layer

- -

Convert features into graphics to show them with mil2525d symbols.

- -

The dictionary renderer creates these graphics using a mil2525d style file and the attributes attached to each -feature within the geodatabase.

- -

- -

How it works

- -

To apply a DictionaryRenderer and display mil2525d graphics:

- -
    -
  1. Create a Geodatabase(geodatabasePath). -
    • geodatabasePath, local path to geodatabase
  2. -
  3. Load the geodatabase asynchronously, Geodatabase.loadAsync(). -
    • this will allows the application to continue working while the geodatabase loads in all feature tables
  4. -
  5. Create a SymbolDicitonary, SymbolDictionary(specificationType). -
    • specificationType, this will be the mil2525d.stylx file
    • -
    • load asynchronously, DictionarySymbol.loadAsync()
  6. -
  7. Wait for geodatabase to completely load, Geodatabase.addDoneLoadingListener().
  8. -
  9. Cycle through each GeodatabaseFeatureTable from geodatabase, Geodatabase.getGeodatabaseFeatureTables().
  10. -
  11. Create a FeatureLayer from each table within the geodatabase, FeatureLayer(GeodatabaseFeatureTable). -
    • load asynchronouly, FeatureLayer.loadAsync()
  12. -
  13. Wait for each layer to load, FeatureLayer.addDoneLoadingListener.
  14. -
  15. Check if layer is last layer to load and create Envelope from each layer. -
    • set this envelope to be the Viewpoint of the map view, MapView.setViewpoint(new Viewpoint(Envelope))
  16. -
  17. Add feature layer to map, Map.getOperationalLayers().add(FeatureLayer).
  18. -
  19. Create DictionaryRenderer(SymbolDictionary) and attach to feature layer, FeatureLayer.setRenderer(DictionaryRenderer).
  20. -
- -

Relevant API

- - +# Dictionary Renderer with Feature Layer + +Convert features into graphics to show them with mil2525. symbols. + +The dictionary renderer creates these graphics using a mil2525. style file and the attributes attached to each feature within the geodatabase. + +![](FeatureLayerDictionaryRenderer.png) + +## How it works + +To apply a `DictionaryRenderer` and display mil2525. graphics: + +1. Create a `Geodatabase(geodatabasePath)`. + * geodatabasePath, local path to geodatabase +2. Load the geodatabase asynchronously, `Geodatabase.loadAsync()`. + * this will allows the application to continue working while the geodatabase loads in all feature tables +3. Create a `SymbolDicitonary`, `SymbolDictionary(specificationType)`. + * specificationType, this will be the mil2525d.stylx file + * load asynchronously, `DictionarySymbol.loadAsync()` +4. Wait for geodatabase to completely load, `Geodatabase.addDoneLoadingListener()`. +5. Cycle through each `GeodatabaseFeatureTable` from geodatabase, `Geodatabase.getGeodatabaseFeatureTables()`. +6. Create a `FeatureLayer` from each table within the geodatabase, `FeatureLayer(GeodatabaseFeatureTable)`. + * load asynchronouly, `FeatureLayer.loadAsync()` +7. Wait for each layer to load, `FeatureLayer.addDoneLoadingListener`. +8. Check if layer is last layer to load and create `Envelope` from each layer. + * set this envelope to be the `Viewpoint` of the map view, `MapView.setViewpoint(new Viewpoint(Envelope))` +9. Add feature layer to map, `Map.getOperationalLayers().add(FeatureLayer)`. +10. Create `DictionaryRenderer(SymbolDictionary)` and attach to feature layer, `FeatureLayer.setRenderer(DictionaryRenderer)`. + +## Relevant API + +* ArcGISMap +* Basemap +* DictionaryRenderer +* Envelope +* FeatureLayer +* Geodatabase +* GeometryEngine +* MapView +* SymbolDictionary diff --git a/feature_layers/feature-layer-extrusion/README.md b/feature_layers/feature-layer-extrusion/README.md index 7d4768f002..6f9ca8ddd9 100644 --- a/feature_layers/feature-layer-extrusion/README.md +++ b/feature_layers/feature-layer-extrusion/README.md @@ -1,27 +1,23 @@ -

Feature Layer Extrusion.

+# Feature Layer Extrusion -

Extrude features based on their attributes.

+Extrude features based on their attributes. -

+![](FeatureLayerExtrusion.gif) -

How it works

+## How it works -

To extrude features from a FeatureLayer:

+To extrude features from a `FeatureLayer`: -
    -
  1. Create a ServiceFeatureTable from an URL.
  2. -
  3. Create a feature layer from service feature table. -
      Make sure to set rendering mode to dynamic, statesFeatureLayer.setRenderingMode(RenderingMode.DYNAMIC).
  4. -
  5. Apply a SimpleRenderer to the feature layer.
  6. -
  7. Set ExtrusionMode of render, renderer.getSceneProperties().setExtrusionMode(SceneProperties.ExtrusionMode.BASE_HEIGHT).
  8. -
  9. Set extrusion expression of renderer, renderer.getSceneProperties().setExtrusionExpression("[POP2007]/ 10").
  10. -
+1. Create a `ServiceFeatureTable` from an URL. +2. Create a feature layer from service feature table. + * Make sure to set rendering mode to dynamic, `statesFeatureLayer.setRenderingMode(RenderingMode.DYNAMIC)`. +3. Apply a `SimpleRenderer` to the feature layer. +4. Set `ExtrusionMode` of render, `renderer.getSceneProperties().setExtrusionMode(SceneProperties.ExtrusionMode.BASE_HEIGHT)`. +5. Set extrusion expression of renderer, `renderer.getSceneProperties().setExtrusionExpression("[POP2007]/ 10")`. -

Relevant API

+## Relevant API - +* FeatureLayer +* SceneProperties +* ServiceFeatureTable +* FeatureLayer diff --git a/feature_layers/feature-layer-feature-service/README.md b/feature_layers/feature-layer-feature-service/README.md index eb27f6b9c5..a26f6c6986 100644 --- a/feature_layers/feature-layer-feature-service/README.md +++ b/feature_layers/feature-layer-feature-service/README.md @@ -1,24 +1,20 @@ -

Feature Layer Feature Service

+# Feature Layer Feature Service -

Show features from an online feature service.

+Show features from an online feature service. -

+![](FeatureLayerFeatureService.png) -

How it works

+## How it works -

To add Features from your FeatureLayer to an ArcGISMap.

+To add `Feature`s from your `FeatureLayer` to an `ArcGISMap`. -
    -
  1. Create a ServiceFeatureTable from a URL.
  2. -
  3. Create a feature layer from the service feature table.
  4. -
  5. Set the feature layer to your ArcGISMap using ArcGISMap.getOperationalLayers().add(FeatureLayer).
  6. -
+1. Create a `ServiceFeatureTable` from a URL. +2. Create a feature layer from the service feature table. +3. Set the feature layer to your ArcGISMap using `ArcGISMap.getOperationalLayers().add(FeatureLayer)`. -

Relevant API

+## Relevant API - +* ArcGISMap +* FeatureLayer +* MapView +* ServiceFeatureTable diff --git a/feature_layers/feature-layer-geodatabase/README.md b/feature_layers/feature-layer-geodatabase/README.md index 8f5d71b8f7..d09cfd53ac 100644 --- a/feature_layers/feature-layer-geodatabase/README.md +++ b/feature_layers/feature-layer-geodatabase/README.md @@ -1,28 +1,24 @@ -

Feature Layer (Geodatabase)

+# Feature Layer (Geodatabase) -

Display features from a local geodatabase.

+Display features from a local geodatabase. -

+![](FeatureLayerGeodatabase.png) -

How it works

+## How it works -

To create a Geodatabase and display it as a FeatureLayer:

+To create a `Geodatabase` and display it as a `FeatureLayer`: -
    -
  1. Create a geodatabase using the provided local resource, new Geodatabase(geodatabaseResourceUrl).
  2. -
  3. Wait for geodatabase to load, Geodatabase.addDoneLoadingListener(runnable)
  4. -
  5. Get the `Trailheads` GeodatabaseFeatureTable from the geodatabase, Geodatabase.getGeodatabaseFeatureTable(tableName)
  6. -
  7. Create feature layer using the table from above, new FeatureLayer(geodatabaseFeatureTable)
  8. -
  9. Add feature layer to ArcGISMap, ArcGISMap.getOperationalLayers().add(featureLayer)
  10. -
+1. Create a geodatabase using the provided local resource, `new Geodatabase(geodatabaseResourceUrl)`. +2. Wait for geodatabase to load, `Geodatabase.addDoneLoadingListener(runnable)` +3. Get the `Trailheads` `GeodatabaseFeatureTable` from the geodatabase, `Geodatabase.getGeodatabaseFeatureTable(tableName)` +4. Create feature layer using the table from above, `new FeatureLayer(geodatabaseFeatureTable)` +5. Add feature layer to `ArcGISMap`, `ArcGISMap.getOperationalLayers().add(featureLayer)` -

Relevant API

+## Relevant API - +* Basemap +* FeatureLayer +* Geodatabase +* GeodatabaseFeatureTable +* Map +* MapView diff --git a/feature_layers/feature-layer-geopackage/README.md b/feature_layers/feature-layer-geopackage/README.md index db0dc407e5..f35fe17488 100644 --- a/feature_layers/feature-layer-geopackage/README.md +++ b/feature_layers/feature-layer-geopackage/README.md @@ -1,28 +1,23 @@ -

Feature Layer GeoPackage

+# Feature Layer GeoPackage -

Display features from a local GeoPackage.

+Display features from a local GeoPackage. -

+![](FeatureLayerGeoPackage.png) -

How it works

+## How it works -

To create a FeatureLayer from a local GeoPackage:

+To create a `FeatureLayer` from a local `GeoPackage`: -
    -
  1. Create a GeoPackage passing the URI string into the constructor.
  2. -
  3. Load the GeoPackage with GeoPackage.loadAsync
  4. -
  5. When it's done loading, get the GeoPackageFeatureTables inside with geoPackage.getGeoPackageFeatureTables()
  6. -
  7. For each feature table, create a feature layer with FeatureLayer(featureTable). Add each to - the map as an operational layer with map.getOperationalLayers().add(featureLayer)
  8. -
+1. Create a `GeoPackage` passing the URI string into the constructor. +2. Load the `GeoPackage` with `GeoPackage.loadAsync` +3. When it's done loading, get the `GeoPackageFeatureTable`s inside with `geoPackage.getGeoPackageFeatureTables()` +4. For each feature table, create a feature layer with `FeatureLayer(featureTable)`. Add each to the map as an operational layer with `map.getOperationalLayers().add(featureLayer)` -

Relevant API

+## Relevant API - +* ArcGISMap +* Basemap +* FeatureLayer +* GeoPackage +* GeoPackageFeatureTable +* MapView diff --git a/feature_layers/feature-layer-query/README.md b/feature_layers/feature-layer-query/README.md index a2d0b9864c..35a2bd1b50 100644 --- a/feature_layers/feature-layer-query/README.md +++ b/feature_layers/feature-layer-query/README.md @@ -1,34 +1,30 @@ -

Feature Layer Query

+# Feature Layer Query -

Find features matching a SQL query.

+Find features matching a SQL query. -

+![](FeatureLayerQuery.png) -

How to use the sample

+## How to use the sample -

Input the name of a U.S. state into search bar. When you hit search the application performs a query on the feature table and based on the result either highlights the state geometry or provides an error.

+Input the name of a U.S. state into search bar. When you hit search the application performs a query on the feature table and based on the result either highlights the state geometry or provides an error. -

Note: The search is case sensitive.

+Note: The search is case sensitive. -

How it works

+## How it works -

To query a Feature from your FeatureLayer:

+To query a `Feature` from your `FeatureLayer`: -
    -
  1. Create a ServiceFeatureTable from a URL.
  2. -
  3. Create a feature layer from the service feature table.
  4. -
  5. Create a QueryParameters object and specified the where clause on it with QueryParameters.setWhereClause() from the text entered by the user.
  6. -
  7. Fire the query on the service feature table using ServiceFeatureTable.queryFeaturesAsync(query).
  8. -
  9. Once complete get the feature's from the FeatureQueryResult.
  10. -
+1. Create a `ServiceFeatureTable` from a URL. +2. Create a feature layer from the service feature table. +3. Create a `QueryParameters` object and specified the where clause on it with `QueryParameters.setWhereClause()` from the text entered by the user. +4. Fire the query on the service feature table using `ServiceFeatureTable.queryFeaturesAsync(query)`. +5. Once complete get the feature's from the `FeatureQueryResult`. -

Relevant API

+## Relevant API - +* ArcGISMap +* FeatureLayer +* FeatureQueryResult +* MapView +* QueryParameters +* ServiceFeatureTable diff --git a/feature_layers/feature-layer-rendering-mode-map/README.md b/feature_layers/feature-layer-rendering-mode-map/README.md index 4d242d889d..c04346699d 100644 --- a/feature_layers/feature-layer-rendering-mode-map/README.md +++ b/feature_layers/feature-layer-rendering-mode-map/README.md @@ -1,43 +1,31 @@ -

Feature Layer Rendering Mode (Map)

+# Feature Layer Rendering Mode (Map) -

Render features statically or dynamically.

+Render features statically or dynamically. -

+![](FeatureLayerRenderingModeMap.gif) -

How it works

+## How it works -

To change FeatureLayer.RenderingMode using LoadSettings:

+To change `FeatureLayer.RenderingMode` using `LoadSettings`: -
    -
  1. Create a ArcGISMap.
  2. -
  3. Set preferred rendering mode to map, mapBottom.getLoadSettings().setPreferredPointFeatureRenderingMode(FeatureLayer.RenderingMode.DYNAMIC). -
      -
    • Can set preferred rendering mode for Points, Polylines, or Polygons.
    • -
    • Multipoint preferred rendering mode is the same as point.
    • -
    -
  4. -
  5. Set map to MapView, mapViewBottom.setMap(mapBottom).
  6. -
  7. Create a ServiceFeatureTable from a point service, new ServiceFeatureTable("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Energy/Geology/FeatureServer/0");.
  8. -
  9. Create FeatureLayer from table, new FeatureLayer(poinServiceFeatureTable).
  10. -
  11. Add layer to map, mapBottom.getOperationalLayers().add(pointFeatureLayer.copy()) -
      -
    • Now the point layer will be rendered dynamically to map view.
    • -
    -
  12. -
- -

Relevant API

- - +1. Create a `ArcGISMap`. +2. Set preferred rendering mode to map, `mapBottom.getLoadSettings().setPreferredPointFeatureRenderingMode(FeatureLayer.RenderingMode.DYNAMIC)`. + * Can set preferred rendering mode for `Points`, `Polylines`, or `Polygons`. + * `Multipoint` preferred rendering mode is the same as point. +3. Set map to `MapView`, `mapViewBottom.setMap(mapBottom)`. +4. Create a `ServiceFeatureTable` from a point service, `new ServiceFeatureTable("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Energy/Geology/FeatureServer/0");`. +5. Create `FeatureLayer` from table, `new FeatureLayer(poinServiceFeatureTable)`. +6. Add layer to map, `mapBottom.getOperationalLayers().add(pointFeatureLayer.copy())` + * Now the point layer will be rendered dynamically to map view. +## Relevant API +* ArcGISMap +* FeatureLayer +* FeatureLayer.RenderingMode +* LoadSettings +* Point +* Polyline +* Polygon +* ServiceFeatureTable +* Viewpoint diff --git a/feature_layers/feature-layer-selection/README.md b/feature_layers/feature-layer-selection/README.md index 77b8d0e43b..2e741d9afe 100644 --- a/feature_layers/feature-layer-selection/README.md +++ b/feature_layers/feature-layer-selection/README.md @@ -1,32 +1,26 @@ -

Feature Layer Selection

+# Feature Layer Selection -

Select clicked features.

+Select clicked features. -

+![](FeatureLayerSelection.png) -

How to use the sample

+## How to use the sample -

Click on a feature from the map to select it.

+Click on a feature from the map to select it. -

How it works

+## How it works -

To select Features from your FeatureLayer:

+To select `Feature`s from your `FeatureLayer`: -
    -
  1. Create a ServiceFeatureTable from a URL.
  2. -
  3. Create a feature layer from the service feature table.
  4. -
  5. Identify MapView on the location the user has clicked MapView.identifyLayerAsync - (featureLayer, clickLocation, tolerance, returnPopupsOnly, maxResults) -
  6. -
  7. Select all features that were identified with FeatureLayer.selectFeatures(features).
  8. -
+1. Create a `ServiceFeatureTable` from a URL. +2. Create a feature layer from the service feature table. +3. Identify `MapView` on the location the user has clicked `MapView.identifyLayerAsync(featureLayer, clickLocation, tolerance, returnPopupsOnly, maxResults)` +4. Select all features that were identified with `FeatureLayer.selectFeatures(features)`. -

Relevant API

+## Relevant API - +* ArcGISMap +* Feature +* FeatureLayer +* MapView +* ServiceFeatureTable diff --git a/feature_layers/feature-layer-shapefile/README.md b/feature_layers/feature-layer-shapefile/README.md index 1a1242a0bf..8ea19aa841 100644 --- a/feature_layers/feature-layer-shapefile/README.md +++ b/feature_layers/feature-layer-shapefile/README.md @@ -1,23 +1,18 @@ -

Feature Layer Shapefile

+# Feature Layer Shapefile -

Display features from a local shapefile.

- -

+Display features from a local shapefile. -

How it works

+![](FeatureLayerShapefile.png) -

To show a shapefile as a feature layer:

+## How it works -
    -
  1. Create a ShapefileFeatureTable passing in the URI of a shapefile.
  2. -
  3. Create a FeatureLayer using the ShapefileFeatureTable.
  4. -
  5. Add the layer to the map with map.getOperationalLayers().add(featureLayer).
  6. -
+To show a shapefile as a feature layer: -

Relevant API

+1. Create a `ShapefileFeatureTable` passing in the URI of a shapefile. +2. Create a `FeatureLayer` using the `ShapefileFeatureTable`. +3. Add the layer to the map with `map.getOperationalLayers().add(featureLayer)`. - +## Relevant API +* FeatureLayer +* ShapefileFeatureTable diff --git a/feature_layers/generate-geodatabase/README.md b/feature_layers/generate-geodatabase/README.md index 418bf231f4..0430cb3265 100644 --- a/feature_layers/generate-geodatabase/README.md +++ b/feature_layers/generate-geodatabase/README.md @@ -1,39 +1,29 @@ -

Generate Geodatabase

+# Generate Geodatabase -

Generate a local geodatabase from an online feature service.

+Generate a local geodatabase from an online feature service. -

+![](GenerateGeodatabase.png) -

How to use the sample

+## How to use the sample -

Zoom to any extent. Then click the generate button to generate a geodatabase of features from a feature service -filtered to the current extent. A graphic will display showing the extent used. The progress bar in the top right -will show the generate job's progress. Once the geodatabase has been generated, a dialog will display and the layers in -the geodatabase will be added to the map.

+Zoom to any extent. Then click the generate button to generate a geodatabase of features from a feature service filtered to the current extent. A graphic will display showing the extent used. The progress bar in the top right will show the generate job's progress. Once the geodatabase has been generated, a dialog will display and the layers in the geodatabase will be added to the map. -

How it works

+## How it works -

To generate a Geodatabase from a feature service:

+To generate a `Geodatabase` from a feature service: -
    -
  1. Create a GeodatabaseSyncTask with the URL of the feature service and load it.
  2. -
  3. Create GenerateGeodatabaseParameters specifying things like the extent and whether to include - attachments.
  4. -
  5. Create a GenerateGeodatabaseJob with GenerateGeodatabaseJob job = syncTask.generateGeodatabaseAsync(parameters, filePath). Start the job with job.start().
  6. -
  7. When the job is done, job.getResult() will return the geodatabase. Inside the geodatabase are - feature tables that can be used to add feature layers to the map.
  8. -
  9. Lastly, it is good practice to call syncTask.unregisterGeodatabaseAsync(geodatabase) when - you're not planning on syncing changes to the service.
  10. -
+1. Create a `GeodatabaseSyncTask` with the URL of the feature service and load it. +2. Create `GenerateGeodatabaseParameters` specifying things like the extent and whether to include attachments. +3. Create a `GenerateGeodatabaseJob` with `GenerateGeodatabaseJob job = syncTask.generateGeodatabaseAsync(parameters, filePath)`. Start the job with `job.start()`. +4. When the job is done, `job.getResult()` will return the geodatabase. Inside the geodatabase are feature tables that can be used to add feature layers to the map. +5. Lastly, it is good practice to call `syncTask.unregisterGeodatabaseAsync(geodatabase)` when you're not planning on syncing changes to the service. -

Relevant API

+## Relevant API - +* ArcGISMap +* FeatureLayer +* Geodatabase +* GenerateGeodatabaseJob +* GenerateGeodatabaseParameters +* MapView +* ServiceFeatureTable diff --git a/feature_layers/list-releated-features/README.md b/feature_layers/list-releated-features/README.md index 5fcef033af..51f3208ba9 100644 --- a/feature_layers/list-releated-features/README.md +++ b/feature_layers/list-releated-features/README.md @@ -1,44 +1,37 @@ -

List Related Features

- -

Find features related to the selected feature.

- -

- -

How to use the sample

- -

After the layer is loaded, click on a feature to select it. An accordion view will display related features -grouped by feature table.

- -

How it works

- -

To query related Features:

- -
    -
  1. Get a Feature from a loaded FeatureLayer.
  2. -
  3. Get the feature's FeatureTable and call featureTable.queryRelatedFeaturesAsync(feature).
  4. -
  5. You will get a list of RelatedFeatureQueryResults. -
      -
    • You can get the name of the table containing the related features with relatedFeatureQueryResult - .getRelatedTable().getTableName().
    • -
    -
  6. -
  7. The RelatedFeatureQueryResult implements Iterable<Feature>. You can iterate over - the result to get the features: -
    for (Feature feature: relatedFeatureQueryResult) {
    -  //do something with the related feature...
    -  }
    -
- -

Relevant API

- - +# List Related Features + +Find features related to the selected feature. + +![](ListRelatedFeatures.png) + +## How to use the sample + +After the layer is loaded, click on a feature to select it. An accordion view will display related features +grouped by feature table. + +## How it works + +To query related `Feature`s: + +1. Get a `Feature` from a loaded `FeatureLayer`. +2. Get the feature's `FeatureTable` and call `featureTable.queryRelatedFeaturesAsync(feature)`. +3. You will get a list of `RelatedFeatureQueryResult`s. + * You can get the name of the table containing the related features with `relatedFeatureQueryResult.getRelatedTable().getTableName()`. +4. The `RelatedFeatureQueryResult` implements `Iterable`. You can iterate over the result to get the features: + ```java + for (Feature feature: relatedFeatureQueryResult) { + //do something with the related feature... + } + ``` + +## Relevant API + +* ArcGISFeature +* ArcGISFeatureTable +* ArcGISMap +* Feature +* FeatureLayer +* FeatureQueryResult +* FeatureTable +* MapView +* RelatedFeatureQueryResult diff --git a/feature_layers/service-feature-table-cache/README.md b/feature_layers/service-feature-table-cache/README.md index f50c82955c..bf8a81f516 100644 --- a/feature_layers/service-feature-table-cache/README.md +++ b/feature_layers/service-feature-table-cache/README.md @@ -1,28 +1,22 @@ -

Service Feature Table (Cache)

+# Service Feature Table (Cache) -

Cache features on the client when the user interacts.

+Cache features on the client when the user interacts. -

On-interaction-cache mode will fetch features within the current extent when needed (performing a pan or zoom) from -the server and caches those features within a table on the client's side. Any queries performed on features within -that table will be performed locally, otherwise they will be requested from the server.

+On-interaction-cache mode will fetch features within the current extent when needed (performing a pan or zoom) from the server and caches those features within a table on the client's side. Any queries performed on features within that table will be performed locally, otherwise they will be requested from the server. -

+![](ServiceFeatureTableCache.png) -

How it works

+## How it works -

How to set FeatureRequestMode.ON_INTERACTION_CACHE mode:

+How to set `FeatureRequestMode.ON_INTERACTION_CACHE` mode: -
    -
  1. Create a ServiceFeatureTable from a URL.
  2. -
  3. Set request mode of table, ServiceFeatureTable.setFeatureRequestMode(FeatureRequestMode.ON_INTERACTION_CACHE).
  4. -
+1. Create a `ServiceFeatureTable` from a URL. +2. Set request mode of table, `ServiceFeatureTable.setFeatureRequestMode(FeatureRequestMode.ON_INTERACTION_CACHE)`. -

Relevant API

+## Relevant API -
    -
  • ArcGISMap
  • -
  • FeatureLayer
  • -
  • MapView
  • -
  • ServiceFeatureTable
  • -
  • ServiceFeatureTable.FeatureRequestMode
  • -
+* ArcGISMap +* FeatureLayer +* MapView +* ServiceFeatureTable +* ServiceFeatureTable.FeatureRequestMode diff --git a/feature_layers/service-feature-table-manual-cache/README.md b/feature_layers/service-feature-table-manual-cache/README.md index 552c7d1fff..aa9756ac0b 100644 --- a/feature_layers/service-feature-table-manual-cache/README.md +++ b/feature_layers/service-feature-table-manual-cache/README.md @@ -1,30 +1,26 @@ -

Service Feature Table (Manual Cache)

+# Service Feature Table (Manual Cache) -

Request features on demand.

+Request features on demand. -

+![](ServiceFeatureTableManualCache.png) -

How to use the sample

+## How to use the sample -

Click on the Request Cache button to manually request Features. Returned label displays how many features were returned by the service.

+Click on the Request Cache button to manually request Features. Returned label displays how many features were returned by the service. -

Note: Maximum of Features returned is set to 1000.

+Note: Maximum of Features returned is set to 1000. -

How it works

+## How it works -

How to set FeatureRequestMode.MANUAL_CACHE mode:

+How to set `FeatureRequestMode.MANUAL_CACHE` mode: -
    -
  1. Create a ServiceFeatureTable from a URL.
  2. -
  3. Set request mode of table, ServiceFeatureTable.setFeatureRequestMode(FeatureRequestMode.MANUAL_CACHE).
  4. -
+1. Create a `ServiceFeatureTable` from a URL. +2. Set request mode of table, `ServiceFeatureTable.setFeatureRequestMode(FeatureRequestMode.MANUAL_CACHE)`. -

Relevant API

+## Relevant API -
    -
  • ArcGISMap
  • -
  • FeatureLayer
  • -
  • MapView
  • -
  • ServiceFeatureTable
  • -
  • ServiceFeatureTable.FeatureRequestMode
  • -
+* ArcGISMap +* FeatureLayer +* MapView +* ServiceFeatureTable +* ServiceFeatureTable.FeatureRequestMode diff --git a/feature_layers/service-feature-table-no-cache/README.md b/feature_layers/service-feature-table-no-cache/README.md index 8d86120fe0..0564c41d9a 100644 --- a/feature_layers/service-feature-table-no-cache/README.md +++ b/feature_layers/service-feature-table-no-cache/README.md @@ -1,27 +1,22 @@ -

Service Feature Table (No Cache)

+# Service Feature Table (No Cache) -

Show features without caching.

+Show features without caching. -

On-interaction-no-cache mode will always fetch Features from the server and doesn't cache any Features on the client's side. This meaning that Features will be fetched whenever the ArcGISMap pans, zooms, selects, or queries.

+On-interaction-no-cache mode will always fetch Features from the server and doesn't cache any Features on the client's side. This meaning that Features will be fetched whenever the ArcGISMap pans, zooms, selects, or queries. -

+![](ServiceFeatureTableNoCache.png) -

How it works

+## How it works -

How to set FeatureRequestMode.ON_INTERACTION_NO_CAHCE mode:

+How to set `FeatureRequestMode.ON_INTERACTION_NO_CAHCE` mode: -
    -
  1. Create a ServiceFeatureTable from a URL.
  2. -
  3. Set request mode of table, ServiceFeatureTable.setFeatureRequestMode(FeatureRequestMode.ON_INTERACTION_NO_CAHCE).
  4. -
+1. Create a `ServiceFeatureTable` from a URL. +2. Set request mode of table, `ServiceFeatureTable.setFeatureRequestMode(FeatureRequestMode.ON_INTERACTION_NO_CAHCE)`. -

Relevant API

- -
    -
  • ArcGISMap
  • -
  • FeatureLayer
  • -
  • MapView
  • -
  • ServiceFeatureTable
  • -
  • ServiceFeatureTable.FeatureRequestMode
  • -
+## Relevant API +* ArcGISMap +* FeatureLayer +* MapView +* ServiceFeatureTable +* ServiceFeatureTable.FeatureRequestMode diff --git a/feature_layers/statistical-query-group-and-sort/README.md b/feature_layers/statistical-query-group-and-sort/README.md index b8da376cbb..41207c5bf0 100644 --- a/feature_layers/statistical-query-group-and-sort/README.md +++ b/feature_layers/statistical-query-group-and-sort/README.md @@ -1,52 +1,39 @@ -

Statistical Query Group And Sort

- -

Group and sort feature statistics by different fields.

- -

- -

How to use the sample

- -

The sample will start with some default options selected. You can immediately click the "Get Statistics" button to - see the results for these options.

- -

To change the statistic definitions, you can add statistic definitions to the top-left table using the combo boxes -and "Add button". Select a table row and click "Remove" to remove the statistic definition.

- -

To change the group-by fields, check the box by the field you want to group by in the bottom-left list view.

- -

To change the order-by fields, select a group by field (it must be checked) and click the ">>" button to add it to - the Order By table. To remove a field from the Order by table, select it and click the "<<" button. To change the - sort order of the order-by field, click on a cell in the Sort Order column to edit it using a ComboBox.

- -

How it works

- -

To query statistics from a feature table:

- -
    -
  1. Create and load a ServiceFeatureTable.
  2. -
  3. Get the feature tables field names list with featureTable.getFields().
  4. -
  5. Create StatisticDefinitions specifying the field to compute statistics on and the - StatisticType to compute.
  6. -
  7. Create StatisticsQueryParameters passing in the list of statistic definitions.
  8. -
  9. To have the results grouped by fields, add the field names to the query parameters' - groupByFieldNames collection.
  10. -
  11. To have the results ordered by fields, create OrderBys, specifying the field name and - SortOrder. Pass these OrderBys to the parameters' orderByFields - collection.
  12. -
  13. To execute the query, call featureTable.queryStatisticsAsync(queryParameters)
  14. -
  15. Get the StatisticQueryResult. From this, you can get an iterator of - StatisticRecords to loop through and display.
  16. -
- -

Relevant API

- -
    -
  • Field
  • -
  • QueryParameters
  • -
  • ServiceFeatureTable
  • -
  • StatisticDefinition
  • -
  • StatisticRecord
  • -
  • StatisticType
  • -
  • StatisticsQueryParameters
  • -
  • StatisticsQueryResult
  • -
+# Statistical Query Group And Sort + +Group and sort feature statistics by different fields. + +![](StatisticalQueryGroupAndSort.png) + +## How to use the sample + +The sample will start with some default options selected. You can immediately click the "Get Statistics" button to see the results for these options. + +To change the statistic definitions, you can add statistic definitions to the top-left table using the combo boxes and "Add button". Select a table row and click "Remove" to remove the statistic definition. + +To change the group-by fields, check the box by the field you want to group by in the bottom-left list view. + +To change the order-by fields, select a group by field (it must be checked) and click the ">>" button to add it to the Order By table. To remove a field from the Order by table, select it and click the "<<" button. To change the sort order of the order-by field, click on a cell in the Sort Order column to edit it using a ComboBox. + +## How it works + +To query statistics from a feature table: + +1. Create and load a `ServiceFeatureTable`. +2. Get the feature tables field names list with `featureTable.getFields()`. +3. Create `StatisticDefinition`s specifying the field to compute statistics on and the `StatisticType` to compute. +4. Create `StatisticsQueryParameters` passing in the list of statistic definitions. +5. To have the results grouped by fields, add the field names to the query parameters' `groupByFieldNames` collection. +6. To have the results ordered by fields, create `OrderBy`s, specifying the field name and `SortOrder`. Pass these `OrderBy`s to the parameters' `orderByFields` collection. +7. To execute the query, call `featureTable.queryStatisticsAsync(queryParameters)` +8. Get the `StatisticQueryResult`. From this, you can get an iterator of `StatisticRecord`s to loop through and display. + + ## Relevant API + +* Field +* QueryParameters +* ServiceFeatureTable +* StatisticDefinition +* StatisticRecord +* StatisticType +* StatisticsQueryParameters +* StatisticsQueryResult diff --git a/feature_layers/statistical-query/README.md b/feature_layers/statistical-query/README.md index 6aeb57dc46..27edb9c39c 100644 --- a/feature_layers/statistical-query/README.md +++ b/feature_layers/statistical-query/README.md @@ -1,41 +1,33 @@ -

Statistical Query

- -

Get aggregated feature statistics for a specified field.

- -

- -

How to use the sample

- -

Check the boxes for the filters you want to use in the query (a spatial filter and an attribute filter). Click -the "Get Statistics" button to execute the query. A dialog will open with the statistics result.

- -

How it works

- -

To query statistics on a FeatureTable field:

- -
    -
  1. Create a ServiceFeatureTable from a URL.
  2. -
  3. Create a list of StatisticDefinitions specifying which field to query against, the aggregate - type, and an optional alias.
  4. -
  5. Create StatisticsQueryParameters passing in the definitions. You can also use the setters to - specify an area for the query (geometry) or a custom where clause.
  6. -
  7. Call featureTable.queryStatisticsAsync(queryParameters) to make the query.
  8. -
  9. Get the StatisticsQueryResult from the ListenableFuture. To see the stastics, - iterate through statisticsQueryResult.iterator() to get the StatisticRecords.
  10. -
  11. The map of statistics can be retreived with record.getStatistics() for printing or showing in - a list view.
  12. -
- -

Relevant API

- -
    -
  • ArcGISMap
  • -
  • FeatureLayer
  • -
  • QueryParameters
  • -
  • ServiceFeatureTable
  • -
  • StatisticDefinition
  • -
  • StatisticRecord
  • -
  • StatisticType
  • -
  • StatisticsQueryParameters
  • -
  • StatisticsQueryResult
  • -
+# Statistical Query + +Get aggregated feature statistics for a specified field. + +![](StatisticalQuery.png) + +## How to use the sample + +Check the boxes for the filters you want to use in the query (a spatial filter and an attribute filter). Click +the "Get Statistics" button to execute the query. A dialog will open with the statistics result. + +## How it works + +To query statistics on a `FeatureTable` field: + +1. Create a `ServiceFeatureTable` from a URL. +2. Create a list of `StatisticDefinition`s specifying which field to query against, the aggregate type, and an optional alias. +3. Create `StatisticsQueryParameters` passing in the definitions. You can also use the setters to specify an area for the query (geometry) or a custom where clause. +4. Call `featureTable.queryStatisticsAsync(queryParameters)` to make the query. +5. Get the `StatisticsQueryResult` from the `ListenableFuture`. To see the stastics, iterate through `statisticsQueryResult.iterator()` to get the `StatisticRecord`s. +6. The map of statistics can be retreived with `record.getStatistics()` for printing or showing in a list view. + +## Relevant API + +* ArcGISMap +* FeatureLayer +* QueryParameters +* ServiceFeatureTable +* StatisticDefinition +* StatisticRecord +* StatisticType +* StatisticsQueryParameters +* StatisticsQueryResult diff --git a/feature_layers/time-based-query/README.md b/feature_layers/time-based-query/README.md index 6a4b12cdeb..9ead3095d8 100644 --- a/feature_layers/time-based-query/README.md +++ b/feature_layers/time-based-query/README.md @@ -1,40 +1,29 @@ -

Time Based Query

+# Time Based Query -

Filter features within a time range.

+Filter features within a time range. -

+![](TimeBasedQuery.png) -

How it works

+## How it works -

To query features by a time extent:

+To query features by a time extent: -
    -
  1. Create a ServiceFeatureTable from the URL of a feature service.
  2. -
  3. Set the feature table's feature request mode to manual with featureTable.setFeatureRequestMode(MANUAL_CACHE).
  4. -
  5. After loading the service feature table, create QueryParameters.
  6. -
  7. Create two Calendar objects with the beginning and ending timestamps and create a - TimeExtent with them.
  8. -
  9. Set the time extent with queryParameters.setTimeExtent(timeExtent)
  10. -
  11. Populate the table with features in the time extent with featureTable.popuateFromServiceAsync(queryParameters, true, outputFields). -
      -
    • The second argument is whether to clear the cache of features or not.
    • -
    • The output fields is a list of fields of the features to return. Use a list of one string - "*" to get all of the fields.
    • -
    -
  12. -
  13. Finally, create a feature layer from the feature table with new FeatureLayer(featureTable), - and add it to the map with map.getOperationalLayers().add(featureLayer) to see the features in the - time extent.
  14. -
+1. Create a `ServiceFeatureTable` from the URL of a feature service. +2. Set the feature table's feature request mode to manual with `featureTable.setFeatureRequestMode(MANUAL_CACHE)`. +3. After loading the service feature table, create `QueryParameters`. +4. Create two `Calendar` objects with the beginning and ending timestamps and create a `TimeExtent` with them. +5. Set the time extent with `queryParameters.setTimeExtent(timeExtent)` +6. Populate the table with features in the time extent with `featureTable.popuateFromServiceAsync(queryParameters, true, outputFields)`. + * The second argument is whether to clear the cache of features or not. + * The output fields is a list of fields of the features to return. Use a list of one string `"*"` to get all of the fields. +7. Finally, create a feature layer from the feature table with `new FeatureLayer(featureTable)`, and add it to the map with `map.getOperationalLayers().add(featureLayer)` to see the features in the time extent. -

Relevant API

+## Relevant API -
    -
  • ArcGISMap
  • -
  • Basemap
  • -
  • FeatureLayer
  • -
  • MapView
  • -
  • QueryParameters
  • -
  • ServiceFeatureTable
  • -
  • TimeExtent
  • -
\ No newline at end of file +* ArcGISMap +* Basemap +* FeatureLayer +* MapView +* QueryParameters +* ServiceFeatureTable +* TimeExtent diff --git a/geometry/buffer-list/README.md b/geometry/buffer-list/README.md index 3abdda01b0..f99001e244 100644 --- a/geometry/buffer-list/README.md +++ b/geometry/buffer-list/README.md @@ -1,32 +1,28 @@ -

Buffer list

+# Buffer list -

Combine buffers from multiple points individual buffer distances.

+Combine buffers from multiple points individual buffer distances. -

+![](BufferList.png) -

How to use the sample

+## How to use the sample -

Tap the map to add points. Each point will use the buffer distance entered when it was created. Check the check box if you want the result to union the buffers. Click the "Create Buffer(s)" button to draw the buffer(s). Click the "Clear" button to start over. The envelope shows the area where you can expect reasonable results for planar buffer operations with the North Central Texas State Plane spatial reference.

+Tap the map to add points. Each point will use the buffer distance entered when it was created. Check the check box if you want the result to union the buffers. Click the "Create Buffer(s)" button to draw the buffer(s). Click the "Clear" button to start over. The envelope shows the area where you can expect reasonable results for planar buffer operations with the North Central Texas State Plane spatial reference. -

How it works

+## How it works -

To union multiple buffers:

+To union multiple buffers: -
    -
  1. Call GeometryEngine.buffer(points, distances, union) where points are the points to buffer around, distances are the buffer distances for each point (in meters) and union is a boolean for whether the results should be unioned.
  2. -
  3. Use the result polygons (if not unioned) or single polygon (if unioned). -
+1. Call `GeometryEngine.buffer(points, distances, union)` where `points` are the points to buffer around, `distances` are the buffer distances for each point (in meters) and `union` is a boolean for whether the results should be unioned. +2. Use the result polygons (if not unioned) or single polygon (if unioned). -

Relevant API

+## Relevant API -
    -
  • GeometryEngine
  • -
+* GeometryEngine -

Additional Information

+## Additional Information -

The properties of the underlying projection determine the accuracy of buffer polygons in a given area. Planar buffers are generally more accurate if made over small areas in a suitable spatial reference, such as the correct UTM zone or state plane system for the area of interest. Note that inaccurate buffers could still be created by buffering points inside the spatial reference's envelope with distances that move it outside the envelope.

+The properties of the underlying projection determine the accuracy of buffer polygons in a given area. Planar buffers are generally more accurate if made over small areas in a suitable spatial reference, such as the correct UTM zone or state plane system for the area of interest. Note that inaccurate buffers could still be created by buffering points inside the spatial reference's envelope with distances that move it outside the envelope.

-

Tags

+## Tags -

Analysis, Buffer, GeometryEngine

\ No newline at end of file +Analysis, Buffer, GeometryEngine diff --git a/geometry/buffer/README.md b/geometry/buffer/README.md index 40bacc6e65..3fceee5b9e 100644 --- a/geometry/buffer/README.md +++ b/geometry/buffer/README.md @@ -1,30 +1,29 @@ -

Buffer

+# Buffer -

Create geodesic and planar buffers around a point.

+Create geodesic and planar buffers around a point. -

Buffers can be used to visually show the area within a certain distance of a geometry. For example, the Chernobyl exclusion zone is set up as a buffer around the failed nuclear power plant, indicating where there are unsafe levels of radioactive fallout.

+Buffers can be used to visually show the area within a certain distance of a geometry. For example, the Chernobyl exclusion zone is set up as a buffer around the failed nuclear power plant, indicating where there are unsafe levels of radioactive fallout. -

+![](Buffer.png) -

How to use the sample

-

Tap on the map to create planar (green) and geodesic (purple) buffers around the tapped location. Enter a value in the spinner between 500 and 2000 (in miles) to set the -buffer distance (this range is appropriate to show the difference between geodesic and planar buffers).

+## How to use the sample -

How it works

-

To create a buffer around a point:

-
    -
  1. Call GeometryEngine.buffer passing in a Point and a distance - in meters. This returns a Polygon which can be displayed using a Graphic.
  2. -
  3. For the geodesic buffer, call GeometryEngine.bufferGeodetic passing in the point, distance, linear unit, max deviation, and GeodeticCurveType.GEODESIC.
  4. -
+Tap on the map to create planar (green) and geodesic (purple) buffers around the tapped location. Enter a value in the spinner between 500 and 2000 (in miles) to set the buffer distance (this range is appropriate to show the difference between geodesic and planar buffers). -

Relevant API

-
    -
  • GeometryEngine
  • -
  • GraphicsOverlay
  • -
  • Point
  • -
  • Polygon
  • -
+## How it works -

Additional Information

-

It is important to consider the spatial reference of the map you are working with when showing a buffer. A planar buffer with a constant radius is actually closer to an ellipse toward the poles in Web Mercator. In this case, you may want to use a geodesic buffer which takes the Earth's curvature into account.

+To create a buffer around a point: + +1. Call `GeometryEngine.buffer` passing in a `Point` and a distance in meters. This returns a `Polygon` which can be displayed using a `Graphic`. +2. For the geodesic buffer, call `GeometryEngine.bufferGeodetic` passing in the point, distance, linear unit, max deviation, and `GeodeticCurveType.GEODESIC`. + +## Relevant API + +* GeometryEngine +* GraphicsOverlay +* Point +* Polygon + +## Additional Information + +It is important to consider the spatial reference of the map you are working with when showing a buffer. A planar buffer with a constant radius is actually closer to an ellipse toward the poles in Web Mercator. In this case, you may want to use a geodesic buffer which takes the Earth's curvature into account. diff --git a/geometry/clip-geometry/README.md b/geometry/clip-geometry/README.md index 1c7ff364d4..d8fc565436 100644 --- a/geometry/clip-geometry/README.md +++ b/geometry/clip-geometry/README.md @@ -1,39 +1,35 @@ -

Clip Geometry

+# Clip Geometry -

Clip a geometry to an envelope.

+Clip a geometry to an envelope. -

+![](ClipGeometry.gif) -

How to use the sample

+## How to use the sample -

Click the "Clip" button to clip the blue graphic with the red envelopes.

+Click the "Clip" button to clip the blue graphic with the red envelopes. -

How it works

+## How it works -

To clip a Geometry with an Envelope:

+To clip a `Geometry` with an `Envelope`: -
    -
  1. Use the static method GeometryEngine.clip(geometry, envelope).
  2. -
  3. Keep in mind that the resulting Geometry may be null if the envelope does not intersect the - geometry you are clipping
  4. . -
+1. Use the static method `GeometryEngine.clip(geometry, envelope)`. +2. Keep in mind that the resulting `Geometry` may be null if the envelope does not intersect the + geometry you are clipping.` -

Relevant API

+## Relevant API -
    -
  • ArcGISMap
  • -
  • Basemap
  • -
  • Envelope
  • -
  • Geometry
  • -
  • GeometryEngine
  • -
  • Graphic
  • -
  • GraphicsOverlay
  • -
  • MapView
  • -
  • Point
  • -
  • PointCollection
  • -
  • Polygon
  • -
  • Polyline
  • -
  • SimpleFillSymbol
  • -
  • SimpleLineSymbol
  • -
  • SpatialReferences
  • -
+* ArcGISMap +* Basemap +* Envelope +* Geometry +* GeometryEngine +* Graphic +* GraphicsOverlay +* MapView +* Point +* PointCollection +* Polygon +* Polyline +* SimpleFillSymbol +* SimpleLineSymbol +* SpatialReferences diff --git a/geometry/convex-hull-list/README.md b/geometry/convex-hull-list/README.md index 3527e1687f..b6e68db070 100644 --- a/geometry/convex-hull-list/README.md +++ b/geometry/convex-hull-list/README.md @@ -1,37 +1,27 @@ -

Convex Hull List

+# Convex Hull List -

Generate convex hull polygon(s) from multiple input geometries.

+Generate convex hull polygon(s) from multiple input geometries. -

The convex hull generates a minimum bounding geometry of input graphics. As a visual analogy, consider a set of points as nails in a board. The convex hull of the points would be like a rubber band stretched around the outermost nails.

+The convex hull generates a minimum bounding geometry of input graphics. As a visual analogy, consider a set of points as nails in a board. The convex hull of the points would be like a rubber band stretched around the outermost nails. -

+![](ConvexHullList.png) -

How to use the sample

+## How to use the sample -

Click the 'Create Convex Hull' button to create convex hull(s) from the polygon graphics. If the 'Union' checkbox is checked, the resulting output will be one polygon being the convex hull for the two input polygons. If the 'Union' checkbox is un-checked, the resulting output will have two convex hull polygons - one for each of the two input polygons. Click the 'Clear' button to start over.

+Click the 'Create Convex Hull' button to create convex hull(s) from the polygon graphics. If the 'Union' checkbox is checked, the resulting output will be one polygon being the convex hull for the two input polygons. If the 'Union' checkbox is un-checked, the resulting output will have two convex hull polygons - one for each of the two input polygons. Click the 'Clear' button to start over. -

How it works

+## How it works -
    -
  1. Create an ArcGISMap and display it in a MapView.
  2. +1. Create an `ArcGISMap` and display it in a `MapView`. +2. Create two input polygon graphics and add them to a `GraphicsOverlay`. +3. Call `GeometryEngine.convexHull(inputGeometries, boolean)`, loop through the returned geometry (or geometries) and add them to a new `GraphicsOverlay`, set above the one containing the two input polygons. -
  3. Create two input polygon graphics and add them to a GraphicsOverlay.
  4. +## Relevant API -
  5. Call GeometryEngine.convexHull(inputGeometries, boolean), loop through the returned geometry (or geometries) and add them to a new GraphicsOverlay, set above the one containing the two input polygons.
  6. -
+* GeometryEngine.ConvexHull +* GraphicsOverlay +* PointCollection -

Relevant API

- -
    -
  • GeometryEngine.ConvexHull
  • - -
  • GraphicsOverlay
  • - -
  • PointCollection
  • - -
- -

Tags

- -

Analysis, ConvexHull, GeometryEngine

+## Tags +Analysis, ConvexHull, GeometryEngine diff --git a/geometry/convex-hull/README.md b/geometry/convex-hull/README.md index f5eb52e1d8..15b8be586e 100644 --- a/geometry/convex-hull/README.md +++ b/geometry/convex-hull/README.md @@ -1,26 +1,22 @@ -

Convex Hull

+# Convex Hull -

Calculate the convex hull for a set of points.

+Calculate the convex hull for a set of points. -

The convex hull is the polygon with shortest perimeter that encloses a set of points. As a visual analogy, consider a set of points as nails in a board. The convex hull of the points would be like a rubber band stretched around the outermost nails.

+The convex hull is the polygon with shortest perimeter that encloses a set of points. As a visual analogy, consider a set of points as nails in a board. The convex hull of the points would be like a rubber band stretched around the outermost nails. -

A convex hull can be useful in collision detection. When checking if two complex geometries touch and their convex hulls have been precomputed, it is efficient to first check if their convex hulls intersect before computing their proximity point-by-point.

+A convex hull can be useful in collision detection. When checking if two complex geometries touch and their convex hulls have been precomputed, it is efficient to first check if their convex hulls intersect before computing their proximity point-by-point. -

+![](ConvexHull.png) -

How to use the sample

+## How to use the sample -

Tap on the map to add points. Click the "Create Convex Hull" button to show the convex hull. Click the "Reset" button to start over.

+Tap on the map to add points. Click the "Create Convex Hull" button to show the convex hull. Click the "Reset" button to start over. -

How it works

+## How it works -
    -
  1. Create an input geometry such as a Multipoint.
  2. -
  3. Call GeometryEngine.convexHull(inputGeometry). The returned Geometry will either be a Point, Polyline, or Polygon based on the number of input points.
  4. -
+1. Create an input geometry such as a `Multipoint`. +2. Call `GeometryEngine.convexHull(inputGeometry)`. The returned `Geometry` will either be a `Point`, `Polyline`, or `Polygon` based on the number of input points. -

Relevant API

+## Relevant API -
    -
  • GeometryEngine
  • -
\ No newline at end of file +* GeometryEngine diff --git a/geometry/create-geometries/README.md b/geometry/create-geometries/README.md index a86f5df2b1..de58dda52b 100644 --- a/geometry/create-geometries/README.md +++ b/geometry/create-geometries/README.md @@ -1,28 +1,22 @@ -

Create Geometries

+# Create Geometries -

Create simple geometry types.

+Create simple geometry types. -

+![](CreateGeometries.png) -

How it works

-

To create different geometries and show them as graphics:

-
    -
  1. Use the constructors for the various simple Geometry types including Point, - Polyline, Multipoint, Polygon, and Envelope. Geometries made - of multiple points usually take a PointCollection as an argument.
  2. -
  3. To display the geometry, create a Graphic passing in the geometry, and a Symbol - appropriate for the geometry type.
  4. -
  5. Add the Graphic to a GraphicsOverlay and add the overlay to the - MapView.
  6. -
+## How it works +To create different geometries and show them as graphics: -

Relevant API

-
    -
  • Envelope
  • -
  • Graphic
  • -
  • Multipoint
  • -
  • Point
  • -
  • PointCollection
  • -
  • Polygon
  • -
  • Polyline
  • -
\ No newline at end of file +1. Use the constructors for the various simple `Geometry` types including `Point`, `Polyline`, `Multipoint`, `Polygon`, and `Envelope`. Geometries made of multiple points usually take a `PointCollection` as an argument. +2. To display the geometry, create a `Graphic` passing in the geometry, and a `Symbol` appropriate for the geometry type. +3. Add the `Graphic` to a `GraphicsOverlay` and add the overlay to the `MapView`. + +## Relevant API + +* Envelope +* Graphic +* Multipoint +* Point +* PointCollection +* Polygon +* Polyline diff --git a/geometry/cut-geometry/README.md b/geometry/cut-geometry/README.md index ac88e99a58..5faf064591 100644 --- a/geometry/cut-geometry/README.md +++ b/geometry/cut-geometry/README.md @@ -1,38 +1,33 @@ -

Cut Geometry

+# Cut Geometry -

Cut a geometry along a polyline.

+Cut a geometry along a polyline. -

+![](CutGeometry.png) -

How to use the sample

+## How to use the sample -

Click the "Cut" button to cut the polygon with the polyline and see the resulting parts.

+Click the "Cut" button to cut the polygon with the polyline and see the resulting parts. -

How it works

+## How it works -

To cut a geometry with a polyline:

+To cut a geometry with a polyline: -
    -
  1. Use the static method GeometryEngine.cut(geometry, polyline).
  2. -
  3. Loop through the List<Geometry> of cut pieces. Keep in mind that some of these geometries may - be multi-part. -
+1. Use the static method `GeometryEngine.cut(geometry, polyline)`. +2. Loop through the `List<Geometry>` of cut pieces. Keep in mind that some of these geometries may be multi-part.` -

Relevant API

+## Relevant API -
    -
  • ArcGISMap
  • -
  • Basemap
  • -
  • Geometry
  • -
  • GeometryEngine
  • -
  • Graphic
  • -
  • GraphicsOverlay
  • -
  • MapView
  • -
  • Point
  • -
  • PointCollection
  • -
  • Polygon
  • -
  • Polyline
  • -
  • SimpleFillSymbol
  • -
  • SimpleLineSymbol
  • -
  • SpatialReferences
  • -
+* ArcGISMap +* Basemap +* Geometry +* GeometryEngine +* Graphic +* GraphicsOverlay +* MapView +* Point +* PointCollection +* Polygon +* Polyline +* SimpleFillSymbol +* SimpleLineSymbol +* SpatialReferences diff --git a/geometry/densify-and-generalize/README.md b/geometry/densify-and-generalize/README.md index c245f1d6b7..d95343ed23 100644 --- a/geometry/densify-and-generalize/README.md +++ b/geometry/densify-and-generalize/README.md @@ -1,51 +1,35 @@ -

Densify and Generalize

- -

Modify a polyline while preserving its general shape.

- -

In this example, points representing a ships -location are shown at irregular intervals. One can densify the polyline connecting these lines to interpolate points -along the line at regular intervals. Generalizing the polyline can also simplify the geometry while preserving its -general shape.

- -

- -

How to use the sample

- -

Use the sliders to control the parameters of the densify and generalize methods. You can deselect the checkboxes -for either method to remove its effect from the result polyline. You can also hide the result to only see the -original by deselecting the "Show result" checkbox.

- -

How it works

- -

To densify and generalize a polyline:

- -
    -
  1. Use the static method GeometryEngine.densify(polyline, maxSegmentLength) to densify the polyline - . The resulting polyline will add points along the line so that there are no points greater than maxSegmentLength from the next point.
  2. -
  3. Use the static method GeometryEngine.generalize(polyline, maxDeviation, true) to generalize the - polyline. The resulting polyline will have points or shifted from the line to simplify the shape. None of these points can - deviate farther from the original line than maxDeviation. The last parameter, - removeDegenerateParts , will clean up extraneous parts if the geometry is multi-part (it will have - no effect in this sample.
  4. -
  5. Note that maxSegmentLength and maxDeviation are in the units of geometry's - coordinate system. This could be in degrees in some coordinate systems. In this example, a cartesian coordinate - system is used and at a small enough scale that geodesic distances are not required.
  6. -
- -

Relevant API

- -
    -
  • ArcGISMap
  • -
  • Basemap
  • -
  • GeometryEngine
  • -
  • Graphic
  • -
  • GraphicsOverlay
  • -
  • MapView
  • -
  • Multipoint
  • -
  • Point
  • -
  • PointCollection
  • -
  • Polyline
  • -
  • SimpleLineSymbol
  • -
  • SimpleMarkerSymbol
  • -
  • SpatialReference
  • -
+# Densify and Generalize + +Modify a polyline while preserving its general shape. + +In this example, points representing a ships location are shown at irregular intervals. One can densify the polyline connecting these lines to interpolate points along the line at regular intervals. Generalizing the polyline can also simplify the geometry while preserving its general shape. + +![](DensifyAndGeneralize.gif) + +## How to use the sample + +Use the sliders to control the parameters of the densify and generalize methods. You can deselect the checkboxes for either method to remove its effect from the result polyline. You can also hide the result to only see the original by deselecting the "Show result" checkbox. + +## How it works + +To densify and generalize a polyline: + +1. Use the static method `GeometryEngine.densify(polyline, maxSegmentLength)` to densify the polyline. The resulting polyline will add points along the line so that there are no points greater than `maxSegmentLength` from the next point. +2. Use the static method `GeometryEngine.generalize(polyline, maxDeviation, true)` to generalize the polyline. The resulting polyline will have points or shifted from the line to simplify the shape. None of these points can deviate farther from the original line than `maxDeviation`. The last parameter, `removeDegenerateParts` , will clean up extraneous parts if the geometry is multi-part (it will have no effect in this sample. +3. Note that `maxSegmentLength` and `maxDeviation` are in the units of geometry's coordinate system. This could be in degrees in some coordinate systems. In this example, a cartesian coordinate system is used and at a small enough scale that geodesic distances are not required. + +## Relevant API + +* ArcGISMap +* Basemap +* GeometryEngine +* Graphic +* GraphicsOverlay +* MapView +* Multipoint +* Point +* PointCollection +* Polyline +* SimpleLineSymbol +* SimpleMarkerSymbol +* SpatialReference diff --git a/geometry/geodesic-operations/README.md b/geometry/geodesic-operations/README.md index fbc9e2956b..9b6005b900 100644 --- a/geometry/geodesic-operations/README.md +++ b/geometry/geodesic-operations/README.md @@ -1,41 +1,35 @@ -

Geodesic Operations

- -

Calculate the geodesic path and distance between two points.

- -

- -

How to use the sample

- -

Click on the map to select a path destination. The geodesic path between the two points will update.

- -

How it works

- -

To create a geodesic path between two points:

- -
    -
  1. Create a Polyline using two points.
  2. -
  3. Pass this polyline to: GeometryEngine.densifyGeodetic(polyline, segmentLength, unitOfMeasurement, GeodeticCurveType - .GEODESIC). This will create a new polyline with segments of length segmentLength and - LinearUnit set to unitOfMeasurement. The curve will be geodesic.
  4. -
  5. You can set this geometry to a Graphic to display the curve in a GraphicsOverlay.
  6. -
  7. To get the distance, use GeometryEngine.lengthGeodetic(pathGeometry, unitOfMeasurement, GeodeticCurveType.GEODESIC)
  8. -
- -

Relevant API

- -
    -
  • ArcGISMap
  • -
  • GeodeticCurveType
  • -
  • Geometry
  • -
  • GeometryEngine
  • -
  • Graphic
  • -
  • GraphicsOverlay
  • -
  • LinearUnit
  • -
  • LinearUnitId
  • -
  • MapView
  • -
  • Point
  • -
  • PointCollection
  • -
  • Polyline
  • -
  • SimpleLineSymbol
  • -
  • SimpleMarkerSymbol
  • -
+# Geodesic Operations + +Calculate the geodesic path and distance between two points. + +![](GeodesicOperations.png) + +## How to use the sample + +Click on the map to select a path destination. The geodesic path between the two points will update. + +## How it works + +To create a geodesic path between two points: + +1. Create a `Polyline` using two points. +2. Pass this polyline to: `GeometryEngine.densifyGeodetic(polyline, segmentLength, unitOfMeasurement, GeodeticCurveType.GEODESIC)`. This will create a new polyline with segments of length `segmentLength` and `LinearUnit` set to `unitOfMeasurement`. The curve will be geodesic. +3. You can set this geometry to a `Graphic` to display the curve in a `GraphicsOverlay`. +4. To get the distance, use `GeometryEngine.lengthGeodetic(pathGeometry, unitOfMeasurement, GeodeticCurveType.GEODESIC)` + +## Relevant API + +* ArcGISMap +* GeodeticCurveType +* Geometry +* GeometryEngine +* Graphic +* GraphicsOverlay +* LinearUnit +* LinearUnitId +* MapView +* Point +* PointCollection +* Polyline +* SimpleLineSymbol +* SimpleMarkerSymbol diff --git a/geometry/geodesic-sector-and-ellipse/README.md b/geometry/geodesic-sector-and-ellipse/README.md index a6d0d32806..c6673fdefd 100644 --- a/geometry/geodesic-sector-and-ellipse/README.md +++ b/geometry/geodesic-sector-and-ellipse/README.md @@ -1,45 +1,33 @@ -

Geodesic Sector and Ellipse

+# Geodesic Sector and Ellipse -

Create geodesic sectors and ellipses.

+Create geodesic sectors and ellipses. -

Geodesic sectors and ellipses can be used in a wide range of analyses ranging from antenna coverage to projectile landing zones.

+Geodesic sectors and ellipses can be used in a wide range of analyses ranging from antenna coverage to projectile landing zones. -

+![](GeodesicSectorAndEllipse.png) -

How to use the sample

+## How to use the sample -

The geodesic sector and ellipse will display with default parameters at the start. Click anywhere on the map to change the center of the geometries. Adjust any of the controls to see how they affect the sector and ellipse on the fly.

+The geodesic sector and ellipse will display with default parameters at the start. Click anywhere on the map to change the center of the geometries. Adjust any of the controls to see how they affect the sector and ellipse on the fly. -

How it works

+## How it works -

To create a geodesic sector and ellipse:

+To create a geodesic sector and ellipse: -
    -
  1. Create GeodesicSectorParameters and GeodesicEllipseParameters using one of the constructors with default values or using each setter individually.
  2. +1. Create `GeodesicSectorParameters` and `GeodesicEllipseParameters` using one of the constructors with default values or using each setter individually. +2. Set the `center`, `axisDirection`, `semiAxis1Length`, and the `semiAxis2Length` properties to change the general ellipse position, shape, and orientation. +3. Set the `sectorAngle` and `startDirection` angles to change the sector's shape and orientation. +4. Set the `maxPointCount` and `maxSegmentLength` properties to control the complexity of the geometries and the approximation of the ellipse curve. +5. Specify the `geometryType` to either `POLYGON`, `POLYLINE`, or `MULTIPOINT` to change the result geometry type. +6. Pass the parameters to the related static methods: `GeometryEngine.ellipseGeodesic(geodesicEllipseParameters)` and `GeometryEngine.sectorGeodesic(geodesicSectorParameters)`. The returned value will be a `Geometry` of the type specified by the `geometryType` parameter. -
  3. Set the center, axisDirection, semiAxis1Length, and the semiAxis2Length properties to change the general ellipse position, shape, and orientation.
  4. +## Relevant API -
  5. Set the sectorAngle and startDirection angles to change the sector's shape and orientation.
  6. +* GeodesicEllipseParameters +* GeodesicSectorParameters +* GeometryEngine +* GeometryType -
  7. Set the maxPointCount and maxSegmentLength properties to control the complexity of the geometries and the approximation of the ellipse curve.
  8. +## Additional information -
  9. Specify the geometryType to either POLYGON, POLYLINE, or MULTIPOINT to change the result geometry type.
  10. - -
  11. Pass the parameters to the related static methods: GeometryEngine.ellipseGeodesic(geodesicEllipseParameters) and GeometryEngine.sectorGeodesic(geodesicSectorParameters). The returned value will be a Geometry of the type specified by the geometryType parameter.
  12. -
- -

Relevant API

- -
    -
  • GeodesicEllipseParameters
  • - -
  • GeodesicSectorParameters
  • - -
  • GeometryEngine
  • - -
  • GeometryType
  • -
- -

Additional information

- -

To create a circle instead of an ellipse, simply set semiAxis2Length to 0.0 and semiAxis1Length to the desired radius of the circle. This eliminates the need to update both parameters to the same value.

+To create a circle instead of an ellipse, simply set `semiAxis2Length` to 0.0 and `semiAxis1Length` to the desired radius of the circle. This eliminates the need to update both parameters to the same value. diff --git a/geometry/geometry-engine-simplify/README.md b/geometry/geometry-engine-simplify/README.md index e089cdc5fa..8e74987c00 100644 --- a/geometry/geometry-engine-simplify/README.md +++ b/geometry/geometry-engine-simplify/README.md @@ -1,33 +1,29 @@ -

Geometry Engine Simplify

+# Geometry Engine Simplify -

Simplify a polygon that has multiple parts.

+Simplify a polygon that has multiple parts. -

+![](GeometryEngineSimplify.png) -

How to use the sample

+## How to use the sample -

Click on the simplify button to apply the simplify geometry operation between the intersecting polygons. Click reset to restart the sample.

+Click on the simplify button to apply the simplify geometry operation between the intersecting polygons. Click reset to restart the sample. -

How it works

+## How it works -

To perform the simplify geometry operation on a Polygon:

+To perform the simplify geometry operation on a `Polygon`: -
    -
  1. Create a GraphicsOverlay and add it to the MapView.
  2. -
  3. Define the PointCollection of the Geometry.
  4. -
  5. Add the polygons to the GraphicsOverlay.
  6. -
  7. Determine the simplified geometry by using the GeometryEngine.simplify(polygon.getGeometry()).
  8. -
+1. Create a `GraphicsOverlay` and add it to the `MapView`. +2. Define the `PointCollection` of the `Geometry`. +3. Add the polygons to the GraphicsOverlay. +4. Determine the simplified geometry by using the `GeometryEngine.simplify(polygon.getGeometry())`. -

Relevant API

+## Relevant API -
    -
  • Geometry
  • -
  • Graphic
  • -
  • GraphicsOverlay
  • -
  • MapView
  • -
  • Point
  • -
  • PointCollection
  • -
  • SimpleLineSymbol
  • -
  • SimpleFillSymbol
  • -
\ No newline at end of file +* Geometry +* Graphic +* GraphicsOverlay +* MapView +* Point +* PointCollection +* SimpleLineSymbol +* SimpleFillSymbol diff --git a/geometry/list-transformations-by-suitability/README.md b/geometry/list-transformations-by-suitability/README.md index 1681535a84..7f088008b0 100644 --- a/geometry/list-transformations-by-suitability/README.md +++ b/geometry/list-transformations-by-suitability/README.md @@ -1,48 +1,35 @@ -

List Transformations By Suitability

- -

Find transformations to other spatial references suitable to the point's location.

- -

Demonstrates how to use the TransformationCatalog to get a list of available DatumTransformations that - can be used to project a Geometry between two different SpatialReferences.

- -

Transformations (sometimes known as datum or geographic transformations) are used when projecting data from one -spatial reference to another, when there is a difference in the underlying datum of the spatial references. -Transformations can be mathematically defined by specific equations (equation-based transformations), or may rely on -external supporting files (grid-based transformations). Choosing the most appropriate transformation for a situation -can ensure the best possible accuracy for this operation. Some users familiar with transformations may wish to -control which transformation is used in an operation.

- -

- -

How to use the sample

- -

The list displays all suitable tranformations between the graphic and the map. Once the transform button is clicked a new red graphic will appear showing where the original graphic would be placed if transformation was applied.

- -

Order by extent suitability, if checked, will find suitable transformations within the map's visible area. If not checked, will find suitable transformations using the whole map.

- -

How it works

- -

To get suitable transformations from one spatial reference to another:

- -
    -
  1. Use TransformationCatalog.getTransformationsBySuitability(inputSR, outputSR) for transformations - based on the map's spatial reference OR TransformationCatalog.getTransformationsBySuitability(inputSR, - outputSR, mapView.getCurrentVisibileArea().getExtent()) for transformations suitable to the current extent - .
  2. -
  3. Pick one of the DatumTransformations returned. Use GeometryEngine.project(inputGeometry, - outputSR, datumTransformation) to get the transformed geometry.
  4. -
- -

Relevant API

-
    -
  • ArcGISMap
  • -
  • Basemap
  • -
  • DatumTransformation
  • -
  • GeometryEngine
  • -
  • Graphic
  • -
  • GraphicsOverlay
  • -
  • Point
  • -
  • SimpleMarkerSymbol
  • -
  • SpatialReference -
  • TransformationCatalog
  • -
+# List Transformations By Suitability + +Find transformations to other spatial references suitable to the point's location. + +Demonstrates how to use the TransformationCatalog to get a list of available DatumTransformations that can be used to project a Geometry between two different SpatialReferences. + +Transformations (sometimes known as datum or geographic transformations) are used when projecting data from one spatial reference to another, when there is a difference in the underlying datum of the spatial references. Transformations can be mathematically defined by specific equations (equation-based transformations), or may rely on external supporting files (grid-based transformations). Choosing the most appropriate transformation for a situation can ensure the best possible accuracy for this operation. Some users familiar with transformations may wish to control which transformation is used in an operation. + +![](ListTransformationsBySuitability.png) + +## How to use the sample + +The list displays all suitable tranformations between the graphic and the map. Once the transform button is clicked a new red graphic will appear showing where the original graphic would be placed if transformation was applied. + +Order by extent suitability, if checked, will find suitable transformations within the map's visible area. If not checked, will find suitable transformations using the whole map. + +## How it works + +To get suitable transformations from one spatial reference to another: + +1. Use `TransformationCatalog.getTransformationsBySuitability(inputSR, outputSR)` for transformations based on the map's spatial reference OR `TransformationCatalog.getTransformationsBySuitability(inputSR,outputSR, mapView.getCurrentVisibileArea().getExtent())` for transformations suitable to the current extent. +2. Pick one of the `DatumTransformation`s returned. Use `GeometryEngine.project(inputGeometry,outputSR, datumTransformation)` to get the transformed geometry. + +## Relevant API + +* ArcGISMap +* Basemap +* DatumTransformation +* GeometryEngine +* Graphic +* GraphicsOverlay +* Point +* SimpleMarkerSymbol +* SpatialReference +. TransformationCatalog diff --git a/geometry/nearest-vertex/README.md b/geometry/nearest-vertex/README.md index 0efade1223..cae1872615 100644 --- a/geometry/nearest-vertex/README.md +++ b/geometry/nearest-vertex/README.md @@ -1,24 +1,20 @@ -

Nearest Vertex

+# Nearest Vertex -

Get the vertex of a geometry closest to a point.

+Get the vertex of a geometry closest to a point. -

+![](NearestVertex.png) -

How to use the sample

+## How to use the sample -

Tap anywhere on the map. An orange marker will show at that tapped location. A blue marker will show the polygon's nearest vertex to the tapped location. A red marker will show the nearest coordinate within the polygon geometry.

+Tap anywhere on the map. An orange marker will show at that tapped location. A blue marker will show the polygon's nearest vertex to the tapped location. A red marker will show the nearest coordinate within the polygon geometry. -

How it works

+## How it works -
    -
  1. Get a Point to check the nearest vertex against.
  2. -
  3. Call GeometryEngine.nearestVertex(inputGeometry, point). The returned ProximityResult can be used to get the coordinate and distance between the vertex and point.
  4. -
  5. Call GeometryEngine.nearestCoordinate(inputGeometry, point). The returned ProximityResult can be used to get the coordinate and distance between the coordinate and point.
  6. -
+1. Get a `Point` to check the nearest vertex against. +2. Call `GeometryEngine.nearestVertex(inputGeometry, point)`. The returned `ProximityResult` can be used to get the `coordinate` and distance between the vertex and point. +3. Call `GeometryEngine.nearestCoordinate(inputGeometry, point)`. The returned `ProximityResult` can be used to get the `coordinate` and distance between the coordinate and point. -

Relevant API

+## Relevant API -
    -
  • GeometryEngine
  • -
  • ProximityResult
  • -
+* GeometryEngine +* ProximityResult diff --git a/geometry/project/README.md b/geometry/project/README.md index 6605200fd1..41f73125a0 100644 --- a/geometry/project/README.md +++ b/geometry/project/README.md @@ -1,29 +1,25 @@ -

Project

- -

Project a point to another spatial reference.

- -

Being able to project between spatial references is fundamental to a GIS. An example of when you would need to -re-project data is if you had data in two different spatial references, but wanted to perform an intersect analysis -with the GeometryEngine::intersect function. This function takes two geometries as parameters, and both -geometries must be in the same spatial reference. If they are not, you could first use -GeometryEngine::project to convert the geometries so they match.

- -

- -

How to use the sample

-

Click anywhere on the map. A callout will display the clicked location's coordinate in the original (basemap's) -spatial reference and in the projected spatial reference.

- -

How it works

-

To project a geometry to another spatial reference:

-
    -
  1. Call the static method, GeometryEngine.project, passing in the original Geometry and a -SpatialReference to project to.
  2. -
- -

Relevant API

-
    -
  • GeometryEngine
  • -
  • Point
  • -
  • SpatialReference
  • -
+# Project + +Project a point to another spatial reference. + +Being able to project between spatial references is fundamental to a GIS. An example of when you would need to re-project data is if you had data in two different spatial references, but wanted to perform an intersect analysis with the `GeometryEngine::intersect` function. This function takes two geometries as parameters, and both geometries must be in the same spatial reference. If they are not, you could first use `GeometryEngine::project` to convert the geometries so they match. + +![](Project.png) + +## How to use the sample + +Click anywhere on the map. A callout will display the clicked location's coordinate in the original (basemap's) +spatial reference and in the projected spatial reference. + +## How it works + +To project a geometry to another spatial reference: + +1. Call the static method, `GeometryEngine.project`, passing in the original `Geometry` and a +`SpatialReference` to project to. + +## Relevant API + +* GeometryEngine +* Point +* SpatialReference diff --git a/geometry/spatial-operations/README.md b/geometry/spatial-operations/README.md index 1a64e1d65f..ab74aa52d5 100644 --- a/geometry/spatial-operations/README.md +++ b/geometry/spatial-operations/README.md @@ -1,34 +1,29 @@ -

Spatial Operations

+# Spatial Operations -

Find the union, difference, or intersection of two geometries.

+Find the union, difference, or intersection of two geometries. -

+![](SpatialOperations.png) -

How to use the sample

+## How to use the sample -

The sample provides a drop down on the top, where you can select a geometry operation. When you choose a geometry -operation, the application performs this operation between the overlapping polygons and applies the result to the -geometries.

+The sample provides a drop down on the top, where you can select a geometry operation. When you choose a geometry operation, the application performs this operation between the overlapping polygons and applies the result to the geometries. -

How it works

+## How it works -

To find the union, difference, intersection, or symmetric difference between Polygons:

+To find the union, difference, intersection, or symmetric difference between `Polygon`s: -
    -
  1. Create a GraphicsOverlay and add it to the MapView.
  2. -
  3. Define a PointCollection of each Geometry.
  4. -
  5. Add the overlapping polygons to the graphics overlay.
  6. -
  7. Determine spatial relationships between polygons, e.g. union, difference, etc, by using the appropriate operation GeometryEngine.operation(polygon.getGeometry(), polygon.getGeometry())
  8. -
+1. Create a `GraphicsOverlay` and add it to the `MapView`. +2. Define a `PointCollection` of each `Geometry`. +3. Add the overlapping polygons to the graphics overlay. +4. Determine spatial relationships between polygons, e.g. union, difference, etc, by using the appropriate operation `GeometryEngine.operation(polygon.getGeometry(), polygon.getGeometry())` -

Relevant API

-
    -
  • Geometry
  • -
  • Graphic
  • -
  • GraphicsOverlay
  • -
  • MapView
  • -
  • Point
  • -
  • PointCollection
  • -
  • SimpleLineSymbol
  • -
  • SimpleFillSymbol
  • -
+## Relevant API + +* Geometry +* Graphic +* GraphicsOverlay +* MapView +* Point +* PointCollection +* SimpleLineSymbol +* SimpleFillSymbol diff --git a/geometry/spatial-relationships/README.md b/geometry/spatial-relationships/README.md index 4f573b2d77..0b43f36e3c 100644 --- a/geometry/spatial-relationships/README.md +++ b/geometry/spatial-relationships/README.md @@ -1,41 +1,34 @@ -

Spatial Relationships

- -

Determine spatial relationships between two geometries.

- -

- -

How to use the sample

- -

Click on one of the three graphics to select it. The tree view will list the relationships the selected graphic -has to the other graphic geometries.

- -

How it works

- -

To check the relationship between geometries.

- -
    -
  1. Get the geometry from two different graphics. In this example the geometry of the selected graphic is - compared to the geometry of each graphic not selected.
  2. -
  3. Use the methods in GeometryEngine to check the relationship between the geometries, e.g. - contains, disjoint, intersects, etc. If the method returns - true, the relationship exists.
  4. -
- -

Relevant API

-
    -
  • ArcGISMap
  • -
  • Basemap
  • -
  • Geometry
  • -
  • GeometryEngine
  • -
  • GeometryType
  • -
  • Graphic
  • -
  • GraphicsOverlay
  • -
  • MapView
  • -
  • Point
  • -
  • PointCollection
  • -
  • Polygon
  • -
  • Polyline
  • -
  • SimpleFillSymbol
  • -
  • SimpleLineSymbol
  • -
  • SimpleMarkerSymbol
  • -
+# Spatial Relationships + +Determine spatial relationships between two geometries. + +![](SpatialRelationships.png) + +## How to use the sample + +Click on one of the three graphics to select it. The tree view will list the relationships the selected graphic has to the other graphic geometries. + +## How it works + +To check the relationship between geometries. + +1. Get the geometry from two different graphics. In this example the geometry of the selected graphic is compared to the geometry of each graphic not selected. +2. Use the methods in `GeometryEngine` to check the relationship between the geometries, e.g. `contains`, `disjoint`, `intersects`, etc. If the method returns `true`, the relationship exists. + +## Relevant API + +* ArcGISMap +* Basemap +* Geometry +* GeometryEngine +* GeometryType +* Graphic +* GraphicsOverlay +* MapView +* Point +* PointCollection +* Polygon +* Polyline +* SimpleFillSymbol +* SimpleLineSymbol +* SimpleMarkerSymbol diff --git a/group_layers/group-layers/README.md b/group_layers/group-layers/README.md index 7093b261ca..2f130054b4 100644 --- a/group_layers/group-layers/README.md +++ b/group_layers/group-layers/README.md @@ -1,45 +1,38 @@ -

Group layers

+# Group layers -

Group a collection of layers together and toggle their visibility as a group.

+Group a collection of layers together and toggle their visibility as a group. -

+![](GroupLayers.png) -

Use case

+## Use case -

Group layers communicate to the user that layers are related and can be managed together.

+Group layers communicate to the user that layers are related and can be managed together. +In a land development project, you might group layers according to the phase of development. -

In a land development project, you might group layers according to the phase of development.

+## How to use the sample -

How to use the sample

+The layers in the map will be displayed in a table of contents. Toggle the checkbox next to a layer's name to change its visibility. -

The layers in the map will be displayed in a table of contents. Toggle the checkbox next to a layer's name to change its visibility.

+## How it works -

How it works

+1. Create an empty `GroupLayer`. +2. Add a child layer to the group layer's layers collection. +3. To toggle the visibility of the group, simply change the group layer's visibility property. -
    -
  1. Create an empty GroupLayer.
  2. +## Relevant API -
  3. Add a child layer to the group layer's layers collection.
  4. +* GroupLayer -
  5. To toggle the visibility of the group, simply change the group layer's visibility property.
  6. -
+## Additional information -

Relevant API

+The full extent of a group layer may change when child layers are added/removed. Group layers do not have a spatial reference, but the full extent will have the spatial reference of the first child layer. -
    -
  • GroupLayer
  • -
+Group layers can be saved to web scenes. In web maps, group layers will be flattened in the web map's operational layers. -

Additional information

+The implementation shown here makes use of a custom tree cell for displaying layers in a tree view. In the custom +tree cell, toggling the checkbox of the group layer cell does not also toggle the child cell's checkbox. If you +desire this behavior, use or extend JavaFX's `CheckBoxTreeCell` and `CheckBoxTreeItem`. -

The full extent of a group layer may change when child layers are added/removed. Group layers do not have a spatial reference, but the full extent will have the spatial reference of the first child layer.

+## Tags -

Group layers can be saved to web scenes. In web maps, group layers will be flattened in the web map's operational layers.

- -

The implementation shown here makes use of a custom tree cell for displaying layers in a tree view. In the custom -tree cell, toggling the checkbox of the group layer cell does not also toggle the child cell's checkbox. If you -desire this behavior, use or extend JavaFX's CheckBoxTreeCell and CheckBoxTreeItem. - -

Tags

- -

Layers, group layer

\ No newline at end of file +Layers, group layer diff --git a/hydrography/add-enc-exchange-set/README.md b/hydrography/add-enc-exchange-set/README.md index 4b36e677df..8107570487 100644 --- a/hydrography/add-enc-exchange-set/README.md +++ b/hydrography/add-enc-exchange-set/README.md @@ -1,41 +1,31 @@ -

Add ENC exchange set

+# Add ENC exchange set -

Display nautical charts conforming to the ENC specification.

+Display nautical charts conforming to the ENC specification. -

+![](AddEncExchangeSet.png) -

Use case

+## Use case -

Maritime applications require conformity to strict specifications over how hydrographic data is displayed digitally to ensure the safety of traveling vessels.

+Maritime applications require conformity to strict specifications over how hydrographic data is displayed digitally to ensure the safety of traveling vessels. -

S-57 is the IHO (International Hydrographic Organization) Transfer Standard for digital hydrographic data. The symbology standard for this is called S-52. There are different product specifications for this standard. ENC (Electronic Navigational Charts) is one such specification developed by IHO.

+S-5. is the IHO (International Hydrographic Organization) Transfer Standard for digital hydrographic data. The symbology standard for this is called S-52. There are different product specifications for this standard. ENC (Electronic Navigational Charts) is one such specification developed by IHO. -

An ENC exchange set is a catalog of data files which can be loaded as cells. The cells contain information on how symbols should be displayed in relation to one another, so as to represent information such as depth and obstacles accurately.

+An ENC exchange set is a catalog of data files which can be loaded as cells. The cells contain information on how symbols should be displayed in relation to one another, so as to represent information such as depth and obstacles accurately. -

How it works

+## How it works -
    -
  1. Specify the path to a local CATALOG.031 file to create an EncExchangeSet.
  2. +1. Specify the path to a local CATALOG.03. file to create an `EncExchangeSet`. +2. After loading the exchange set, loop through the `EncDataset` objects in `encExchangeSet.getDatasets()`. +3. Create an `EncCell` for each dataset. Then create an `EncLayer` for each cell. +4. Add the ENC layer to a map's operational layers collection to display it. -
  3. After loading the exchange set, loop through the EncDataset objects in encExchangeSet.getDatasets().
  4. +## Relevant API -
  5. Create an EncCell for each dataset. Then create an EncLayer for each cell.
  6. +* EncCell +* EncDataset +* EncExchangeSet +* EncLayer -
  7. Add the ENC layer to a map's operational layers collection to display it.
  8. -
+## Tags -

Relevant API

- -
    -
  • EncCell
  • - -
  • EncDataset
  • - -
  • EncExchangeSet
  • - -
  • EncLayer
  • -
- -

Tags

- -

Data, ENC, maritime, nautical chart, layers, hydrographic

\ No newline at end of file +Data, ENC, maritime, nautical chart, layers, hydrographic diff --git a/image_layers/change-sublayer-renderer/README.md b/image_layers/change-sublayer-renderer/README.md index 199ee6df62..04bbee0d4d 100644 --- a/image_layers/change-sublayer-renderer/README.md +++ b/image_layers/change-sublayer-renderer/README.md @@ -1,39 +1,34 @@ -

Change Sublayer Renderer

+# Change Sublayer Renderer -

Apply a renderer to a sublayer.

+Apply a renderer to a sublayer. -

In this example, a renderer is applied to see the different population ranges in the counties sublayer data.

+In this example, a renderer is applied to see the different population ranges in the counties sublayer data. -

+![](ChangeSublayerRenderer.png) -

How to use the sample

+## How to use the sample -

Wait for the map image layer to load. Then click the "Change sublayer renderer" button to set the renderer.

+Wait for the map image layer to load. Then click the "Change sublayer renderer" button to set the renderer. -

How it works

+## How it works -

To get a sublayer and change its renderer:

+To get a sublayer and change its renderer: -
    -
  1. Create an ArcGIS map image layer from its URL.
  2. -
  3. After it is done loading, get its SublayerList with imageLayer.getSublayers().
  4. -
  5. Cast the sublayer you want to change to the appropriate type: (ArcGISMapImageSublayer) sublayers.get(0) - .
  6. -
  7. Set the renderer with sublayer.setRenderer(renderer).
  8. -
+1. Create an ArcGIS map image layer from its URL. +2. After it is done loading, get its `SublayerList` with `imageLayer.getSublayers()`. +3. Cast the sublayer you want to change to the appropriate type: `(ArcGISMapImageSublayer) sublayers.get(0)`. +4. Set the renderer with `sublayer.setRenderer(renderer)`. -

Relevant API

+## Relevant API -
    -
  • ArcGISMap
  • -
  • ArcGISMapImageLayer
  • -
  • ArcGISMapImageSublayer
  • -
  • Basemap
  • -
  • ClassBreaksRenderer
  • -
  • ClassBreaksRenderer.ClassBreak
  • -
  • LoadStatus
  • -
  • MapView
  • -
  • SimpleFillSymbol
  • -
  • SimpleLineSymbol
  • -
  • SublayerList
  • -
+* ArcGISMap +* ArcGISMapImageLayer +* ArcGISMapImageSublayer +* Basemap +* ClassBreaksRenderer +* ClassBreaksRenderer.ClassBreak +* LoadStatus +* MapView +* SimpleFillSymbol +* SimpleLineSymbol +* SublayerList diff --git a/image_layers/map-image-layer-sublayer-visibility/README.md b/image_layers/map-image-layer-sublayer-visibility/README.md index d5d72eb508..0e1b9e9dd7 100644 --- a/image_layers/map-image-layer-sublayer-visibility/README.md +++ b/image_layers/map-image-layer-sublayer-visibility/README.md @@ -1,31 +1,27 @@ -

Map Image Layer Sublayer Visibility

+# Map Image Layer Sublayer Visibility -

Change the visibility of sublayers.

+Change the visibility of sublayers. -

+![](MapImageLayerSublayerVisibility.png) -

How to use the sample

+## How to use the sample -

Each sublayer has a check-box which can be used to toggle the visibility of the sublayer.

+Each sublayer has a check-box which can be used to toggle the visibility of the sublayer. -

How it works

+## How it works -

To change visibility of a ArcGISSubLayer from your ArcGISMap:

+To change visibility of a `ArcGISSubLayer` from your `ArcGISMap`: -
    -
  1. Create an ArcGISMapImageLayer from its URL.
  2. -
  3. Add it to ArcGISMap.getOperationalLayers().add().
  4. -
  5. Display the ArcGISMap by adding it to the MapView.
  6. -
  7. Gain access to the sub-layers from the ArcGISMapImageLayer.getSubLayers() method which returns a SubLayerList. The sub layer list is a modifiable list of ArcGISSubLayers.
  8. -
  9. Determine if the layer is visible or not by turning on / off the ArcGIS sub layers visibility in the sub layer list.
  10. -
+1. Create an `ArcGISMapImageLayer` from its URL. +2. Add it to `ArcGISMap.getOperationalLayers().add()`. +3. Display the ArcGISMap by adding it to the `MapView`. +4. Gain access to the sub-layers from the `ArcGISMapImageLayer.getSubLayers()` method which returns a `SubLayerList`. The sub layer list is a modifiable list of ArcGISSubLayers. +5. Determine if the layer is visible or not by turning on / off the ArcGIS sub layers visibility in the sub layer list. -

Relevant API

+## Relevant API -
    -
  • ArcGISMap
  • -
  • ArcGISMapImageLayer
  • -
  • Basemap
  • -
  • MapView
  • -
  • SubLayerList
  • -
+* ArcGISMap +* ArcGISMapImageLayer +* Basemap +* MapView +* SubLayerList diff --git a/image_layers/map-image-layer-tables/README.md b/image_layers/map-image-layer-tables/README.md index 10c24a5e9e..ac431ca0d5 100644 --- a/image_layers/map-image-layer-tables/README.md +++ b/image_layers/map-image-layer-tables/README.md @@ -1,52 +1,40 @@ -

Map Image Layer Tables

- -

Find features in a spatial table related to features in a non-spatial table.

- -

The non-spatial tables contained by a map service may contain additional information about sublayer features. Such information can be accessed by traversing table relationships defined in the service.

- -

- -

How to use the sample

- -

Once the map image layer loads, a list view will be populated with comment data from non-spatial features. Click on -one of the comments to query related spatial features and display the first result on the map.

- -

How it works

- -

To query a map image layer's tables and find related features:

- -
    -
  1. Create an ArcGISMapImageLayer with the URL of a map image service.
  2. -
  3. Load the layer and get one of it's tables with imageLayer.getTables().get(index).
  4. -
  5. To query the table, create QueryParameters. You can use queryParameters.setWhereClause - (sqlQuery) to filter the features returned. Use table.queryFeaturesAsync(parameters) to get a - FeatureQueryResult.
  6. -
  7. The FeatureQueryResult is an iterable, so simply loop through it to get each result - Feature.
  8. -
  9. To query for related features, get the table's relationship info with table.getLayerInfo() - .getRelationshipInfos(). This returns a list of RelationshipInfos. Choose which one to - base your query on.
  10. -
  11. Now create RelatedQueryParameters passing in the RelationshipInfo. To query - related features use table.queryRelatedFeaturesAsync(feature, relatedQueryParameters).
  12. -
  13. This returns a list of RelatedFeatureQueryResults, each containing a set of related - features.
  14. -
- -

Relevant API

- -
    -
  • ArcGISFeature
  • -
  • ArcGISMapImageLayer
  • -
  • Feature
  • -
  • FeatureQueryResult
  • -
  • QueryParameters
  • -
  • RelatedFeatureQueryResult
  • -
  • RelatedQueryParameters
  • -
  • RelationshipInfo
  • -
  • ServiceFeatureTable
  • -
- -

Additional information

- -

You can use ArcGISMapImageLayer.LoadTablesAndLayersAsync() to recursively load all sublayers and tables -associated with a map image layer.

\ No newline at end of file +# Map Image Layer Tables + +Find features in a spatial table related to features in a non-spatial table. + +The non-spatial tables contained by a map service may contain additional information about sublayer features. Such information can be accessed by traversing table relationships defined in the service. + +![](MapImageLayerTables.png) + +## How to use the sample + +Once the map image layer loads, a list view will be populated with comment data from non-spatial features. Click on one of the comments to query related spatial features and display the first result on the map. + +## How it works + +To query a map image layer's tables and find related features: + +1. Create an `ArcGISMapImageLayer` with the URL of a map image service. +2. Load the layer and get one of it's tables with `imageLayer.getTables().get(index)`. +3. To query the table, create `QueryParameters`. You can use `queryParameters.setWhereClause(sqlQuery)` to filter the features returned. Use `table.queryFeaturesAsync(parameters)` to get a `FeatureQueryResult`. +4. The `FeatureQueryResult` is an iterable, so simply loop through it to get each result `Feature`. +5. To query for related features, get the table's relationship info with `table.getLayerInfo().getRelationshipInfos()`. This returns a list of `RelationshipInfo`s. Choose which one to base your query on. +6. Now create `RelatedQueryParameters` passing in the `RelationshipInfo`. To query related features use `table.queryRelatedFeaturesAsync(feature, relatedQueryParameters)`. +7. This returns a list of `RelatedFeatureQueryResult`s, each containing a set of related features`. + +## Relevant API + +* ArcGISFeature +* ArcGISMapImageLayer +* Feature +* FeatureQueryResult +* QueryParameters +* RelatedFeatureQueryResult +* RelatedQueryParameters +* RelationshipInfo +* ServiceFeatureTable + +## Additional information + +You can use `ArcGISMapImageLayer.LoadTablesAndLayersAsync()` to recursively load all sublayers and tables +associated with a map image layer. diff --git a/image_layers/map-image-layer/README.md b/image_layers/map-image-layer/README.md index 7936fa6df9..80973e71d5 100644 --- a/image_layers/map-image-layer/README.md +++ b/image_layers/map-image-layer/README.md @@ -1,26 +1,21 @@ -

Map Image Layer

+# Map Image Layer -

Display a layer from an ArcGIS map image layer service.

+Display a layer from an ArcGIS map image layer service. -

Typically this type of content is known as operational data, an example would be business data that changes frequently, such as displaying a fleet of vehicles as they make deliveries.

+Typically this type of content is known as operational data, an example would be business data that changes frequently, such as displaying a fleet of vehicles as they make deliveries. -

+![](MapImageLayer.png) -

How it works

+## How it works -

To add an ArcGISMapImageLayer to your ArcGISMap using its URL:

+To add an `ArcGISMapImageLayer` to your `ArcGISMap` using its URL: -
    -
  1. Create an ArcGIS map image layer from its URL.
  2. -
  3. Add it to ArcGISMap.getOperationalLayers().add().
  4. -
  5. Display the ArcGIS map by adding it to the MapView.
  6. -
+1. Create an ArcGIS map image layer from its URL. +2. Add it to `ArcGISMap.getOperationalLayers().add()`. +3. Display the ArcGIS map by adding it to the `MapView`. -

Relevant API

- -
    -
  • ArcGISMapImageLayer
  • -
  • ArcGISMap
  • -
  • MapView
  • -
+## Relevant API +* ArcGISMapImageLayer +* ArcGISMap +* MapView diff --git a/image_layers/query-map-image-sublayer/README.md b/image_layers/query-map-image-sublayer/README.md index 3ce624d719..dc92fe638a 100644 --- a/image_layers/query-map-image-sublayer/README.md +++ b/image_layers/query-map-image-sublayer/README.md @@ -1,39 +1,29 @@ -

Query Map Image Sublayer

+# Query Map Image Sublayer -

Find features in a sublayer based on attributes and location.

+Find features in a sublayer based on attributes and location. -

Sublayers of an ArcGISMapImageLayer may expose a ServiceFeatureTable through a -Table property. This allows you to perform the same queries available when working with a table from a -FeatureLayer: attribute query, spatial query, statistics query, query for related features, and so on.

+Sublayers of an `ArcGISMapImageLayer` may expose a `ServiceFeatureTable` through a `Table` property. This allows you to perform the same queries available when working with a table from a `FeatureLayer`: attribute query, spatial query, statistics query, query for related features, and so on. -

+![](QueryMapImageSublayer.png) -

How to use the sample

+## How to use the sample -

Specify a minimum population in the spinner and click the query button to query the sublayers. After a short time, - the results for each sublayer will appear as graphics.

+Specify a minimum population in the spinner and click the query button to query the sublayers. After a short time, the results for each sublayer will appear as graphics. -

How it works

+## How it works -

To query map image sublayers:

+To query map image sublayers: -
    -
  1. Create an ArcGISMapImageLayer using the URL of it's image service.
  2. -
  3. After loading the layer, get its sublayers you want to query with (ArcGISMapImageSublayer) layer - .getSubLayers().get(index).
  4. -
  5. Load the sublayer, and then get its ServiceFeatureTable with sublayer.getTable().
  6. -
  7. Create QueryParameters. You can use the where clause to query against a table attribute or set - the parameters geometry to limit the results to an area of the map.
  8. -
  9. Call sublayerTable.queryFeaturesAsync(queryParameters) to get a FeatureQueryResult - with features matching the query.
  10. -
  11. Iterate through the result features to use them however you wish.
  12. -
+1. Create an `ArcGISMapImageLayer` using the URL of it's image service. +2. After loading the layer, get its sublayers you want to query with `(ArcGISMapImageSublayer) layer.getSubLayers().get(index)`. +3. Load the sublayer, and then get its `ServiceFeatureTable` with `sublayer.getTable()`. +4. Create `QueryParameters`. You can use the where clause to query against a table attribute or set the parameters geometry to limit the results to an area of the map. +5. Call `sublayerTable.queryFeaturesAsync(queryParameters)` to get a `FeatureQueryResult` with features matching the query. +6. Iterate through the result features to use them however you wish. -

Relevant API

+## Relevant API -
    -
  • ArcGISMapImageLayer
  • -
  • ArcGISMapImageSublayer
  • -
  • QueryParameters
  • -
  • ServiceFeatureTable
  • -
+* ArcGISMapImageLayer +* ArcGISMapImageSublayer +* QueryParameters +* ServiceFeatureTable diff --git a/kml/display-kml-network-links/README.md b/kml/display-kml-network-links/README.md index 2fd1b18cee..b621e7c307 100644 --- a/kml/display-kml-network-links/README.md +++ b/kml/display-kml-network-links/README.md @@ -1,35 +1,31 @@ -

Display KML Network Links

+# Display KML Network Links -

Display KML that automatically refreshes every few seconds.

+Display KML that automatically refreshes every few seconds. -

+![](DisplayKMLNetworkLinks.png) -

How to use the sample

+## How to use the sample -

The data shown should refresh automatically every few seconds. A network message will be displayed when the dataset is loaded.

+The data shown should refresh automatically every few seconds. A network message will be displayed when the dataset is loaded. -

How it works

+## How it works -

To show KML with network links and display network messages:

+To show KML with network links and display network messages: -
    -
  1. Create a KmlDataset from a KML source which has network links.
  2. -
  3. Construct a KmlLayer with the dataset and add the layer as an operational layer.
  4. -
  5. To listen for network messages, add a KmlNetworkLinkMessageReceivedListener on the dataset.
  6. -
+1. Create a `KmlDataset` from a KML source which has network links. +2. Construct a `KmlLayer` with the dataset and add the layer as an operational layer. +3. To listen for network messages, add a `KmlNetworkLinkMessageReceivedListener` on the dataset. -

Relevant API

+## Relevant API -
    -
  • KmlDataset
  • -
  • KmlLayer
  • -
  • KmlNetworkLinkMessageReceivedEvent
  • -
+* KmlDataset +* KmlLayer +* KmlNetworkLinkMessageReceivedEvent -

About the data

+## About the data -

This map shows the current air traffic in parts of Europe with heading, altitude, and ground speed. Additionally, noise levels from ground monitoring stations are shown.

+This map shows the current air traffic in parts of Europe with heading, altitude, and ground speed. Additionally, noise levels from ground monitoring stations are shown. -

Tags

+## Tags -

KML, KMZ, OGC, Keyhole, Network Link, Network Link Control

\ No newline at end of file +KML, KMZ, OGC, Keyhole, Network Link, Network Link Control diff --git a/kml/display-kml/README.md b/kml/display-kml/README.md index 0a8ead8f31..7464728262 100644 --- a/kml/display-kml/README.md +++ b/kml/display-kml/README.md @@ -1,25 +1,21 @@ -

Display KML

+# Display KML -

Display a KML layer from a URL, portal item, or local KML file.

+Display a KML layer from a URL, portal item, or local KML file. -

+![](DisplayKML.png) -

How it works

+## How it works -

To display a KMLLayer:

+To display a `KMLLayer`: -
    -
  1. To create a KML layer from a URL, create a KMLDataset using the URL to the KML file. Then pass the dataset to the KmlLayer constructor.
  2. -
  3. To create a KML layer from a portal item, construct a PortalItem with a portal and the KML portal item. Pass the portal item to the KmlLayer constructor.
  4. -
  5. To create a KML layer from a local file, create a KMLDataset using the absolute file path to the local KML file. Then pass the dataset to the KmlLayer constructor.
  6. -
  7. Add the layer as an operational layer to the map with map.getOperationalLayers().add(kmlLayer).
  8. -
+1. To create a KML layer from a URL, create a `KMLDataset` using the URL to the KML file. Then pass the dataset to the `KmlLayer` constructor. +2. To create a KML layer from a portal item, construct a `PortalItem` with a portal and the KML portal item. Pass the portal item to the `KmlLayer` constructor. +3. To create a KML layer from a local file, create a `KMLDataset` using the absolute file path to the local KML file. Then pass the dataset to the `KmlLayer` constructor. +4. Add the layer as an operational layer to the map with `map.getOperationalLayers().add(kmlLayer)`. -

Relevant API

+## Relevant API -
    -
  • KmlDataset
  • -
  • KmlLayer
  • -
  • Portal
  • -
  • PortalItem
  • -
+* KmlDataset +* KmlLayer +* Portal +* PortalItem diff --git a/kml/identify-kml-features/README.md b/kml/identify-kml-features/README.md index da977c20fd..cea3c8dc1b 100644 --- a/kml/identify-kml-features/README.md +++ b/kml/identify-kml-features/README.md @@ -1,30 +1,26 @@ -

Identify KML Features

+# Identify KML Features -

Get clicked features in a KML Layer.

+Get clicked features in a KML Layer. -

+![](IdentifyKMLFeatures.png) -

How to use the sample

+## How to use the sample -

When the KML layer is done loaded, click on one of the features. A callout should display next to the feature with HTML describing it.

+When the KML layer is done loaded, click on one of the features. A callout should display next to the feature with HTML describing it. -

How it works

+## How it works -

To identify KML features:

+To identify KML features: -
    -
  1. Add a KmlLayer to the map as an operational layer.
  2. -
  3. Add a clicked listener to the map view with mapView.setOnMouseClicked to get the clicked screen point.
  4. -
  5. Identify features at the screen location with mapView.identifyLayerAsync(kmlLayer, screenPoint, tolerance, false).
  6. -
  7. Use the returned future to get the IdentifyLayerResult.
  8. -
  9. Loop through result.getElements(), looking for GeoElements which are instances of KmlPlacemark.
  10. -
+1. Add a `KmlLayer` to the map as an operational layer. +2. Add a clicked listener to the map view with `mapView.setOnMouseClicked` to get the clicked screen point. +3. Identify features at the screen location with `mapView.identifyLayerAsync(kmlLayer, screenPoint, tolerance, false)`. +4. Use the returned future to get the `IdentifyLayerResult`. +5. Loop through `result.getElements()`, looking for `GeoElements` which are instances of `KmlPlacemark`. -

Relevant API

+## Relevant API -
    -
  • IdentifyLayerResult
  • -
  • KmlDataset
  • -
  • KmlLayer
  • -
  • KmlPlacemark
  • -
+* IdentifyLayerResult +* KmlDataset +* KmlLayer +* KmlPlacemark diff --git a/kml/list-kml-contents/README.md b/kml/list-kml-contents/README.md index d95ddb39c8..e0e4927921 100644 --- a/kml/list-kml-contents/README.md +++ b/kml/list-kml-contents/README.md @@ -1,43 +1,39 @@ -

List KML Contents

+# List KML Contents -

Show KML nodes in their nested hierarchy.

+Show KML nodes in their nested hierarchy. -

+![](ListKMLContents.png) -

How to use the sample

+## How to use the sample -

When the scene and KML layer loads, the KML node tree will be shown in the tree view. Click on a node to zoom to its extent (if it has one).

+When the scene and KML layer loads, the KML node tree will be shown in the tree view. Click on a node to zoom to its extent (if it has one). -

How it works

+## How it works -

To list the nodes in a KML file:

+To list the nodes in a KML file: -
    -
  1. Create a KmlDataset pointing to the KML file.
  2. -
  3. Start with a list of the rood nodes with kmlDataset.getRootNodes().
  4. -
  5. For each node, check if it is a KmlContainer or KmlNetworkLink. These types can have child nodes. If it is one of these, cast to the appropriate type and call getChildNodes().
  6. -
  7. Recursively search these child nodes for more nodes.
  8. -
+1. Create a `KmlDataset` pointing to the KML file. +2. Start with a list of the rood nodes with `kmlDataset.getRootNodes()`. +3. For each node, check if it is a `KmlContainer` or `KmlNetworkLink`. These types can have child nodes. If it is one of these, cast to the appropriate type and call `getChildNodes()`. +4. Recursively search these child nodes for more nodes. -

Relevant API

+## Relevant API -
    -
  • KmlContainer
  • -
  • KmlDataset
  • -
  • KmlDocument
  • -
  • KmlFolder
  • -
  • KmlGroundOverlay
  • -
  • KmlLayer
  • -
  • KmlNetworkLink
  • -
  • KmlNode
  • -
  • KmlPlacemark
  • -
  • KmlScreenOverlay
  • -
+* KmlContainer +* KmlDataset +* KmlDocument +* KmlFolder +* KmlGroundOverlay +* KmlLayer +* KmlNetworkLink +* KmlNode +* KmlPlacemark +* KmlScreenOverlay -

About the data

+## About the data -

This is an example KML file meant to demonstrate how Runtime supports several common features.

+This is an example KML file meant to demonstrate how Runtime supports several common features. -

Tags

+## Tags -

KML, KMZ, OGC, Keyhole

+KML, KMZ, OGC, Keyhole diff --git a/kml/play-a-kml-tour/README.md b/kml/play-a-kml-tour/README.md index 7a6e761702..bb317b576a 100644 --- a/kml/play-a-kml-tour/README.md +++ b/kml/play-a-kml-tour/README.md @@ -1,49 +1,42 @@ -

Play a KML Tour

+# Play a KML Tour -

Play tours in KML files.

+Play tours in KML files. -

+![](PlayAKMLTour.png) -

Use case

+## Use case -

KML, the file format used by Google Earth, supports creating tours, which can control the viewpoint of the scene, hide and show content, and play audio. Tours allow you to easily share tours of geographic locations, which can be augmented with rich multimedia.

+KML, the file format used by Google Earth, supports creating tours, which can control the viewpoint of the scene, hide and show content, and play audio. Tours allow you to easily share tours of geographic locations, which can be augmented with rich multimedia. -

How to use the sample

+## How to use the sample -

Click the play button to start the tour. The narration audio will start and then the viewpoint will animate. Press -the button again to pause the tour.

+Click the play button to start the tour. The narration audio will start and then the viewpoint will animate. Press the button again to pause the tour. -

To start again from the beginning, click the reset button to reset the tour. Then press play.

+To start again from the beginning, click the reset button to reset the tour. Then press play. -

How it works

+## How it works -
    -
  1. Create a KmlDataset with the path to a local KML file with a KML tour.
  2. -
  3. Create and load a KmlLayer with the dataset.
  4. -
  5. When the layer has loaded, search its KmlNodes by recursing through kmlLayer.getRootNodes() - to find a KmlTour node.
  6. -
  7. Create a KmlTourController and set the tour with kmlTourController.setTour(kmlTour).
  8. -
  9. Use kmltourController.play(), kmltourController.pause(), and kmltourController.reset() to control the tour.
  10. -
+1. Create a `KmlDataset` with the path to a local KML file with a KML tour. +2. Create and load a `KmlLayer` with the dataset. +3. When the layer has loaded, search its `KmlNode`s by recursing through `kmlLayer.getRootNodes()` to find a `KmlTour` node. +4. Create a `KmlTourController` and set the tour with `kmlTourController.setTour(kmlTour)`. +5. Use `kmltourController.play()`, `kmltourController.pause()`, and `kmltourController.reset()` to control the tour. -

Relevant API

+## Relevant API -
    -
  • KmlDataset
  • -
  • KmlTour
  • -
  • KmlTourController
  • -
  • KmlTourStatus
  • -
+* KmlDataset +* KmlTour +* KmlTourController +* KmlTourStatus -

About the data

+## About the data -

This sample uses a custom tour of Esri's offices created by a member of the ArcGIS Runtime SDK samples team. -Contains audio.

+This sample uses a custom tour of Esri's offices created by a member of the ArcGIS Runtime SDK samples team. Contains audio. -

Additional information

+## Additional information -

See Google's documentation for information about authoring KML tours.

+See [Google's documentation](https://developers.google.com/kml/documentation/touring) for information about authoring KML tours. -

Tags

+## Tags -

KML, tour, story, interactive, narration, play, pause, animation

+KML, tour, story, interactive, narration, play, pause, animation diff --git a/local_server/local-server-dynamic-workspace-raster/README.md b/local_server/local-server-dynamic-workspace-raster/README.md index 581b08b22b..da062e8271 100644 --- a/local_server/local-server-dynamic-workspace-raster/README.md +++ b/local_server/local-server-dynamic-workspace-raster/README.md @@ -1,42 +1,39 @@ -

Local Server Dynamic Workspace Raster

- -

Dynamically add a local raster file to a map using Local Server.

- -

Note: Local Server is not supported on MacOS

- - - -

How to use the sample

- -

A Local Server and Local Feature Service will automatically be started and once running a Feature Layer will be created and added to the map.

- -

How it works

- -

To create a RasterWorkspace and add it to a LocalMapService:

- -
    -
  1. Create and run a local server. -
    • LocalServer.INSTANCE creates a local server
    -
  2. Server.startAsync() starts the server asynchronously
  3. -
  4. Create a LocalMapService instance using an empty .MPK file (the sample uses one that is created for you). Don't start it yet.
  5. -
  6. Create the RasterWorkspace and RasterSublayerSource instances.
  7. -
  8. Add the RasterWorkspace the list of dynamic workspaces of the LocalMapService.
  9. -
  10. Start the LocalMapService -
    • localMapService.startAsync()
    -
    • Wait for server to be in the LocalServerStatus.STARTED state.
    -
    • localMapService.addStatusChangedListener() fires whenever the status of the local server has changed.
  11. -
  12. Create a ArcGISMapImageLayer using the url from the LocalMapService
  13. -
  14. Add the ArcGISMapImageSublayer to it's list of sublayers. The ArcGISMapImageSublayer points to the raster file on disk. -
  15. Finally, add the ArcGISMapImageLayer to map's list of operational layers. The raster layer appears in the map.
  16. -
- -

Relevant API

-
    -
  • ArcGISMapImageLayer
  • -
  • ArcGISMapImageSublayer
  • -
  • DynamicWorkspace
  • -
  • LocalServer
  • -
  • RasterWorkspace
  • -
  • RasterSublayerSource
  • -
  • StatusChangedEvent
  • -
+# Local Server Dynamic Workspace Raster + +Dynamically add a local raster file to a map using Local Server. + +**Note:** Local Server is not supported on MacOS + +![](LocalServerDynamicWorkspaceRaster.png) + +## How to use the sample + +A Local Server and Local Feature Service will automatically be started and once running a Feature Layer will be created and added to the map. + +## How it works + +To create a `RasterWorkspace` and add it to a `LocalMapService`: + +1. Create and run a local server. + * `LocalServer.INSTANCE` creates a local server +2. `Server.startAsync()` starts the server asynchronously +3. Create a LocalMapService instance using an empty .MPK file (the sample uses one that is created for you). Don't start it yet. +4. Create the RasterWorkspace and `RasterSublayerSource` instances. +5. Add the RasterWorkspace the list of dynamic workspaces of the LocalMapService. +6. Start the LocalMapService + * `localMapService.startAsync()` + * Wait for server to be in th. `LocalServerStatus.STARTED` state. + * `localMapService.addStatusChangedListener()` fires whenever the status of the local server has changed. +7. Create a `ArcGISMapImageLayer` using the url from the LocalMapService +8. Add the `ArcGISMapImageSublayer` to it's list of sublayers. The ArcGISMapImageSublayer points to the raster file on disk. +9. Finally, add the ArcGISMapImageLayer to map's list of operational layers. The raster layer appears in the map. + +## Relevant API + +* ArcGISMapImageLayer +* ArcGISMapImageSublayer +* DynamicWorkspace +* LocalServer +* RasterWorkspace +* RasterSublayerSource +* StatusChangedEvent diff --git a/local_server/local-server-dynamic-workspace-shapefile/README.md b/local_server/local-server-dynamic-workspace-shapefile/README.md index 6c32d4e25a..244ebb90f9 100644 --- a/local_server/local-server-dynamic-workspace-shapefile/README.md +++ b/local_server/local-server-dynamic-workspace-shapefile/README.md @@ -1,44 +1,39 @@ -

Local Server Dynamic Workspace Shapefile

- -

Dynamically add a local shapefile to a map using Local Server.

- -

Note: Local Server is not supported on MacOS

- - - -

How to use the sample

- -

A Local Server will automatically start once application is running. Select a shapefile using the Choose Shapefile button which will automatically start a Local Map Service where a Dynamic Shapefile Workspace will be set and displayed to the Map View.

- -

How it works

- -

To create a ShapefileWorkspace and add it to a LocalMapService:

- -
    -
  1. Create and run a local server. -
    • LocalServer.INSTANCE creates a local server
    • -
    • Server.startAsync() starts the server asynchronously
    -
  2. -
  3. Create a LocalMapService instance using an empty .MPK file (the sample uses one that is created for you). Don't start it yet.
  4. -
  5. Create a ShapefileWorkspace with id 'shp_wkspc' and absolute path to location of were shapefile is being stored.
  6. -
  7. Create a TableSublayerSource using shapefileWorkspace.getId() and name of shapefile with extension, example `mjrroads.shp`.
  8. -
  9. Add ShapefileWorkspace to LocalMapService.setDynamicWorkspaces().
  10. -
  11. Start the LocalMapService -
    • localMapService.startAsync()
    • -
    • localMapService.addStatusChangedListener() fires whenever the status of the local server has changed.
    -
  12. -
  13. Wait for server to be in the LocalServerStatus.STARTED state.
  14. -
  15. Create a ArcGISMapImageLayer using localMapService.getUrl()
  16. -
  17. Add the ArcGISMapImageSublayer to it's list of sublayers. The ArcGISMapImageSublayer points to the shapefile file on disk. -
  18. Once ArcGISMapImageLayer is done loading, set ArcGISMapImageSublayer to ArcGISMapImageLayer.getSublayers(). The ArcGISMapImageSublayer points to the shapefile file on disk.
  19. -
- -

Relevant API

-
    -
  • ArcGISMapImageLayer
  • -
  • ArcGISMapImageSublayer
  • -
  • DynamicWorkspace
  • -
  • LocalServer
  • -
  • ShapefileWorkspace
  • -
  • TableSublayerSource
  • -
+# Local Server Dynamic Workspace Shapefile + +Dynamically add a local shapefile to a map using Local Server. + +** Note: ** Local Server is not supported on MacOS + +![](LocalServerDynamicWorkspaceShapefile.png) + +## How to use the sample + +A Local Server will automatically start once application is running. Select a shapefile using the `Choose Shapefile` button which will automatically start a Local Map Service where a Dynamic Shapefile Workspace will be set and displayed to the Map View. + +## How it works + +To create a `ShapefileWorkspace` and add it to a `LocalMapService`: + +1. Create and run a local server. + * `LocalServer.INSTANCE` creates a local server + * `Server.startAsync()` starts the server asynchronously +2. Create a LocalMapService instance using an empty .MPK file (the sample uses one that is created for you). Don't start it yet. +3. Create a ShapefileWorkspac. with id 'shp_wkspc' and absolute path to location of were shapefile is being stored. +4. Create a `TableSublayerSource` using `shapefileWorkspace.getId()` and name of shapefile with extension, example `mjrroads.shp`. +5. Add ShapefileWorkspace to `LocalMapService.setDynamicWorkspaces()`. +6. Start the LocalMapService + * `localMapService.startAsync()` + * `localMapService.addStatusChangedListener()` fires whenever the status of the local server has changed. +7. Wait for server to be in th. `LocalServerStatus.STARTED` state. +8. Create a `ArcGISMapImageLayer` using `localMapService.getUrl()` +9. Add the `ArcGISMapImageSublayer` to it's list of sublayers. The ArcGISMapImageSublayer points to the shapefile file on disk. + * Once ArcGISMapImageLayer is done loading. set ArcGISMapImageSublayer to `ArcGISMapImageLayer.getSublayers()`. The ArcGISMapImageSublayer points to the shapefile file on disk. + +## Relevant API + +* ArcGISMapImageLayer +* ArcGISMapImageSublayer +* DynamicWorkspace +* LocalServer +* ShapefileWorkspace +* TableSublayerSource diff --git a/local_server/local-server-feature-layer/README.md b/local_server/local-server-feature-layer/README.md index 43791aa302..ae5beab999 100644 --- a/local_server/local-server-feature-layer/README.md +++ b/local_server/local-server-feature-layer/README.md @@ -1,45 +1,41 @@ -

Local Server Feature Layer

- -

Start a local feature service and display its features in a map.

- -

Note: Local Server is not supported on MacOS

- - - -

How to use the sample

- -

A Local Server and Local Feature Service will automatically be started and once running a Feature Layer will be created and added to the map.

- -

How it works

- -

To create a FeatureLayer from a LocalFeatureService:

- -
    -
  1. Create and run a local server. -
    • LocalServer.INSTANCE creates a local server
    • -
    • Server.startAsync() starts the server asynchronously
  2. -
  3. Wait for server to be in the LocalServerStatus.STARTED state. -
    • Server.addStatusChangedListener() fires whenever the status of the local server has changed.
  4. -
  5. Create and run a local feature service. -
    • new LocalFeatureService(Url), creates a local feature service with the given url path to mpk file
    • -
    • LocalFeatureService.startAsync(), starts the service asynchronously
    • -
    • service will be added to the local server automatically
  6. -
  7. Wait for feature service to be in the LocalServerStatus.STARTED state. -
    • LocalFeatureService.addStatusChangedListener() fires whenever the status of the local service has changed.
  8. -
  9. Create a feature layer from local feature service. -
    • create a ServiceFeatureTable(Url) from local feature service url, LocalFeatureService.getUrl()
    • -
    • load the table asynchronously, ServiceFeatureTable.loadAsync()
    • -
    • create feature layer from service feature table, new FeatureLayer(ServiceFeatureTable)
    • -
    • load the layer asynchronously, FeatureLayer.loadAsync()
  10. -
  11. Add feature layer to map, Map.getOperationalLayers().add(FeatureLayer).
  12. -
- -

Relevant API

-
    -
  • FeatureLayer
  • -
  • LocalFeatureService
  • -
  • LocalServer
  • -
  • LocalServerStatus
  • -
  • StatusChangedEvent
  • -
+# Local Server Feature Layer +Start a local feature service and display its features in a map. + +**Note:** Local Server is not supported on MacOS + +![](LocalServerFeatureLayer.png) + +## How to use the sample + +A Local Server and Local Feature Service will automatically be started and once running a Feature Layer will be created and added to the map. + +## How it works + +To create a `FeatureLayer` from a `LocalFeatureService`: + +1. Create and run a local server. + * `LocalServer.INSTANCE` creates a local server + * `Server.startAsync()` starts the server asynchronously +2. Wait for server to be in th. `LocalServerStatus.STARTED` state. + * `Server.addStatusChangedListener()` fires whenever the status of the local server has changed. +3. Create and run a local feature service. + * `new LocalFeatureService(Url)`, creates a local feature service with the given url path to mpk file + * `LocalFeatureService.startAsync()`, starts the service asynchronously + * service will be added to the local server automatically +4. Wait for feature service to be in th. `LocalServerStatus.STARTED` state. + * `LocalFeatureService.addStatusChangedListener()` fires whenever the status of the local service has changed. +5. Create a feature layer from local feature service. + * create a `ServiceFeatureTable(Url)` from local feature service url, `LocalFeatureService.getUrl()` + * load the table asynchronously, `ServiceFeatureTable.loadAsync()` + * create feature layer from service feature table, `new FeatureLayer(ServiceFeatureTable)` + * load the layer asynchronously, `FeatureLayer.loadAsync()` +6. Add feature layer to map, `Map.getOperationalLayers().add(FeatureLayer)`. + +## Relevant API + +* FeatureLayer +* LocalFeatureService +* LocalServer +* LocalServerStatus +* StatusChangedEvent diff --git a/local_server/local-server-geoprocessing/README.md b/local_server/local-server-geoprocessing/README.md index 710860e78f..42aacd5c2f 100644 --- a/local_server/local-server-geoprocessing/README.md +++ b/local_server/local-server-geoprocessing/README.md @@ -1,76 +1,54 @@ -

Local Server Geoprocessing

- -

Create contour lines from local raster data and Local Server.

- -

This is accomplished using a local geoprocessing package (.gpk) and the contour geoprocessing tool.

- -

Note: Local Server is not supported on MacOS

- -

- -

How to use the sample

- -

Contour Line Controls (Top Left):

-
  • Interval-- Specifies the spacing between contour lines.
  • -
  • Generate Contours -- Adds contour lines to map using interval.
  • -
  • Clear Results -- Removes contour lines from map.
- -

How it works

- -

To start a GeoprocessingTask that generates contour lines from raster data:

- -
    -
  1. Add raster data to map using as an ArcGISTiledLayer.
  2. -
  3. Create and run a LocalServer. -
      -
    • LocalServer.INSTANCE creates a local server
    • -
    • Server.startAsync() starts the server asynchronously
    • -
    -
  4. -
  5. Wait for server to be in the LocalServerStatus.STARTED state. -
      -
    • Server.addStatusChangedListener() fires whenever the running status of the local server has changed.
    • -
    -
  6. -
  7. Start a LocalGeoprocessingService and run a GeoprocessingTask. -
      -
    • new LocalGeoprocessingService(Url, ServiceType), creates a local geoprocessing service
    • -
    • LocalGeoprocessingService.startAsync() starts the geoprocessing service asynchronously
    • -
    • new GeoprocessingTask(LocalGeoprocessingService.getUrl() + "/Contour"), creates a geoprocessing task that uses the contour lines tool
    • -
    -
  8. -
  9. Create GeoprocessingParameters and add a GeoprocessingDouble as a parameter using set interval. -
      -
    • new GeoprocessingParameters(ExecutionType), creates geoprocess parameters
    • -
    • GeoprocessingParameters.getInputs().put("Interval", new GeoprocessingDouble(double)), creates a parameter with name `Interval` with the interval set as its value.
    • -
    -
  10. -
  11. Create and start a GeoprocessingJob using the parameters from above. -
      -
    • GeoprocessingTask.createJob(GeoprocessingParameters), creates a geoprocessing job
    • -
    • GeoprocessingJob.start(), starts job
    • -
    -
  12. -
  13. Add contour lines as an ArcGISMapImageLayer to map. -
      -
    • get url from local geoprocessing service, LocalGeoprocessingService.getUrl()
    • -
    • get server job id of geoprocessing job, GeoprocessingJob.getServerJobId()
    • -
    • replace `GPServer` from url with `MapServer/jobs/jobId`, to get generate contour lines data
    • -
    • create a map image layer from that new url and add that layer to the map
    • -
    -
  14. -
- -

Relevant API

- -
    -
  • GeoprocessingDouble
  • -
  • GeoprocessingJob
  • -
  • GeoprocessingParameter
  • -
  • GeoprocessingParameters
  • -
  • GeoprocessingTask
  • -
  • LocalGeoprocessingService
  • -
  • LocalGeoprocessingService.ServiceType
  • -
  • LocalServer
  • -
  • LocalServerStatus
  • -
+# Local Server Geoprocessing + +Create contour lines from local raster data and Local Server. + +This is accomplished using a local geoprocessing package (.gpk) and the contour geoprocessing tool. + +**Note:** Local Server is not supported on MacOS + +![](LocalServerGeoprocessing.png) + +## How to use the sample + +Contour Line Controls (Top Left): +* Interval-- Specifies the spacing between contour lines. +* Generate Contours -. Adds contour lines to map using interval. +* Clear Results -. Removes contour lines from map. + +## How it works + +To start a `GeoprocessingTask` that generates contour lines from raster data: + +1. Add raster data to map using as an `ArcGISTiledLayer`. +2. Create and run a `LocalServer`. + * `LocalServer.INSTANCE` creates a local server + * `Server.startAsync()` starts the server asynchronously +3. Wait for server to be in the `LocalServerStatus.STARTED` state. + * `Server.addStatusChangedListener()` fires whenever the running status of the local server has changed. +4. Start a `LocalGeoprocessingService` and run a `GeoprocessingTask`. + * `new LocalGeoprocessingService(Url, ServiceType)`, creates a local geoprocessing service + * `LocalGeoprocessingService.startAsync()` starts the geoprocessing service asynchronously + * `new GeoprocessingTask(LocalGeoprocessingService.getUrl() + "/Contour")`, creates a geoprocessing task that uses the contour lines tool +5. Create `GeoprocessingParameters` and add a `GeoprocessingDouble` as a parameter using set interval. + * `new GeoprocessingParameters(ExecutionType)`, creates geoprocess parameters + * `GeoprocessingParameters.getInputs().put("Interval", new GeoprocessingDouble(double))`, creates a parameter with name `Interval` with the interval set as its value. +6. Create and start a `GeoprocessingJob` using the parameters from above. + * `GeoprocessingTask.createJob(GeoprocessingParameters)`, creates a geoprocessing job + * `GeoprocessingJob.start()`, starts job +7. Add contour lines as an `ArcGISMapImageLayer` to map. + * get url from local geoprocessing service, `LocalGeoprocessingService.getUrl()` + * get server job id of geoprocessing job, `GeoprocessingJob.getServerJobId()` + * replace `GPServer` from url with `MapServer/jobs/jobId`, to get generate contour lines data + * create a map image layer from that new url and add that layer to the map + +## Relevant API + +* GeoprocessingDouble +* GeoprocessingJob +* GeoprocessingParameter +* GeoprocessingParameters +* GeoprocessingTask +* LocalGeoprocessingService +* LocalGeoprocessingService.ServiceType +* LocalServer +* LocalServerStatus diff --git a/local_server/local-server-map-image-layer/README.md b/local_server/local-server-map-image-layer/README.md index 9a8b1fd5ef..20805b2e19 100644 --- a/local_server/local-server-map-image-layer/README.md +++ b/local_server/local-server-map-image-layer/README.md @@ -1,43 +1,39 @@ -

Local Server Map Image Layer

+# Local Server Map Image Layer -

Create a local map imagery service and show its tiles in a map.

+Create a local map imagery service and show its tiles in a map. -

Note: Local Server is not supported on MacOS

+**Note:** Local Server is not supported on MacOS - +![](LocalServerMapImageLayer.png) -

How to use the sample

+## How to use the sample -

A Local Server and Local Map Service will automatically be started and once running a Map Image Layer will be created and added to the map.

+A Local Server and Local Map Service will automatically be started and once running a Map Image Layer will be created and added to the map. -

How it works

+## How it works -

To create a ArcGISMapImageLayer from a LocalMapService:

+To create a `ArcGISMapImageLayer` from a `LocalMapService`: -
    -
  1. Create and run a local server. -
    • LocalServer.INSTANCE creates a local server
    • -
    • Server.startAsync() starts the server asynchronously
  2. -
  3. Wait for server to be in the LocalServerStatus.STARTED state. -
    • Server.addStatusChangedListener() fires whenever the status of the local server has changed.
  4. -
  5. Create and run a local map service. -
    • new LocalMapService(Url), creates a local map service with the given url path to mpk file
    • -
    • LocalMapService.startAsync(), starts the service asynchronously
    • -
    • service will be added to the local server automatically
  6. -
  7. Wait for map service to be in the LocalServerStatus.STARTED state. -
    • LocalMapService.addStatusChangedListener() fires whenever the status of the local service has changed.
  8. -
  9. Create a map image layer from local map service. -
    • create a new ArcGISMapImageLayer(Url) from local map service url, LocalMapService.getUrl()
    • -
    • load the layer asynchronously, ArcGISMapImageLayer.loadAsync()
  10. -
  11. Add map image layer to map, Map.getOperationalLayers().add(ArcGISMapImageLayer).
  12. -
+1. Create and run a local server. + * `LocalServer.INSTANCE` creates a local server + * `Server.startAsync()` starts the server asynchronously +2. Wait for server to be in th. `LocalServerStatus.STARTED` state. + * `Server.addStatusChangedListener()` fires whenever the status of the local server has changed. +3. Create and run a local map service. + * `new LocalMapService(Url)`, creates a local map service with the given url path to mpk file + * `LocalMapService.startAsync()`, starts the service asynchronously + * service will be added to the local server automatically +4. Wait for map service to be in th. `LocalServerStatus.STARTED` state. + * `LocalMapService.addStatusChangedListener()` fires whenever the status of the local service has changed. +5. Create a map image layer from local map service. + * create a `new ArcGISMapImageLayer(Url)` from local map service url, `LocalMapService.getUrl()` + * load the layer asynchronously, `ArcGISMapImageLayer.loadAsync()` +6. Add map image layer to map, `Map.getOperationalLayers().add(ArcGISMapImageLayer)`. -

Relevant API

-
    -
  • ArcGISMapImageLayer
  • -
  • LocalMapService
  • -
  • LocalServer
  • -
  • LocalServerStatus
  • -
  • StatusChangedEvent
  • -
+## Relevant API +* ArcGISMapImageLayer +* LocalMapService +* LocalServer +* LocalServerStatus +* StatusChangedEvent diff --git a/local_server/local-server-services/README.md b/local_server/local-server-services/README.md index 6151d8eedb..7fea2e56c3 100644 --- a/local_server/local-server-services/README.md +++ b/local_server/local-server-services/README.md @@ -1,45 +1,38 @@ -

Local Server Services

+# Local Server Services -

Manage multiple running services in Local Server.

+Manage multiple running services in Local Server. -

Note: Local Server is not supported on MacOS

+**Note:** Local Server is not supported on MacOS -

+![](LocalServerServices.png) -

How to use the sample

+## How to use the sample -

Choose an option from the dropdown control to filter packages by service type. Then click the Open button to -choose a package. Finally, click the Start button to start the service. The service's status will be displayed in -the center log.

+Choose an option from the dropdown control to filter packages by service type. Then click the Open button to choose a package. Finally, click the Start button to start the service. The service's status will be displayed in the center log. -

To stop a service, select it from the Running Services list and click the Stop Service button. To go to the -service's URL in your default web browser, select it and click the Go to URL button.

+To stop a service, select it from the Running Services list and click the Stop Service button. To go to the service's URL in your default web browser, select it and click the Go to URL button. -

How it works

+## How it works -

To start a LocalService:

+To start a `LocalService`: -
    -
  1. Start the local server. -
    • LocalServer.INSTANCE creates a local server
    • -
    • server.startAsync() starts the server asynchronously
  2. -
  3. Wait for server to be in the LocalServerStatus.STARTED state. -
    • Server.addStatusChangedListener() fires whenever the running status of the local server -changes
  4. -
  5. Create and run a local service. -
    • new LocalMapService(Url) creates a local map service with the given url path to mpk file
    • -
    • service.startAsync() starts the service asynchronously
  6. -
  7. Stop the service with service.stopAsync().
  8. -
+1. Start the local server. + * `LocalServer.INSTANCE` creates a local server + * `server.startAsync()` starts the server asynchronously +2. Wait for server to be in th. `LocalServerStatus.STARTED` state. + * `Server.addStatusChangedListener()` fires whenever the running status of the local server +changes +3. Create and run a local service. + * `new LocalMapService(Url)` creates a local map service with the given url path to mpk file + * `service.startAsync()` starts the service asynchronously +4. Stop the service with `service.stopAsync().` -

Relevant API

+## Relevant API -
    -
  • LocalFeatureService
  • -
  • LocalGeoprocessingService
  • -
  • LocalMapService
  • -
  • LocalServer
  • -
  • StatusChangedEvent
  • -
  • LocalServerStatus
  • -
  • LocalService
  • -
+* LocalFeatureService +* LocalGeoprocessingService +* LocalMapService +* LocalServer +* StatusChangedEvent +* LocalServerStatus +* LocalService diff --git a/map/access-load-status/README.md b/map/access-load-status/README.md index 61772a4c22..8cc1136b40 100644 --- a/map/access-load-status/README.md +++ b/map/access-load-status/README.md @@ -1,28 +1,24 @@ -

Access Load Status

+# Access Load Status -

Determine when a map has finished loading.

+Determine when a map has finished loading. -

+![](AccessLoadStatus.png) -

How to use the sample

+## How to use the sample -

The sample provides an information area which displays what the ArcGISMap's load status is. Click on the button to reload the ArcGISMap.

+The sample provides an information area which displays what the ArcGISMap's load status is. Click on the button to reload the ArcGISMap. -

How it works

+## How it works -

To access the ArcGISMap's LoadStatus:

+To access the `ArcGISMap`'s `LoadStatus`: -
    -
  1. Create an ArcGIS map.
  2. -
  3. Use ArcGISMap.addLoadStatusChangedListener() and ArcGISMap.getNewLoadStatus() to display the load status of the map.
  4. -
  5. Set the ArcGIS map to the MapView to began loading.
  6. -
+1. Create an ArcGIS map. +2. Use `ArcGISMap.addLoadStatusChangedListener()` and `ArcGISMap.getNewLoadStatus()` to display the load status of the map. +3. Set the ArcGIS map to the `MapView` to began loading. -

Relevant API

+## Relevant API -
    -
  • ArcGISMap
  • -
  • Basemap
  • -
  • MapView
  • -
  • LoadStatus
  • -
\ No newline at end of file +* ArcGISMap +* Basemap +* MapView +* LoadStatus diff --git a/map/change-basemap/README.md b/map/change-basemap/README.md index 9be618acd6..882440723e 100644 --- a/map/change-basemap/README.md +++ b/map/change-basemap/README.md @@ -1,33 +1,29 @@ -

Change Basemap

+# Change Basemap -

Change a map's basemap.

+Change a map's basemap. -

A basemap is beneath all other layers on an ArcGISMap and is used to provide visual reference to other layers.

+A basemap is beneath all other layers on an ArcGISMap and is used to provide visual reference to other layers. -

+![](ChangeBasemap.png) -

How to use the sample

+## How to use the sample -

Choose any basemap from the list view.

+Choose any basemap from the list view. -

How it works

+## How it works -

To change the ArcGISMap's Basemap:

+To change the `ArcGISMap`'s `Basemap`: -
    -
  1. Create an ArcGIS map, ArcGISMap(Basemap, latitude, longitude, scale). -
    • Basemap, use basemap type to access a basemap for map, Basemap.Type.NATIONAL_GEOGRAPHIC
    • -
    • latitude and longitude coordinate location
    • -
    • scale, level of detail displayed on MapView
  2. -
  3. Set the ArcGIS map to the map view.
  4. -
  5. Choose a new Basemap.Type and set it to the ArcGIS map to change it.
  6. -
+1. Create an ArcGIS map, `ArcGISMap(Basemap, latitude, longitude, scale)`. + * Basemap, use basemap type to access a basemap for map, `Basemap.Type.NATIONAL_GEOGRAPHIC` + * latitude and longitude coordinate location + * scale, level of detail displayed on `MapView` +2. Set the ArcGIS map to the map view. +3. Choose a new `Basemap.Type` and set it to the ArcGIS map to change it. -

Relevant API

+## Relevant API -
    -
  • ArcGISMap
  • -
  • Basemap
  • -
  • Basemap.Type
  • -
  • MapView
  • -
+* ArcGISMap +* Basemap +* Basemap.Type +* MapView diff --git a/map/create-and-save-map/README.md b/map/create-and-save-map/README.md index 2a7c42928a..b2308268ea 100644 --- a/map/create-and-save-map/README.md +++ b/map/create-and-save-map/README.md @@ -1,47 +1,40 @@ -

Create and Save Map

+# Create and Save Map -

Create and save a map to your own portal.

+Create and save a map to your own portal. -

+![](CreateAndSaveMap.png) -

How to use the sample

+## How to use the sample -

This sample requires you to setup your own app on arcgis.com. See the wiki for details.

+This sample requires you to setup your own app on arcgis.com. See the [wiki](https://github.com/Esri/arcgis-runtime-samples-java/wiki/OAuth) for details. -

Fill in your portal and registered app credentials in the starting dialog to authenticate. Then, choose -the basemap and layers for your new map. To save the map, choose a title, tags and description (optional), and a folder -on your portal (you will need to create one in your portal's My Content). Click the Save button to save the map to the -chosen folder.

+Fill in your portal and registered app credentials in the starting dialog to authenticate. Then, choose the basemap and layers for your new map. To save the map, choose a title, tags and description (optional), and a folder on your portal (you will need to create one in your portal's My Content). Click the Save button to save the map to the chosen folder. -

How it works

+## How it works -

To create and save a map to your portal for use in an app:

-
    -
  1. Create an ArcGISMap with a Basemap and operational layers
  2. -
  3. Create an OAuthConfiguration with your portal and app credential.
  4. -
  5. Add the configuration to the AuthenticationMangager
  6. -
  7. Create a Portal and load it. Use a custom AuthenticationChallengeHandler to - authenticate with your username and password
  8. -
  9. Once authenticated, save the map by calling map.saveMapAsAsync(), passing in the title, tags, - description, and portal folder
  10. -
+To create and save a map to your portal for use in an app: -

Relevant API

+1. Create an `ArcGISMap` with a `Basemap` and operational layers +2. Create an `OAuthConfiguration` with your portal and app credential. +3. Add the configuration to the `AuthenticationMangager` +4. Create a `Portal` and load it. Use a custom `AuthenticationChallengeHandler` to + authenticate with your username and password +5. Once authenticated, save the map by calling `map.saveMapAsAsync()`, passing in the title, tags, + description, and portal folder -
    -
  • AuthenticationChallengeHandler
  • -
  • ArcGISMap
  • -
  • ArcGISMapImageLayer
  • -
  • Basemap
  • -
  • MapView
  • -
  • OAuthConfiguration
  • -
  • Portal
  • -
  • PortalFolder
  • -
  • PortalItem
  • -
  • PortalUserContent
  • -
+## Relevant API +* AuthenticationChallengeHandler +* ArcGISMap +* ArcGISMapImageLayer +* Basemap +* MapView +* OAuthConfiguration +* Portal +* PortalFolder +* PortalItem +* PortalUserContent -

Additional information

+## Additional information -

The JavaFX WebEngine used in the OAuthChallengeHandler in this sample may not support rendering of some modern web elements returned by the AuthorizationURL. For this reason, we append &display=classic to the authorization URL, to ensure it renders properly.

\ No newline at end of file +The JavaFX `WebEngine` used in the `OAuthChallengeHandler` in this sample may not support rendering of some modern web elements returned by the `AuthorizationURL`. For this reason, we append `&display=classic` to the authorization URL, to ensure it renders properly. diff --git a/map/display-map/README.md b/map/display-map/README.md index 3620eddea4..8a521f39cd 100644 --- a/map/display-map/README.md +++ b/map/display-map/README.md @@ -1,23 +1,18 @@ -

Display a Map

+# Display a Map -

Display a map with some imagery.

+Display a map with some imagery. -

+![](DisplayMap.png) -

How it works

+## How it works -

To display a ArcGISMap:

+To display a `ArcGISMap`: -
    -
  1. Create an ArcGIS map using a default Basemap such use Basemap.createImagery().
  2. -
  3. Set the map to the map view, MapView.setMap().
  4. -
+1. Create an ArcGIS map using a default `Basemap` such use `Basemap.createImagery()`. +2. Set the map to the map view, `MapView.setMap()`. -

Relevant API

- -
    -
  • ArcGISMap
  • -
  • Basemap
  • -
  • MapView
  • -
+## Relevant API +* ArcGISMap +* Basemap +* MapView diff --git a/map/generate-offline-map-overrides/README.md b/map/generate-offline-map-overrides/README.md index 31261582aa..3cd2171355 100644 --- a/map/generate-offline-map-overrides/README.md +++ b/map/generate-offline-map-overrides/README.md @@ -1,94 +1,71 @@ -

Generate Offline Map (Overrides)

- -

Take a web map offline with additional options for each layer.

- -

For applications where you just need to take all layers offline, use the standard workflow (using only -GenerateOfflineMapParameters). For a simple example of how you take a map offline, see the "Generate Offline Map" -sample. For more fine-grained control over the data you are taking offline, use overrides to adjust the settings for - each layer. Some example use cases for the overrides approach could be when you need to:

- -
    -
  • adjust the extent for one or more layers to be different to the rest of the map.
  • -
  • reduce the amount of data (such as tiles) downloaded for one or more layers in the map.
  • -
  • filter features to be taken offline.
  • -
  • take features with no geometry offline.
  • -
- -

- -

How to use the sample

- -Note: When manually inputting a value in the spinner controls, make sure to hit Enter to commit the value. - -

Sign in with a free developer account when prompted for credentials (taking web maps offline requires an account).

- -

Use the min/max scale spinners to adjust the level IDs to be taken offline for the Streets basemap.

- -

Use the extent buffer distance spinner to set the buffer radius for the streets basemap.

- -

Check the checkboxes for the feature operational layers you want to include in the offline map.

- -

Use the min hydrant flow rate spinner to only download features with a flow rate higher than this value.

- -

Select the "Water Pipes" checkbox if you want to crop the water pipe features to the extent of the map.

- -

Click the "Generate offline map" button to start the download. A progress bar will display. Click the "Cancel" button - if you want to stop the download. When the download is complete, the view will display the offline map. Pan around - to see that it is cropped to the download area's extent.

- -

How it works

-
    -
  1. Load a web map from a PortalItem. Authenticate with the portal if required.
  2. -
  3. Create an OfflineMapTask with the map.
  4. -
  5. Generate default task parameters using the extent area you want to download with offlineMapTask.createDefaultGenerateOfflineMapParametersAsync(extent).
  6. -
  7. Generate additional "override" parameters using the default parameters with offlineMapTask.createGenerateOfflineMapParameterOverridesAsync(parameters).
  8. -
  9. For the basemap: -
      -
    • Get the parameters OfflineMapParametersKey for the basemap layer.
    • -
    • Get the ExportTileCacheParameters for the basemap layer with overrides.getExportTileCacheParameters().get(basemapParamKey).
    • -
    • Set the level IDs you want to download with exportTileCacheParameters.getLevelIDs().add(levelID).
    • -
    • To buffer the extent, use exportTileCacheParameters.setAreaOfInterest(bufferedGeometry) where bufferedGeometry - can be calculated with the GeometryEngine.
    • -
    -
  10. -
  11. To remove operational layers from the download: -
      -
    • Create a OfflineParametersKey with the operational layer.
    • -
    • Get the generate geodatabase layer options using the key with List<GenerateLayerOption> layerOptions = overrides.getGenerateGeodatabaseParameters().get(key).getLayerOptions();
    • -
    • Loop through each GenerateLayerOption in the the list, and remove it if the layer - option's ID matches the layer's ID.
    • -
    -
  12. -
  13. To filter the features downloaded in an operational layer: -
      -
    • Get the layer options for the operational layer using the directions in step 6.
    • -
    • Loop through the layer options. If the option layerID matches the layer's ID, set the filter clause with - layerOption.setWhereClause(sqlQueryString) and set the query option with layerOption.setQueryOption(GenerateLayerOption.QueryOption.USE_FILTER). -
    • -
    -
  14. -
  15. To not crop a layer's features to the extent of the offline map (default is true): -
      -
    • Set layerOption.setUseGeometry(false).
    • -
    -
  16. -
  17. Create a GenerateOfflineMapJob with offlineMapTask.generateOfflineMap(parameters, downloadPath, overrides). Start the job with job.start(). -
  18. -
  19. When the job is done, get a reference to the offline map with job.getResult.getOfflineMap().
  20. -
- -

Relevant API

-
    -
  • ExportTileCacheParameters
  • -
  • GenerateGeodatabaseParameters
  • -
  • GenerateLayerOption
  • -
  • GenerateOfflineMapJob
  • -
  • GenerateOfflineMapParameterOverrides
  • -
  • GenerateOfflineMapParameters
  • -
  • GenerateOfflineMapResult
  • -
  • OfflineMapParametersKey
  • -
  • OfflineMapTask
  • -
- -

Tags

-

Offline

\ No newline at end of file +# Generate Offline Map (Overrides) + +Take a web map offline with additional options for each layer. + +For applications where you just need to take all layers offline, use the standard workflow (using only `GenerateOfflineMapParameters`). For a simple example of how you take a map offline, see the "Generate Offline Map" sample. For more fine-grained control over the data you are taking offline, use overrides to adjust the settings for each layer. Some example use cases for the overrides approach could be when you need to: + +* adjust the extent for one or more layers to be different to the rest of the map. +* reduce the amount of data (such as tiles) downloaded for one or more layers in the map. +* filter features to be taken offline. +* take features with no geometry offline. + +![](GenerateOfflineMapOverrides.png) + +## How to use the sample + +**Note: When manually inputting a value in the spinner controls, make sure to hit Enter to commit the value.** + +Sign in with a free developer account when prompted for credentials (taking web maps offline requires an account). + +Use the min/max scale spinners to adjust the level IDs to be taken offline for the Streets basemap. + +Use the extent buffer distance spinner to set the buffer radius for the streets basemap. + +Check the checkboxes for the feature operational layers you want to include in the offline map. + +Use the min hydrant flow rate spinner to only download features with a flow rate higher than this value. + +Select the "Water Pipes" checkbox if you want to crop the water pipe features to the extent of the map. + +Click the "Generate offline map" button to start the download. A progress bar will display. Click the "Cancel" button if you want to stop the download. When the download is complete, the view will display the offline map. Pan around to see that it is cropped to the download area's extent. + +# How it works + +1. Load a web map from a `PortalItem`. Authenticate with the portal if required. +2. Create an `OfflineMapTask` with the map. +3. Generate default task parameters using the extent area you want to download with `offlineMapTask.createDefaultGenerateOfflineMapParametersAsync(extent)`. +4. Generate additional "override" parameters using the default parameters with `offlineMapTask.createGenerateOfflineMapParameterOverridesAsync(parameters)`. +5. For the basemap: + * Get the parameters `OfflineMapParametersKey` for the basemap layer. + * Get the `ExportTileCacheParameters` for the basemap layer with `overrides.getExportTileCacheParameters().get(basemapParamKey)`. + * Set the level IDs you want to download with `exportTileCacheParameters.getLevelIDs().add(levelID)`. + * To buffer the extent, use `exportTileCacheParameters.setAreaOfInterest(bufferedGeometry)` where bufferedGeometry can be calculated with the `GeometryEngine`. +6. To remove operational layers from the download: + * Create a `OfflineParametersKey` with the operational layer. + * Get the generate geodatabase layer options using the key with `List<GenerateLayerOption> layerOptions = overrides.getGenerateGeodatabaseParameters().get(key).getLayerOptions();` + * Loop through each `GenerateLayerOption` in the the list, and remove it if the layer +. option's ID matches the layer's ID. +7. To filter the features downloaded in an operational layer: + * Get the layer options for the operational layer using the directions in step 6. + * Loop through the layer options. If the option layerID matches the layer's ID. set the filter clause with + `layerOption.setWhereClause(sqlQueryString)` and set the query option with `layerOption.setQueryOption(GenerateLayerOption.QueryOption.USE_FILTER)`. +8. To not crop a layer's features to the extent of the offline map (default is true): + * Set `layerOption.setUseGeometry(false)`. +9. Create a `GenerateOfflineMapJob` with `offlineMapTask.generateOfflineMap(parameters, downloadPath, overrides)`. Start the job with `job.start()`. +10. When the job is done, get a reference to the offline map with `job.getResult.getOfflineMap()`. + +## Relevant API + +* ExportTileCacheParameters +* GenerateGeodatabaseParameters +* GenerateLayerOption +* GenerateOfflineMapJob +* GenerateOfflineMapParameterOverrides +* GenerateOfflineMapParameters +* GenerateOfflineMapResult +* OfflineMapParametersKey +* OfflineMapTask + +## Tags + +Offline diff --git a/map/generate-offline-map-with-local-basemap/README.md b/map/generate-offline-map-with-local-basemap/README.md index 1ecfcac976..e650f258da 100644 --- a/map/generate-offline-map-with-local-basemap/README.md +++ b/map/generate-offline-map-with-local-basemap/README.md @@ -1,75 +1,48 @@ -

Generate offline map with local basemap

+# Generate offline map with local basemap -

Take a web map offline, but instead of downloading an online basemap, use one which is already on the device.

+Take a web map offline, but instead of downloading an online basemap, use one which is already on the device. -

+![](GenerateOfflineMapWithLocalBasemap.png) -

Use case

+## Use case -

There are a number of use-cases where you may wish to use a basemap which is already on the device, rather than downloading:

+There are a number of use-cases where you may wish to use a basemap which is already on the device, rather than downloading: -
    -
  • You want to limit the total download size.
  • +* You want to limit the total download size. +* You want to be able to share a single set of basemap files between many offline maps. +* You want to use a custom basemap (for example authored in ArcGIS Pro) which is not available online. +* You do not wish to sign into ArcGIS.com in order to download Esri basemaps. -
  • You want to be able to share a single set of basemap files between many offline maps.
  • +The author of a web map can support the use of basemaps which are already on a device by configuring the web map to specify the name of a suitable basemap file. This could be a basemap which: -
  • You want to use a custom basemap (for example authored in ArcGIS Pro) which is not available online.
  • +* Has been authored in ArcGIS Pro to make use of your organizations custom data. +* Is available as a PortalItem which can be downloaded once and re-used many times. -
  • You do not wish to sign into ArcGIS.com in order to download Esri basemaps.
  • -
+## How to use the sample -

The author of a web map can support the use of basemaps which are already on a device by configuring the web map to specify the name of a suitable basemap file. This could be a basemap which:

+1. Click on the "Take Map Offline" button. +2. You will be prompted to choose whether you wish to use the "naperville_imagery.tpk" basemap (already saved in the samples-data directory) or to download the online basemap. +3. If you choose to download the online basemap, the offline map will be generated with the same (topographic) basemap as the online web map. To download the Esri basemap, you may be prompted to sign in to ArcGIS.com. +4. If you choose to use the basemap from the device, the offline map will be generated with the local imagery basemap i.e. no tiles are exported or downloaded. Since the application is not exporting online ArcGIS Online basemaps you will not need to log-in. -
    -
  • Has been authored in ArcGIS Pro to make use of your organizations custom data.
  • +## How it works -
  • Is available as a PortalItem which can be downloaded once and re-used many times.
  • -
+1. Create an `ArcGISMap` with a portal item pointing to the web map. +2. Create `GenerateOfflineMapParameters` specifying the download area geometry, min scale, and max scale. +3. Once the generate offline map parameters are created, check the `getReferenceBasemapFilename()` property. The author of an online web map can configure this setting to indicate the name of a suitable basemap. In this sample, the app checks the local device for the suggested "naperville_imagery.tpk" file. +4. If the user chooses to use the basemap on the device, use `setReferenceBasemapDirectory()` on the generate offline map parameters to set the absolute path of the directory which contains the .tpk file. If this property is set, no online basemap will be downloaded and instead, the mobile map will be created with a reference to the .tpk on the device. +5. A `GenerateOfflineMapJob` is created by calling `offlineMapTask.generateOfflineMap` passing the parameters and the download location for the offline map. +6. Create the offline map job and start it. +7. When the job is done, use `getOfflineMap` on the `GenerateOfflineMapResult` object to get the map. -

How to use the sample

+## Relevant API -
    -
  1. Click on the "Take Map Offline" button.
  2. +* OfflineMapTask +* GenerateOfflineMapParameters +* GenerateOfflineMapParameterOverrides +* GenerateOfflineMapJob +* GenerateOfflineMapResult -
  3. You will be prompted to choose whether you wish to use the "naperville_imagery.tpk" basemap (already saved in the samples-data directory) or to download the online basemap.
  4. +## Tags -
  5. If you choose to download the online basemap, the offline map will be generated with the same (topographic) basemap as the online web map. To download the Esri basemap, you may be prompted to sign in to ArcGIS.com.
  6. - -
  7. If you choose to use the basemap from the device, the offline map will be generated with the local imagery basemap i.e. no tiles are exported or downloaded. Since the application is not exporting online ArcGIS Online basemaps you will not need to log-in.
  8. -
- -

How it works

- -
    -
  1. Create an ArcGISMap with a portal item pointing to the web map.
  2. - -
  3. Create GenerateOfflineMapParameters specifying the download area geometry, min scale, and max scale.
  4. - -
  5. Once the generate offline map parameters are created, check the getReferenceBasemapFilename() property. The author of an online web map can configure this setting to indicate the name of a suitable basemap. In this sample, the app checks the local device for the suggested "naperville_imagery.tpk" file.
  6. - -
  7. If the user chooses to use the basemap on the device, use setReferenceBasemapDirectory() on the generate offline map parameters to set the absolute path of the directory which contains the .tpk file. If this property is set, no online basemap will be downloaded and instead, the mobile map will be created with a reference to the .tpk on the device.
  8. - -
  9. A GenerateOfflineMapJob is created by calling offlineMapTask.generateOfflineMap passing the parameters and the download location for the offline map.
  10. - -
  11. Create the offline map job and start it.
  12. - -
  13. When the job is done, use getOfflineMap on the GenerateOfflineMapResult object to get the map.
  14. -
- -

Relevant API

- -
    -
  • OfflineMapTask
  • - -
  • GenerateOfflineMapParameters
  • - -
  • GenerateOfflineMapParameterOverrides
  • - -
  • GenerateOfflineMapJob
  • - -
  • GenerateOfflineMapResult
  • -
- -

Tags

- -

offline, local basemap, OfflineMapTask

\ No newline at end of file +offline, local basemap, OfflineMapTask diff --git a/map/generate-offline-map/README.md b/map/generate-offline-map/README.md index a7cadbaded..2f4b5410f6 100644 --- a/map/generate-offline-map/README.md +++ b/map/generate-offline-map/README.md @@ -1,30 +1,26 @@ -

Generate Offline Map

+# Generate Offline Map -

Take an extent of a web map offline.

+Take an extent of a web map offline. -

+![](GenerateOfflineMap.png) -

How to use the sample

+## How to use the sample -

When the app starts, you will be prompted to sign in using a free ArcGIS Online account. Once the map loads, zoom to the extent you want to take offline. The red border shows the extent that will be downloaded. Click the "Take Map Offline" button to start the offline map job. The progress bar will show the job's progress. When complete, the offline map will replace the online map in the map view.

+When the app starts, you will be prompted to sign in using a free ArcGIS Online account. Once the map loads, zoom to the extent you want to take offline. The red border shows the extent that will be downloaded. Click the "Take Map Offline" button to start the offline map job. The progress bar will show the job's progress. When complete, the offline map will replace the online map in the map view. -

How it works

+## How it works -

To take a web map offline:

+To take a web map offline: -
    -
  1. Create an ArcGISMap with a portal item pointing to the web map.
  2. -
  3. Create GenerateOfflineMapParameters specifying the download area geometry, min scale, and max scale.
  4. -
  5. Create an OfflineMapTask with the map.
  6. -
  7. Create the offline map job with task.generateOfflineMap(params, downloadDirectoryPath) and start it with job.start().
  8. -
  9. When the job is done, get the offline map with job.getResult().getOfflineMap().
  10. -
+1. Create an `ArcGISMap` with a portal item pointing to the web map. +2. Create `GenerateOfflineMapParameters` specifying the download area geometry, min scale, and max scale. +3. Create an `OfflineMapTask` with the map. +4. Create the offline map job with `task.generateOfflineMap(params, downloadDirectoryPath)` and start it with `job.start()`. +5. When the job is done, get the offline map with `job.getResult().getOfflineMap()`. -

Relevant API

+## Relevant API -
    -
  • GenerateOfflineMapJob
  • -
  • GenerateOfflineMapParameters
  • -
  • GenerateOfflineMapResult
  • -
  • OfflineMapTask
  • -
\ No newline at end of file +* GenerateOfflineMapJob +* GenerateOfflineMapParameters +* GenerateOfflineMapResult +* OfflineMapTask diff --git a/map/manage-bookmarks/README.md b/map/manage-bookmarks/README.md index 861c074c7e..322bdf4269 100644 --- a/map/manage-bookmarks/README.md +++ b/map/manage-bookmarks/README.md @@ -1,43 +1,37 @@ -

Manage Bookmarks

+# Manage Bookmarks -

Use bookmarks in a map.

+Use bookmarks in a map. -

+![](ManageBookmarks.png) -

How to use the sample

+## How to use the sample -

The map in the sample comes pre-populated with a set of bookmarks. +The map in the sample comes pre-populated with a set of bookmarks. To access a bookmark and move to that location. - - click on a bookmark's name from the list

+ - click on a bookmark's name from the list -

To add a bookmark. +To add a bookmark. - pan and/or zoom to a new location and click on the on the Add Bookmark button - enter a unique name for the bookmark and click ok - - bookmark will be added to the list

+ - bookmark will be added to the list -

How it works

+## How it works -

To display the ArcGISMap's Bookmarks:

+To display the `ArcGISMap`'s `Bookmark`s: -
    -
  1. Create an ArcGIS map; it has a property called bookmarks.
  2. -
  3. Create a BookmarkList from the ArcGIS map, ArcGISMap.getBookmarks().
  4. -
  5. Set the map to the MapView, MapView.setMap().
  6. -
  7. To create a new bookmark -
    • use MapView.getCurrentViewpoint() to set the bookmark's viewpoint
    • -
    • bookmark.name for the name of the bookmark
    • -
    • add new bookmark to book mark list, BookmarkList.add()
  8. -
- -

Relevant API

- -
    -
  • ArcGISMap
  • -
  • Basemap
  • -
  • Bookmark
  • -
  • BookmarkList
  • -
  • MapView
  • -
  • Viewpoint
  • -
+1. Create an ArcGIS map; it has a property called bookmarks. +2. Create a `BookmarkList` from the ArcGIS map, `ArcGISMap.getBookmarks()`. +3. Set the map to the `MapView`, `MapView.setMap()`. +4. To create a new bookmark + * use `MapView.getCurrentViewpoint()` to set the bookmark's viewpoint + * bookmark.name for the name of the bookmark + * add new bookmark to book mark list, `BookmarkList.add()` +## Relevant API +* ArcGISMap +* Basemap +* Bookmark +* BookmarkList +* MapView +* Viewpoint diff --git a/map/manage-operational-layers/README.md b/map/manage-operational-layers/README.md index 77e2c98a2d..9cef79ee14 100644 --- a/map/manage-operational-layers/README.md +++ b/map/manage-operational-layers/README.md @@ -1,34 +1,30 @@ -

Manage Operational Layers

+# Manage Operational Layers -

Add, remove and reorder operational layers in a map.

+Add, remove and reorder operational layers in a map. -

+![](ManageOperationalLayers.png) -

How to use the sample

+## How to use the sample -

The map in the sample application comes with three ArcGISMapImageLayers already added. In the left control panel are two lists to hold layers.

+The map in the sample application comes with three ArcGISMapImageLayers already added. In the left control panel are two lists to hold layers. -

First list has the layers that are currently part of the map. Right click on the layer to remove it or left click on the layer to move it to the top.

+First list has the layers that are currently part of the map. Right click on the layer to remove it or left click on the layer to move it to the top. -

Second list has layers that have been removed from the first list. Click on layer to add it back to the first list.

+Second list has layers that have been removed from the first list. Click on layer to add it back to the first list. -

How it works

+## How it works -

To manage the operational layers:

+To manage the operational layers: -
    -
  1. Create an ArcGISMap.
  2. -
  3. Get the ArcGIS map LayerList using ArcGISMap.getOperationalLayers().
  4. -
  5. Add/Remove layers from the ArcGIS map by add/removing them from the layer list.
  6. -
  7. The last Layer added to the list will be the Layer that is on top.
  8. -
+1. Create an `ArcGISMap`. +2. Get the ArcGIS map `LayerList` using `ArcGISMap.getOperationalLayers()`. +3. Add/Remove layers from the ArcGIS map by add/removing them from the layer list. +4. The last `Layer` added to the list will be the Layer that is on top. -

Relevant API

+## Relevant API -
    -
  • ArcGISMap
  • -
  • ArcGISMapImageLayer
  • -
  • Basemap
  • -
  • LayerList
  • -
  • MapView
  • -
\ No newline at end of file +* ArcGISMap +* ArcGISMapImageLayer +* Basemap +* LayerList +* MapView diff --git a/map/map-initial-extent/README.md b/map/map-initial-extent/README.md index cbf655ef5a..fb3cd84e20 100644 --- a/map/map-initial-extent/README.md +++ b/map/map-initial-extent/README.md @@ -1,32 +1,26 @@ -

Map Initial Extent

+# Map Initial Extent -

Display the map at an initial viewpoint.

+Display the map at an initial viewpoint. -

+![](MapInitialExtent.png) -

How to use the sample

+## How to use the sample -

As application is loading, initial view point is set and map view zooms to that location.

+As application is loading, initial view point is set and map view zooms to that location. -

How it works

+## How it works -

To set an initial Viewpoint:

+To set an initial `Viewpoint`: -
    -
  1. Create an ArcGISMap.
  2. -
  3. Create a view point using an Envelope, Viewpoint(Envelope).
  4. -
  5. Set the starting location of the ArcGIS map, ArcGISMap.setInitialViewpoint(Viewpoint).
  6. -
  7. Set the ArcGIS map to the MapView.
  8. -
- -

Relevant API

- -
    -
  • ArcGISMap
  • -
  • Envelope
  • -
  • MapView
  • -
  • Point
  • -
  • Viewpoint
  • -
+1. Create an `ArcGISMap`. +2. Create a view point using an `Envelope`, `Viewpoint(Envelope)`. +3. Set the starting location of the ArcGIS map, `ArcGISMap.setInitialViewpoint(Viewpoint)`. +4. Set the ArcGIS map to the `MapView`. +## Relevant API +* ArcGISMap +* Envelope +* MapView +* Point +* Viewpoint diff --git a/map/map-reference-scale/README.md b/map/map-reference-scale/README.md index f3b543d3ef..7d4b85f721 100644 --- a/map/map-reference-scale/README.md +++ b/map/map-reference-scale/README.md @@ -1,45 +1,35 @@ -

Map reference scale

+# Map reference scale -

Set the map's reference scale and choose which feature layers should honor the reference scale.

+Set the map's reference scale and choose which feature layers should honor the reference scale. -

+![](MapReferenceScale.png) -

Use case

+## Use case -

Setting a reference scale on an ArcGISMap fixes the size of symbols and text to the desired height and width at that scale. As you zoom in and out, symbols and text will increase or decrease in size accordingly. When no reference scale is set, symbol and text sizes remain the same size relative to the MapView.

+Setting a reference scale on an `ArcGISMap` fixes the size of symbols and text to the desired height and width at that scale. As you zoom in and out, symbols and text will increase or decrease in size accordingly. When no reference scale is set, symbol and text sizes remain the same size relative to the `MapView`. -

Map annotations are typically only relevant at certain scales. For instance, annotations to a map showing a construction site are only relevant at that construction site's scale. So, when the map is zoomed out that information shouldn't scale with the MapView, but should instead remain scaled with the ArcGISMap.

+Map annotations are typically only relevant at certain scales. For instance, annotations to a map showing a construction site are only relevant at that construction site's scale. So, when the map is zoomed out that information shouldn't scale with the `MapView`, but should instead remain scaled with the `ArcGISMap`. -

How to use the sample

+## How to use the sample -
    -
  • Use the drop down menu at the top left to set the map's reference scale.
  • +* Use the drop down menu at the top left to set the map's reference scale. +* Click the "Set Map Scale to Reference Scale" button to set the map view scale to that of the map reference scale. +* Use the top right menu checkboxes to apply the map reference scale to the map's feature layers (which should scale according to the reference scale). -
  • Click the "Set Map Scale to Reference Scale" button to set the map view scale to that of the map reference scale.
  • +## How it works -
  • Use the top right menu checkboxes to apply the map reference scale to the map's feature layers (which should scale according to the reference scale).
  • -
+* Set the map reference scale property on the `ArcGISMap` with `map.setReferenceScale(double)`. +* Set the scale symbols property on each individual `FeatureLayer` within the map with `featureLayer.setScaleSymbols(boolean)`. -

How it works

+## Relevant API -
    -
  • Set the map reference scale property on the ArcGISMap with map.setReferenceScale(double).
  • +* ArcGISMap +* FeatureLayer -
  • Set the scale symbols property on each individual FeatureLayer within the map with featureLayer.setScaleSymbols(boolean).
  • -
+## Additional Information -

Relevant API

+The map reference scale should normally be set by the map's author and not exposed to the end user like it is in this sample. -
    -
  • ArcGISMap
  • +## Tags -
  • FeatureLayer
  • -
- -

Additional Information

- -

The map reference scale should normally be set by the map's author and not exposed to the end user like it is in this sample.

- -

Tags

- -

Maps & Scenes, reference scale

\ No newline at end of file +Maps & Scenes, reference scale diff --git a/map/map-spatial-reference/README.md b/map/map-spatial-reference/README.md index 069a1fded0..b6ba49f4a0 100644 --- a/map/map-spatial-reference/README.md +++ b/map/map-spatial-reference/README.md @@ -1,35 +1,29 @@ -

Map Spatial Reference

+# Map Spatial Reference -

Specify a map's spatial reference.

+Specify a map's spatial reference. -

Operational layers will automatically project to this spatial reference if possible.

+Operational layers will automatically project to this spatial reference if possible. -

+![](MapSpatialReference.png) -

How to use the sample

+## How to use the sample -

ArcGISMapImageLayer is added to map with default spatial reference of GCSWGS1984 (WKID: 4326). By setting the ArcGISMap to a spatial reference of world bonne (WKID: 54024), the ArcGISMapImageLayer gets re-projected to map's spatial reference.

+ArcGISMapImageLayer is added to map with default spatial reference of GCS*WG*1984. (WKID: 4326). By setting the ArcGISMap to a spatial reference of world bonne (WKID: 54024), the ArcGISMapImageLayer gets re-projected to map's spatial reference. -

How it works

+## How it works -

To set a SpatialReference and project that to all operational layers of ArcGISMap:

+To set a `SpatialReference` and project that to all operational layers of `ArcGISMap`: -
    -
  1. Create an ArcGIS map passing in a spatial reference, ArcGISMap(SpatialReference.create(54024)).
  2. -
  3. Create an ArcGISMapImageLayer as a Basemap.
  4. -
  5. Set basemap to ArcGIS map.
  6. -
  7. Set ArcGIS map to the MapView. -
    • the ArcGIS map image layer will now use the spatial reference set to the map and not it's default spatial reference
  8. -
- -

Relevant API

- -
    -
  • ArcGISMap
  • -
  • ArcGISMapImageLayer
  • -
  • Basemap
  • -
  • MapView
  • -
  • SpatialReference
  • -
+1. Create an ArcGIS map passing in a spatial reference, `ArcGISMap(SpatialReference.create(54024))`. +2. Create an `ArcGISMapImageLayer` as a `Basemap`. +3. Set basemap to ArcGIS map. +4. Set ArcGIS map to the `MapView`. + * the ArcGIS map image layer will now use the spatial reference set to the map and not it's default spatial reference +## Relevant API +* ArcGISMap +* ArcGISMapImageLayer +* Basemap +* MapView +* SpatialReference diff --git a/map/min-max-scale/README.md b/map/min-max-scale/README.md index 4b54b3ee1a..775fe57f4c 100644 --- a/map/min-max-scale/README.md +++ b/map/min-max-scale/README.md @@ -1,30 +1,24 @@ -

Min Max Scale

+# Min Max Scale -

Restrict zooming to a specific scale range.

+Restrict zooming to a specific scale range. -

+![](MinMaxScale.png) -

How to use the sample

+## How to use the sample -

The ArcGISMap has a minimum and maximum scale set which locks the map view in-between that range.

+The ArcGISMap has a minimum and maximum scale set which locks the map view in-between that range. -

How it works

+## How it works -

To set the min and max scales on a ArcGISMap:

+To set the min and max scales on a `ArcGISMap`: -
    -
  1. Create an ArcGIS map.
  2. -
  3. Set min and max scales of map, ArcGISMap.setMaxScale() and ArcGISMap.setMinScale().
  4. -
  5. Set the ArcGIS map to the MapView.
  6. -
- -

Relevant API

- -
    -
  • ArcGISMap
  • -
  • Basemap
  • -
  • MapView
  • -
  • Viewpoint
  • -
+1. Create an ArcGIS map. +2. Set min and max scales of map, `ArcGISMap.setMaxScale()` and `ArcGISMap.setMinScale()`. +3. Set the ArcGIS map to the `MapView`. +## Relevant API +* ArcGISMap +* Basemap +* MapView +* Viewpoint diff --git a/map/mobile-map-search-and-route/README.md b/map/mobile-map-search-and-route/README.md index 3b49caef3e..5dc007f544 100644 --- a/map/mobile-map-search-and-route/README.md +++ b/map/mobile-map-search-and-route/README.md @@ -1,40 +1,33 @@ -

Mobile Map Search And Route

+# Mobile Map Search And Route -

Use locators and networks saved in an offline map.

+Use locators and networks saved in an offline map. -

+![](MobileMapSearchAndRoute.png) -

How to use the sample

+## How to use the sample -

Click the "Open mobile map package" button to bring up a file choosing dialog. Browse to and select a .mmpk file. -When chosen, the maps inside the mobile map package will be displayed in a list view. If the mobile map package has a locator task, -the list items will have a pin icon. If the map contains transportation networks, it will have a navigation icon. -Click on a map list item to open it. Click on the map to reverse geocode the clicked locations's address if a locator task is available. -If transportation networks are available, a route will be calculated between geocode locations.

+Click the "Open mobile map package" button to bring up a file choosing dialog. Browse to and select a .mmpk file. When chosen, the maps inside the mobile map package will be displayed in a list view. If the mobile map package has a locator task, the list items will have a pin icon. If the map contains transportation networks, it will have a navigation icon. Click on a map list item to open it. Click on the map to reverse geocode the clicked locations's address if a locator task is available. If transportation networks are available, a route will be calculated between geocode locations. -

How it works

+## How it works -

To search and route from a mobile map package:

+To search and route from a mobile map package: -
    -
  1. Create a MobileMapPackage passing in the path to the local mmpk file.
  2. -
  3. Load the mobile map package and get its maps with mobileMapPackage.getMaps().
  4. -
  5. A LocatorTask can be retrieved from the mobile map package with mobileMapPackage.getLocatorTask() if it has one.
  6. -
  7. To see if a map has transportation networks saved with it call map.getTransportationNetworks(). Each TransportationNetworkDataset can be used to construct a RouteTask.
  8. -
+1. Create a `MobileMapPackage` passing in the path to the local mmpk file. +2. Load the mobile map package and get its maps with `mobileMapPackage.getMaps()`. +3. A `LocatorTask` can be retrieved from the mobile map package with `mobileMapPackage.getLocatorTask()` if it has one. +4. To see if a map has transportation networks saved with it call `map.getTransportationNetworks()`. Each `TransportationNetworkDataset` can be used to construct a `RouteTask`. -

Relevant API

+## Relevant API -
    -
  • GeocodeResult
  • -
  • MobileMapPackage
  • -
  • ReverseGeocodeParameters
  • -
  • Route
  • -
  • RouteParameters
  • -
  • RouteResult
  • -
  • RouteTask
  • -
  • TransportationNetworkDataset
  • -
+* GeocodeResult +* MobileMapPackage +* ReverseGeocodeParameters +* Route +* RouteParameters +* RouteResult +* RouteTask +* TransportationNetworkDataset -

Tags

-

Offline, Routing, Search

+## Tags + +Offline, Routing, Search diff --git a/map/open-map-url/README.md b/map/open-map-url/README.md index 4c4b36e2f7..092fad6f7f 100644 --- a/map/open-map-url/README.md +++ b/map/open-map-url/README.md @@ -1,31 +1,25 @@ -

Open Map (URL)

+# Open Map (URL) -

Display a web map.

+Display a web map. -

+![](OpenMapURL.png) -

How to use the sample

+## How to use the sample -

A web map can be selected from the drop-down list. On selection the web map displays in the MapView.

+A web map can be selected from the drop-down list. On selection the web map displays in the MapView. -

How it works

+## How it works -

To open a web map:

+To open a web map: -
    -
  1. Create a Portal from the ArcGIS URL http://www.arcgis.com.
  2. -
  3. Create a PortalItem using the Portal and the web map ID: new PortalItem(portal, ID).
  4. -
  5. Create a ArcGISMap using the portal item.
  6. -
  7. Set the map to the MapView.
  8. -
- -

Relevant API

- -
    -
  • ArcGISMap
  • -
  • MapView
  • -
  • Portal
  • -
  • PortalItem
  • -
+1. Create a `Portal` from the ArcGIS URL http://www.arcgis.com. +2. Create a `PortalItem` using the Portal and the web map ID: `new PortalItem(portal, ID)`. +3. Create a `ArcGISMap` using the portal item. +4. Set the map to the `MapView`. +## Relevant API +* ArcGISMap +* MapView +* Portal +* PortalItem diff --git a/map/open-mobile-map-package/README.md b/map/open-mobile-map-package/README.md index cf371ddff6..0dba27d24c 100644 --- a/map/open-mobile-map-package/README.md +++ b/map/open-mobile-map-package/README.md @@ -1,24 +1,18 @@ -

Open Mobile Map Package

+# Open Mobile Map Package -

Display a map from a mobile map package.

+Display a map from a mobile map package. -

+![](OpenMobileMapPackage.png) -

How it works

+## How it works -

To display a map from a MobileMapPackage:

+To display a map from a `MobileMapPackage`: -
    -
  1. Create a MobileMapPackage specifying the path to the .mmpk file.
  2. -
  3. Load the mobile map package with mmpk.loadAsync().
  4. -
  5. After it successfully loads, get the map from the mmpk and add it to the map view: mapView.setMap(mmpk - .getMaps().get(0)).
  6. -
+1. Create a `MobileMapPackage` specifying the path to the .mmpk file. +2. Load the mobile map package with `mmpk.loadAsync()`. +3. After it successfully loads, get the map from the mmpk and add it to the map view: `mapView.setMap(mmpk.getMaps().get(0))`. -

Relevant API

- -
    -
  • MapView
  • -
  • MobileMapPackage
  • -
+## Relevant API +* MapView +* MobileMapPackage diff --git a/map/read-geopackage/README.md b/map/read-geopackage/README.md index 6ce69a77ba..2718903f63 100644 --- a/map/read-geopackage/README.md +++ b/map/read-geopackage/README.md @@ -1,38 +1,31 @@ -

Read GeoPackage

+# Read GeoPackage -

Display rasters and features from local GeoPackages.

+Display rasters and features from local GeoPackages. -

+![](ReadGeoPackage.png) -

How to use the sample

+## How to use the sample -

The layers in the geoPackage, which have not been added to the map are shown in the bottom list. Click an item to -show it as a layer in the map. Layers in the map are listed in the top list. Click layers from the top list to -remove them from the map.

+The layers in the geoPackage, which have not been added to the map are shown in the bottom list. Click an item to show it as a layer in the map. Layers in the map are listed in the top list. Click layers from the top list to remove them from the map. -

How it works

+## How it works -

To read layers from a geoPackage and show them in a map:

+To read layers from a geoPackage and show them in a map: -
    -
  1. Create a GeoPackage with the path to the local geoPackage file.
  2. -
  3. Load the GeoPackage with GeoPackage.loadAsync.
  4. -
  5. Create raster layers for each of these with new RasterLayer(geoPackageRaster).
  6. -
  7. Add each layer to the map as an operational layer with map.getOperationalLayers().add(layer).
  8. -
  9. When it's done loading, get the GeoPackageFeatureTables inside with geoPackage - .getGeoPackageFeatureTables().
  10. -
  11. For each feature table, create a feature layer with new FeatureLayer(featureTable).
  12. -
  13. You can also get the GeoPackageRasters inside using GeoPackage.getGeoPackageRasters().
  14. -
+1. Create a `GeoPackage` with the path to the local geoPackage file. +2. Load the `GeoPackage` with `GeoPackage.loadAsync`. +3. Create raster layers for each of these with `new RasterLayer(geoPackageRaster)`. +4. Add each layer to the map as an operational layer with `map.getOperationalLayers().add(layer)`. +5. When it's done loading, get the `GeoPackageFeatureTable`s inside with `geoPackage.getGeoPackageFeatureTables()`. +6. For each feature table, create a feature layer with `new FeatureLayer(featureTable)`. +7. You can also get the `GeoPackageRaster`s inside using `GeoPackage.getGeoPackageRasters()`. -

Relevant API

+## Relevant API -
    -
  • ArcGISMap
  • -
  • Basemap
  • -
  • FeatureLayer
  • -
  • GeoPackage
  • -
  • Layer
  • -
  • MapView
  • -
  • RasterLayer
  • -
+* ArcGISMap +* Basemap +* FeatureLayer +* GeoPackage +* Layer +* MapView +* RasterLayer diff --git a/map/set-initial-map-location/README.md b/map/set-initial-map-location/README.md index 4fe5669168..d7dc531673 100644 --- a/map/set-initial-map-location/README.md +++ b/map/set-initial-map-location/README.md @@ -1,26 +1,22 @@ -

Set Initial Map Location

+# Set Initial Map Location -

Display a map centered at a latitude and longitude plus zoom level.

+Display a map centered at a latitude and longitude plus zoom level. -

+![](SetInitialMapLocation.png) -

How it works

+## How it works -

To set an initial location:

+To set an initial location: -
    -
  1. Create an ArcGISMap, ArcGISMap(Basemap, latitude, longitude, scale). -
    • Basemap, use basemap type to access a basemap for map, Basemap.Type.NATIONAL_GEOGRAPHIC
    • -
    • latitude and longitude coordinate location
    • -
    • scale, level of detail displayed on MapView
  2. -
  3. Set the map to the map view, MapView.setMap().
  4. -
+1. Create an `ArcGISMap`, `ArcGISMap(Basemap, latitude, longitude, scale)`. + * `Basemap`, use basemap type to access a basemap for map, `Basemap.Type.NATIONAL_GEOGRAPHIC` + * latitude and longitude coordinate location + * scale, level of detail displayed on `MapView` +2. Set the map to the map view, `MapView.setMap()`. -

Relevant API

+## Relevant API -
    -
  • ArcGISMap
  • -
  • Basemap
  • -
  • Basemap.Type
  • -
  • MapView
  • -
\ No newline at end of file +* ArcGISMap +* Basemap +* Basemap.Type +* MapView diff --git a/map_view/change-viewpoint/README.md b/map_view/change-viewpoint/README.md index a13ab758d3..c3f6b44721 100644 --- a/map_view/change-viewpoint/README.md +++ b/map_view/change-viewpoint/README.md @@ -1,42 +1,36 @@ -

Change Viewpoint

+# Change Viewpoint -

Set or animate to a new viewpoint.

+Set or animate to a new viewpoint. -

+![](ChangeViewpoint.png) -

How to use the sample

+## How to use the sample -

The MapView provides different methods you can use to set the viewpoint. - - London button pans to London given a certain time length, MapView.setViewpointWithDurationAsync(). - - Waterloo button centers at a point and set a distance from the ground using a scale, MapView.setViewpointCenterAsync(). - - Westminster button set viewpoint given some type of geometry, MapView.setViewpointGeometryAsync().

+The `MapView` provides different methods you can use to set the viewpoint. +- London button pans to London given a certain time length, `MapView.setViewpointWithDurationAsync()`. +- Waterloo button centers at a point and set a distance from the ground using a scale, `MapView.setViewpointCenterAsync()`. +- Westminster button set viewpoint given some type of geometry, `MapView.setViewpointGeometryAsync()`. -

Below are some other ways to set a viewpoint. - - setViewpoint - - setViewpointAsync - - setViewpointCenterAsync - - setViewpointGeometryAsync - - setViewpointRotationAsync - - setViewpointScaleAsync

+Below are some other ways to set a viewpoint. +- setViewpoint +- setViewpointAsync +- setViewpointCenterAsync +- setViewpointGeometryAsync +- setViewpointRotationAsync +- setViewpointScaleAsync -

How it works

+## How it works -

To change the Viewpoint:

+To change the `Viewpoint`: -
    -
  1. Create an ArcGISMap.
  2. -
  3. Set the map to the MapView, MapView.setMap().
  4. -
  5. Change the view point with MapView.setViewPoint() or any method mention above.
  6. -
- -

Relevant API

- -
    -
  • ArcGISMap
  • -
  • Basemap
  • -
  • Point
  • -
  • SpatialReference
  • -
  • Viewpoint
  • -
+1. Create an `ArcGISMap`. +2. Set the map to the `MapView`, `MapView.setMap()`. +3. Change the view point with `MapView.setViewPoint()` or any method mention above. +## Relevant API +* ArcGISMap +* Basemap +* Point +* SpatialReference +* Viewpoint diff --git a/map_view/display-drawing-status/README.md b/map_view/display-drawing-status/README.md index 1efa94ceb3..9c9f2a08a0 100644 --- a/map_view/display-drawing-status/README.md +++ b/map_view/display-drawing-status/README.md @@ -1,32 +1,28 @@ -

Display Drawing Status

+# Display Drawing Status -

Determine if a layer is done drawing.

+Determine if a layer is done drawing. -

+![](DisplayDrawingStatus.png) -

How to use the sample

+## How to use the sample -

The progress bar in the top left displays the drawing status of the map view.

+The progress bar in the top left displays the drawing status of the map view. -

How it works

+## How it works -

To use the MapView's DrawStatus:

+To use the `MapView`'s `DrawStatus`: -
    -
  1. Create an ArcGISMap.
  2. -
  3. Set the map to the view MapView, MapView.setMap().
  4. -
  5. Add MapView.addDrawStatusChangedListener() block and listen when the MapView.DrawStatus changes.
  6. -
+1. Create an `ArcGISMap`. +2. Set the map to the view `MapView`, `MapView.setMap()`. +3. Add `MapView.addDrawStatusChangedListener()` block and listen when the `MapView.DrawStatus` changes. -

Relevant API

+## Relevant API -
    -
  • ArcGISMap
  • -
  • Basemap
  • -
  • DrawStatus
  • -
  • DrawStatusChangedEvent
  • -
  • Envelope
  • -
  • FeatureLayer
  • -
  • MapView
  • -
  • Point
  • -
+* ArcGISMap +* Basemap +* DrawStatus +* DrawStatusChangedEvent +* Envelope +* FeatureLayer +* MapView +* Point diff --git a/map_view/display-layer-view-state/README.md b/map_view/display-layer-view-state/README.md index 385086f27e..c233a65474 100644 --- a/map_view/display-layer-view-state/README.md +++ b/map_view/display-layer-view-state/README.md @@ -1,41 +1,36 @@ -

Display Layer View State

- -

Determine if a layer is currently visible.

- -

- -

How to use the sample

- -

The view state of a layer changes while the layer is loading, like the start of the application. If you pan or zoom the map, the view state of some layers should also change. - The LayerViewStatus could be: -

    -
  • ACTIVE
  • -
  • ERROR
  • -
  • LOADING
  • -
  • NOT_VISIBLE
  • -
  • OUT_OF_SCALE
  • -
  • UNKNOWN
  • -
-

- -

How it works

- -

To get a layer's view state:

- -
    -
  1. Create an ArcGISMap.
  2. -
  3. Set the map to the MapView, MapView.setMap().
  4. -
  5. Add the MapView.addLayerViewStateChangedListener() property and listen when the Layer.getLayerViewStatus() changes.
  6. -
- -

Relevant API

- -
    -
  • ArcGISMap
  • -
  • ArcGISMapImageLayer
  • -
  • Layer
  • -
  • LayerViewStatus
  • -
  • LayerViewStateChangedEvent
  • -
  • MapView
  • -
  • Viewpoint
  • -
+# Display Layer View State + +Determine if a layer is currently visible. + +![](DisplayLayerViewState.png) + +## How to use the sample + +The view state of a layer changes while the layer is loading, like the start of the application. If you pan or zoom the map, the view state of some layers should also change. + +The LayerViewStatus could be: + +* ACTIVE +* ERROR +* LOADING +* NOT_VISIBLE +* OUT_OF_SCALE +* UNKNOWN + +## How it works + +To get a layer's view state: + +1. Create an `ArcGISMap`. +2. Set the map to the `MapView`, `MapView.setMap()`. +3. Add the `MapView.addLayerViewStateChangedListener()` property and listen when the `Layer.getLayerViewStatus()` changes. + +## Relevant API + +* ArcGISMap +* ArcGISMapImageLayer +* Layer +* LayerViewStatus +* LayerViewStateChangedEvent +* MapView +* Viewpoint diff --git a/map_view/identify-layers/README.md b/map_view/identify-layers/README.md index c03ad4b25e..487d97d181 100644 --- a/map_view/identify-layers/README.md +++ b/map_view/identify-layers/README.md @@ -1,30 +1,26 @@ -

Identify Layers

+# Identify Layers -

Get clicked features from multiple layers.

+Get clicked features from multiple layers. -

+![](IdentifyLayers.png) -

How to use the sample

+## How to use the sample -

Tap on map to get features at that location. The number of features identified from each layer will be shown in an alert.

+Tap on map to get features at that location. The number of features identified from each layer will be shown in an alert. -

How it works

+## How it works -

To identify features from layers in a map:

+To identify features from layers in a map: -
    -
  1. Get a Point2D with the screen location where the user clicked.
  2. -
  3. Call mapView.identifyLayersAsync(screenLocation, tolerance, returnPopupsOnly, maximumResults).
  4. -
  5. Get the list of IdentifyLayerResults from the result. You can get the identified GeoElements in the layer with identifyLayerResult.getElements().
  6. -
  7. To find identified GeoElements in sublayers, use identifyLayerResult.getSublayerResults() and repeat the last step.
  8. -
+1. Get a `Point2D` with the screen location where the user clicked. +2. Call `mapView.identifyLayersAsync(screenLocation, tolerance, returnPopupsOnly, maximumResults)`. +3. Get the list of `IdentifyLayerResult`s from the result. You can get the identified `GeoElement`s in the layer with `identifyLayerResult.getElements()`. +4. To find identified GeoElements in sublayers, use `identifyLayerResult.getSublayerResults()` and repeat the last step. -

Relevant API

+## Relevant API -
    -
  • ArcGISMapImageLayer
  • -
  • FeatureLayer
  • -
  • FeatureTable
  • -
  • IdentifyLayerResult
  • -
  • MapView
  • -
+* ArcGISMapImageLayer +* FeatureLayer +* FeatureTable +* IdentifyLayerResult +* MapView diff --git a/map_view/map-rotation/README.md b/map_view/map-rotation/README.md index 3c9bf44ee4..0673a769f0 100644 --- a/map_view/map-rotation/README.md +++ b/map_view/map-rotation/README.md @@ -1,30 +1,26 @@ -

Map Rotation

+# Map Rotation -

Rotate a map.

+Rotate a map. -

+![](MapRotation.png) -

How to use the sample

+## How to use the sample -

Use the slider to rotate the map. If the map is not pointed north, the compass will display the current heading. -Click the compass to set the map's heading to north.

+Use the slider to rotate the map. If the map is not pointed north, the compass will display the current heading. +Click the compass to set the map's heading to north. -

How it works

+## How it works -

To rotate a map:

+To rotate a map: -
    -
  1. Create an ArcGISMap.
  2. -
  3. Add the map to a MapView.
  4. -
  5. Use MapView.setViewpointRotationAsync to indicate the rotation angle.
  6. -
+1. Create an `ArcGISMap`. +2. Add the map to a `MapView`. +3. Use `MapView.setViewpointRotationAsync` to indicate the rotation angle. -

Relevant API

+## Relevant API -
    -
  • ArcGISMap
  • -
  • Compass
  • -
  • Envelope
  • -
  • MapView
  • -
  • Point
  • -
+* ArcGISMap +* Compass +* Envelope +* MapView +* Point diff --git a/map_view/scale-bar/README.md b/map_view/scale-bar/README.md index ca2987a555..2c02573ffb 100644 --- a/map_view/scale-bar/README.md +++ b/map_view/scale-bar/README.md @@ -1,45 +1,34 @@ -

Scale Bar

+# Scale Bar -

Adds a scale bar to visually gauge distances on a map.

+Adds a scale bar to visually gauge distances on a map. -

+![](ScaleBar.png) -

How to use the sample

+## How to use the sample -

Zoom in or out of the map. The scale bar will automatically display the appropriate scale based on zoom level. Units can be in metric and/or imperial.

+Zoom in or out of the map. The scale bar will automatically display the appropriate scale based on zoom level. Units can be in metric and/or imperial. -

How it works

+## How it works -

To add a scale bar to a map view:

+To add a scale bar to a map view: -
    -
  1. Create a ArcGISMap and display it in a MapView.
  2. +1. Create a `ArcGISMap` and display it in a `MapView`. +2. Create a `ScaleBar` passing in the map view. +3. Set the scale bar's skin style with `scaleBar.setSkinStyle(skinStyle)`. +4. Set the unit system with `scaleBar.setUnitSystem(unitSystem)`. +5. Add the scale bar to the UI overlaying the map view. -
  3. Create a ScaleBar passing in the map view.
  4. +## Relevant API -
  5. Set the scale bar's skin style with scaleBar.setSkinStyle(skinStyle).
  6. +* ArcGISMap +* MapView +* Scalebar +* UnitSystem -
  7. Set the unit system with scaleBar.setUnitSystem(unitSystem).
  8. +## Tags -
  9. Add the scale bar to the UI overlaying the map view.
  10. -
+Map, Scale Bar, Toolkit -

Relevant API

+## Additional Information -
    -
  • ArcGISMap
  • - -
  • MapView
  • - -
  • Scalebar
  • - -
  • UnitSystem
  • -
- -

Tags

- -

Map, Scale Bar, Toolkit

- -

Additional Information

- -

The scale will be accurate for the center of the map, and in general more accurate at larger scales (zoomed in). This means at smaller scales (zoomed out), the reading may be inaccurate at the extremes of the visible extent.

\ No newline at end of file +The scale will be accurate for the center of the map, and in general more accurate at larger scales (zoomed in). This means at smaller scales (zoomed out), the reading may be inaccurate at the extremes of the visible extent. diff --git a/map_view/take-screen-shot/README.md b/map_view/take-screen-shot/README.md index 4bfa5e59c6..02d24d1d3e 100644 --- a/map_view/take-screen-shot/README.md +++ b/map_view/take-screen-shot/README.md @@ -1,27 +1,21 @@ -

Take Screen Shot

+# Take Screen Shot -

Export an area of the map as an image.

+Export an area of the map as an image. -

+![](TakeScreenShot.png) -

How to use this Sample

+## How to use this Sample -Click the Take Screenshot button to export the image. In the file chooser that opens, set a file name and location to - save the image. +Click the Take Screenshot button to export the image. In the file chooser that opens, set a file name and location to save the image. -

How it works

+## How it works -

To export the visible area of the ArcGISMap as an image file:

+To export the visible area of the `ArcGISMap` as an image file: -
    -
  1. Export the image with mapView.exportImageAsync().
  2. -
  3. Get the Image once export is done loading.
  4. -
+1. Export the image with `mapView.exportImageAsync()`. +2. Get the `Image` once export is done loading. -

Relevant API

- -
    -
  • ArcGISMap
  • -
  • MapView
  • -
+## Relevant API +* ArcGISMap +* MapView diff --git a/network_analysis/closest-facility-static/README.md b/network_analysis/closest-facility-static/README.md index e70b1cf37e..80bd8b1448 100644 --- a/network_analysis/closest-facility-static/README.md +++ b/network_analysis/closest-facility-static/README.md @@ -1,61 +1,48 @@ -

Closest Facility (Static)

- -

Find routes from several locations to the respective closest facility.

- -

- -

Use case

- -

Quickly and accurately determining the most efficient route between a location and a facility is a frequently encountered task (e.g. emergency services).

- -

How to use the sample

- -

Click the 'Solve Routes' button to determine and display the route from each incident (fire) to the nearest facility (fire station).

- -

How it works

- -

To display a ClosestFacilityRoute between several incidents and facilities:

- -
    -
  1. Create a ClosestFacilityTask using a Url from an online service.
  2. -
  3. Get the default set of ClosestFacilityParameters from the task: closestFacilityTask.createDefaultParametersAsync().get().
  4. -
  5. Build a list of all Facilities and Incidents: -
      -
    • Create a FeatureTable using ServiceFeatureTable(Uri).
    • -
    • Query the FeatureTable for all Features using .queryFeaturesAsync(queryParameters).
    • -
    • Iterate over the result and add each Feature to a List, instantiating the feature as a Facility or Incident.
    • -
    -
  6. -
  7. Add a list of all facilities to the task parameters: closestFacilityParameters.setFacilities(facilitiesList).
  8. -
  9. Add a list of all incidents to the task parameters: closestFacilityParameters.setIncidents(incidentsList).
  10. -
  11. Get ClosestFacilityResult from solving the task with the provided parameters: closestFacilityTask.solveClosestFacilityAsync(closestFacilityParameters).
  12. -
  13. Find the closest facility for each incident by iterating over the previously created incidentsList: -
      -
    • Get index list of closet facilities to the incident, closestFacilityResult.getRankedFacilityIndexes(indexOfIncident).get(0).
    • -
    • Find closest facility route, closestFacilityResult.getRoute(closestFacilityIndex, indexOfIncident).
    • -
    -
  14. -
  15. Display the route: -
      -
    • create a Graphic from route geometry, with new Graphic(closestFacilityRoute.getRouteGeometry()).
    • -
    • add graphic to GraphicsOverlay and set it to the mapview.
    • -
    -
  16. -
- -

Relevant API

- -
    -
  • ClosestFacilityParameters
  • -
  • ClosestFacilityResult
  • -
  • ClosestFacilityRoute
  • -
  • ClosestFacilityTask
  • -
  • Facility
  • -
  • Graphic
  • -
  • GraphicsOverlay
  • -
  • Incident
  • -
- -

Tags

- -

facility, incident, network analysis, route, search

+# Closest Facility (Static) + +Find routes from several locations to the respective closest facility. + +![](ClosestFacilityStatic.png) + +## Use case + +Quickly and accurately determining the most efficient route between a location and a facility is a frequently encountered task (e.g. emergency services). + +## How to use the sample + +Click the 'Solve Routes' button to determine and display the route from each incident (fire) to the nearest facility (fire station). + +## How it works + +To display a `ClosestFacilityRoute` between several incidents and facilities: + +1. Create a `ClosestFacilityTask` using a Url from an online service. +2. Get the default set of `ClosestFacilityParameters` from the task: `closestFacilityTask.createDefaultParametersAsync().get()`. +3. Build a list of all Facilities and Incidents: + * Create a `FeatureTable` using `ServiceFeatureTable(Uri)`. + * Query the `FeatureTable` for all `Feature`s using `.queryFeaturesAsync(queryParameters)`. + * Iterate over the result and add each `Feature` to a `List`, instantiating the feature as a `Facility` or `Incident`. +4. Add a list of all facilities to the task parameters: `closestFacilityParameters.setFacilities(facilitiesList)`. +5. Add a list of all incidents to the task parameters: `closestFacilityParameters.setIncidents(incidentsList)`. +6. Get `ClosestFacilityResult` from solving the task with the provided parameters: `closestFacilityTask.solveClosestFacilityAsync(closestFacilityParameters)`. +7. Find the closest facility for each incident by iterating over the previously created `incidentsList`: + * Get index list of closet facilities to the incident, `closestFacilityResult.getRankedFacilityIndexes(indexOfIncident).get(0)`. + * Find closest facility route, `closestFacilityResult.getRoute(closestFacilityIndex, indexOfIncident)`. +8. Display the route: + * create a `Graphic` from route geometry, with `new Graphic(closestFacilityRoute.getRouteGeometry())`. + * add graphic to `GraphicsOverlay` and set it to the mapview. + +## Relevant API + +* ClosestFacilityParameters +* ClosestFacilityResult +* ClosestFacilityRoute +* ClosestFacilityTask +* Facility +* Graphic +* GraphicsOverlay +* Incident + +## Tags + +facility, incident, network analysis, route, search diff --git a/network_analysis/closest-facility/README.md b/network_analysis/closest-facility/README.md index 6cbd7a2d69..a83c3c2463 100644 --- a/network_analysis/closest-facility/README.md +++ b/network_analysis/closest-facility/README.md @@ -1,40 +1,37 @@ -

Closest Facility

- -

Find a route to the closest facility from a location.

- -

- -

How to use sample

-

Left click near any of the hospitals and a route will be displayed from that clicked location to the nearest hospital.

- -

How it works

- -

To display a ClosestFacilityRoute between an Incident and a Facility:

- -
    -
  1. Create a ClosestFacilityTask using an Url from an online service.
  2. -
  3. Get ClosestFacilityParameters from task, task.createDefaultParametersAsync().get()
  4. -
  5. Add facilities to parameters, closestFacilityParameters.setFacilities().addAll(facilities).
  6. -
  7. Add incidents to parameters, closestFacilityParameters.setIncidents().add(Arrays.asList(new Incident(incidentPoint))).
  8. -
  9. Get ClosestFacilityResult from solving task with parameters, task.solveClosestFacilityAsync(facilityParameters).get()
  10. -
  11. Get index list of closet facilities to incident, facilityResult.getRankedFacilities(0)
  12. -
  13. Get index of closest facility, rankedFacilitiesList.get(0)
  14. -
  15. Find closest facility route, facilityResult.getRoute(closestFacilityIndex, IncidentIndex)
  16. -
  17. Display route to MapView. -
    • create Graphic from route geometry, new Graphic(route.getRouteGeometry())
    • -
    • add graphic to GraphicsOverlay which is attached to the mapview
  18. -
- -

Relevant API

-
    -
  • ClosestFacilityParameters
  • -
  • ClosestFacilityResult
  • -
  • ClosestFacilityRoute
  • -
  • ClosestFacilityTask
  • -
  • Facility
  • -
  • Graphic
  • -
  • GraphicsOverlay
  • -
  • Incident
  • -
  • MapView
  • -
+# Closest Facility +Find a route to the closest facility from a location. + +![](ClosestFacility.png) + +## How to use sample + +Left click near any of the hospitals and a route will be displayed from that clicked location to the nearest hospital. + +## How it works + +To display a `ClosestFacilityRoute` between an `Incident` and a `Facility`: + +1. Create a `ClosestFacilityTask` usin. an Url from an online service. +2. Get `ClosestFacilityParameters` from task, `task.createDefaultParametersAsync().get()` +3. Add facilities to parameters, `closestFacilityParameters.setFacilities().addAll(facilities)`. +4. Add incidents to parameters, `closestFacilityParameters.setIncidents().add(Arrays.asList(new Incident(incidentPoint)))`. +5. Get `ClosestFacilityResult` from solving task with parameters, `task.solveClosestFacilityAsync(facilityParameters).get()` +6. Get index list of closet facilities to incident, `facilityResult.getRankedFacilities(0)` +7. Get index of closest facility, `rankedFacilitiesList.get(0)` +8. Find closest facility route, `facilityResult.getRoute(closestFacilityIndex, IncidentIndex)` +9. Display route to `MapView`. + * create `Graphic` from route geometry, `new Graphic(route.getRouteGeometry())` + * add graphic to `GraphicsOverlay` which is attached to the mapview + +## Relevant API + +* ClosestFacilityParameters +* ClosestFacilityResult +* ClosestFacilityRoute +* ClosestFacilityTask +* Facility +* Graphic +* GraphicsOverlay +* Incident +* MapView diff --git a/network_analysis/find-route/README.md b/network_analysis/find-route/README.md index b3649b798a..700f10e2b5 100644 --- a/network_analysis/find-route/README.md +++ b/network_analysis/find-route/README.md @@ -1,40 +1,36 @@ -

Find Route

- -

Get a route between two stops with directions.

- -

- -

How to use the sample

- -

For simplicity, the sample comes loaded with a start and end stop. You can click on the Find route button to get a route between these stops. Once the route is generated, the DirectionMessages show step by step directions in the directions list.

- -

How it works

- -

To display a Route using a RouteTask:

- -
    -
  1. Create an ArcGISMap.
  2. -
  3. Add the map to the MapView, MapView.setMap().
  4. -
  5. Create a route task using an URL from an online service. -
    • online route task solves a route from an online route service
  6. -
  7. Set the RouteParameters to find a route between the Stops.
  8. -
  9. Get the route using the RouteTask.solveAsync(routeParameters).
  10. -
  11. Display the route by adding it to a GraphicsOverlay.getGraphics().add().
  12. -
  13. Show the step by step DirectionMessages using the Route.getDirectionManeuvers() method.
  14. -
- -

Relevant API

- -
    -
  • ArcGISMap
  • -
  • DirectionManeuver
  • -
  • DirectionMessage
  • -
  • Graphic
  • -
  • GraphicsOverlay
  • -
  • MapView
  • -
  • Route
  • -
  • RouteTask
  • -
  • RouteParameters
  • -
  • RouteResult
  • -
  • Stop
  • -
\ No newline at end of file +# Find Route + +Get a route between two stops with directions. + +![](FindRoute.png) + +## How to use the sample + +For simplicity, the sample comes loaded with a start and end stop. You can click on the Find route button to get a route between these stops. Once the route is generated, the DirectionMessages show step by step directions in the directions list. + +## How it works + +To display a `Route` using a `RouteTask`: + +1. Create an `ArcGISMap`. +2. Add the map to the `MapView`, `MapView.setMap()`. +3. Create a route task using an URL from an online service. + * online route task solves a route from an online route service +4. Set the `RouteParameters` to find a route between the `Stop`s. +5. Get the route using th. `RouteTask.solveAsync(routeParameters)`. +6. Display the route by adding it to a `GraphicsOverlay.getGraphics().add()`. +7. Show the step by step `DirectionMessage`s using the `Route.getDirectionManeuvers()` method. + +## Relevant API + +* ArcGISMap +* DirectionManeuver +* DirectionMessage +* Graphic +* GraphicsOverlay +* MapView +* Route +* RouteTask +* RouteParameters +* RouteResult +* Stop diff --git a/network_analysis/offline-routing/README.md b/network_analysis/offline-routing/README.md index 5f85db53bc..99ec00485f 100644 --- a/network_analysis/offline-routing/README.md +++ b/network_analysis/offline-routing/README.md @@ -1,45 +1,36 @@ -

Offline Routing

- -

Solve a route on-the-fly using only offline data.

- -

- -

How to use the sample

- -

Left-click near a road to add a stop to the route. A number graphic will show its order in the route. After -adding at least 2 stops, a route will display. Use the combo box in the top left corner to choose between the travel -modes "Fastest" and "Shortest" (how the route is optimized). To move a stop, right-click the graphic to select it, -then move your mouse to reposition, and finally right-click again to set the new position. The route will update -on-the-fly while moving stops. The green box marks the boundary of the route geodatabase.

- -

How it works

- -

To display a Route using a RouteTask with offline data:

- -
    -
  1. Create the map's Basemap from a local tile package using a TileCache and ArcGISTiledLayer
  2. -
  3. Create a RouteTask with an offline locator geodatabase
  4. -
  5. Get the RouteParameters using routeTask.createDefaultParameters()
  6. -
  7. Create Stops and add them to the route task's parameters.
  8. -
  9. Solve the Route using routeTask.solveRouteAsync(routeParameters)
  10. -
  11. Create a graphic with the route's geometry and a SimpleLineSymbol and display it on another - GraphicsOverlay.
  12. -
- -

Relevant API

- -
    -
  • ArcGISMap
  • -
  • ArcGISTiledLayer
  • -
  • Graphic
  • -
  • GraphicsOverlay
  • -
  • MapView
  • -
  • Route
  • -
  • RouteTask
  • -
  • RouteParameters
  • -
  • RouteResult
  • -
  • SimpleLineSymbol
  • -
  • Stop
  • -
  • TextSymbol
  • -
  • TileCache
  • -
+# Offline Routing + +Solve a route on-the-fly using only offline data. + +![](OfflineRouting.gif) + +## How to use the sample + +Left-click near a road to add a stop to the route. A number graphic will show its order in the route. After adding at least 2 stops, a route will display. Use the combo box in the top left corner to choose between the travel modes "Fastest" and "Shortest" (how the route is optimized). To move a stop, right-click the graphic to select it, then move your mouse to reposition, and finally right-click again to set the new position. The route will update on-the-fly while moving stops. The green box marks the boundary of the route geodatabase. + +## How it works + +To display a `Route` using a `RouteTask` with offline data: + +1. Create the map's `Basemap` from a local tile package using a `TileCache` and `ArcGISTiledLayer` +2. Create a `RouteTask` with an offline locator geodatabase +3. Get the `RouteParameters` using `routeTask.createDefaultParameters()` +4. Create `Stop`s and add them to the route task's parameters. +5. Solve the `Route` using `routeTask.solveRouteAsync(routeParameters)` +6. Create a graphic with the route's geometry and a `SimpleLineSymbol` and display it on another `GraphicsOverlay`. + +## Relevant API + +* ArcGISMap +* ArcGISTiledLayer +* Graphic +* GraphicsOverlay +* MapView +* Route +* RouteTask +* RouteParameters +* RouteResult +* SimpleLineSymbol +* Stop +* TextSymbol +* TileCache diff --git a/network_analysis/service-area-task/README.md b/network_analysis/service-area-task/README.md index f306f5fb66..a74139b13e 100644 --- a/network_analysis/service-area-task/README.md +++ b/network_analysis/service-area-task/README.md @@ -1,47 +1,43 @@ -

Service Area Task

- -

Find the service area for a point.

- -

A service area shows locations that can be reached from a facility based off a certain impedance [such as travel -time]. Barriers can also be added which can effect the impedance by not letting traffic through or adding the time is takes to pass that barrier.

- -

- -

How to use sample

-
  • In order to find any service areas at least one ServiceAreaFaciltiy needs to be added.
  • -
  • To add a facility, click the facility button, then click anywhere on the MapView.
  • -
  • To add a barrier, click the barrier button, and click multiple locations on MapView.
  • -
    • Hit the barrier button again to finish drawing barrier.
    • -
    • Hitting any other button will also stop the barrier from drawing.
    -
  • To show service areas around facilities that were added, click show service areas button.
  • -
  • Reset button, clears all graphics and reset ServiceAreaTask.
  • - -

    How it works

    - -

    To display service areas around a certain location:

    - -
      -
    1. Create a ServiceAreaTask from an online service.
    2. -
    3. Get ServiceAreaParameters from task, task.createDefaultParametersAsync()
    4. -
    5. Setting return polygons to true will return all services areas, serviceAreaParameters.setReturnPolygons(true)
    6. -
    7. Add a ServiceAreaFacilty to parameters, serviceAreaParameters.setFacilities(serviceAreaFacility)
    8. -
    9. Get ServiceAreaResult by solving the service area task using parameters, task.solveServiceAreaAsync(serviceAreaParameters).get()
    10. -
    11. Get any ServiceAreaPolygons that were returned, serviceAreaResult.getResultPolygons(facilityIndex)
    12. -
      • facilityIndex is the faciltiy from the mapview that you want to get the services areas of
      -
    13. Display services areas to MapView, graphicsOverlay.getGraphics().add(new Graphic(serviceAreaPolygon.getGeometry(), fillSymbol))
    14. -
    - -

    Relevant API

    -
      -
    • ArcGISMap
    • -
    • GraphicsOverlay
    • -
    • MapView
    • -
    • PolylineBarrier
    • -
    • ServiceAreaFacility
    • -
    • ServiceAreaParameters
    • -
    • ServiceAreaPolygon
    • -
    • ServiceAreaResult
    • -
    • ServiceAreaTask
    • -
    • PolylineBuilder
    • -
    +# Service Area Task +Find the service area for a point. + +A service area shows locations that can be reached from a facility based off a certain impedance [such as travel time]. Barriers can also be added which can effect the impedance by not letting traffic through or adding the time is takes to pass that barrier. + +![](ServiceAreaTask.gif) + +## How to use sample + +1. In order to find any service areas at least one ServiceAreaFaciltiy needs to be added. +2. To add a facility, click the facility button, then click anywhere on the MapView. +3. To add a barrier, click the barrier button, and click multiple locations on MapView. + * Hit the barrier button again to finish drawing barrier. + * Hitting any other button will also stop the barrier from drawing. +4. To show service areas around facilities that were added, click show service areas button. +5. Reset button, clears all graphics and reset ServiceAreaTask. + +## How it works + +To display service areas around a certain location: + +1. Create a `ServiceAreaTask` from an online service. +2. Get ServiceAreaParameters from task, `task.createDefaultParametersAsync()` +3. Setting return polygons to true will return all services areas, `serviceAreaParameters.setReturnPolygons(true)` +4. Add a `ServiceAreaFacilty` to parameters, `serviceAreaParameters.setFacilities(serviceAreaFacility)` +5. Get `ServiceAreaResult` by solving the service area task using parameters, `task.solveServiceAreaAsync(serviceAreaParameters).get()` +6. Get any `ServiceAreaPolygon`s that were returned, `serviceAreaResult.getResultPolygons(facilityIndex)` + * facilityIndex is the faciltiy from the mapview that you want to get the services areas of +7. Display services areas to MapView, `graphicsOverlay.getGraphics().add(new Graphic(serviceAreaPolygon.getGeometry(), fillSymbol))` + +## Relevant API + +* ArcGISMap +* GraphicsOverlay +* MapView +* PolylineBarrier +* ServiceAreaFacility +* ServiceAreaParameters +* ServiceAreaPolygon +* ServiceAreaResult +* ServiceAreaTask +* PolylineBuilder diff --git a/ogc/browse-wfs-layers/README.md b/ogc/browse-wfs-layers/README.md index dba1210d85..564b4bb4e1 100644 --- a/ogc/browse-wfs-layers/README.md +++ b/ogc/browse-wfs-layers/README.md @@ -1,61 +1,41 @@ -

    Browse WFS layers

    +# Browse WFS layers -

    Browse a WFS service for layers and add them to the map.

    +Browse a WFS service for layers and add them to the map. -

    +![](BrowseWfsLayers.png) -

    Use case

    +## Use case -

    Services often have multiple layers available for display. For example, a feature service for a city might have layers representing roads, land masses, building footprints, parks, and facilities. A user can choose to only show the road network and parks for a park accessibility analysis.

    +Services often have multiple layers available for display. For example, a feature service for a city might have layers representing roads, land masses, building footprints, parks, and facilities. A user can choose to only show the road network and parks for a park accessibility analysis. -

    How to use the sample

    +## How to use the sample -

    A list of layers in the WFS service will be shown. Select a layer to display it.

    +A list of layers in the WFS service will be shown. Select a layer to display it. -

    Some WFS services return coordinates in X,Y order, while others return coordinates in lat/long (Y,X) order. If you don't see features rendered or you see features in the wrong location, use the checkbox to swap the coordinate order and reload. Note: the WFS service in this sample does not require coordinate swapping.

    +Some WFS services return coordinates in X,Y order, while others return coordinates in lat/long (Y,X) order. If you don't see features rendered or you see features in the wrong location, use the checkbox to swap the coordinate order and reload. Note: the WFS service in this sample does not require coordinate swapping. -

    How it works

    +## How it works -
      -
    1. Create a WfsService object with a URL to a WFS feature service.
    2. +1. Create a `WfsService` object with a URL to a WFS feature service. +2. Obtain a list of `WfsLayerInfo` from the WFS service with `getServiceInfo().getLayerInfos()`. +3. Create a `WfsFeatureTable` from the `WfsLayerInfo`. + * Set the axis order of the table if necessary. +4. Create a `FeatureLayer` from the WSF feature table. +5. Add the feature layer to the map. + * The sample uses randomly-generated symbology, similar to the behavior in ArcGIS Pro. -
    3. Obtain a list of WfsLayerInfo from the WFS service with getServiceInfo().getLayerInfos().
    4. +## Relevant API -
    5. Create a WfsFeatureTable from the WfsLayerInfo. +* FeatureLayer +* WfsFeatureTable +* WfsLayerInfo +* WfsService +* WfsServiceInfo -
        -
      • Set the axis order of the table if necessary.
      -
    6. +## About the data -
    7. Create a FeatureLayer from the WSF feature table.
    8. +This service shows features for downtown Seattle. For additional information, see the underlying service on [ArcGIS Online](https://arcgisruntime.maps.arcgis.com/home/item.html?id=1b81d35c5b0942678140efc29bc25391). -
    9. Add the feature layer to the map. +## Tags -
        -
      • The sample uses randomly-generated symbology, similar to the behavior in ArcGIS Pro.
      -
    10. -
    - -

    Relevant API

    - -
      - -
    • FeatureLayer
    • - -
    • WfsFeatureTable
    • - -
    • WfsLayerInfo
    • - -
    • WfsService
    • - -
    • WfsServiceInfo
    • - -
    - -

    About the data

    - -

    This service shows features for downtown Seattle. For additional information, see the underlying service on ArcGIS Online.

    - -

    Tags

    - -

    OGC, WFS, feature, web, service, layers, browse, catalog

    \ No newline at end of file +OGC, WFS, feature, web, service, layers, browse, catalog diff --git a/ogc/display-wfs-layer/README.md b/ogc/display-wfs-layer/README.md index 3f03f9d59d..03eae23ede 100644 --- a/ogc/display-wfs-layer/README.md +++ b/ogc/display-wfs-layer/README.md @@ -1,54 +1,35 @@ -

    Display WFS Layer

    +# Display WFS Layer -

    Display a layer from a WFS service, requesting only features for the current extent.

    +Display a layer from a WFS service, requesting only features for the current extent. -

    +![](DisplayWFSLayer.png) -

    Use case

    +## Use case -

    WFS is an open standard with functionality similar to ArcGIS feature -services. Runtime support for WFS allows you to interoperate with open -systems, which are often used in inter-agency efforts, like those for -disaster relief.

    +WFS is an open standard with functionality similar to ArcGIS feature services. Runtime support for WFS allows you to interoperate with open systems, which are often used in inter-agency efforts, like those for disaster relief. -

    How to use the sample

    +## How to use the sample -

    Pan and zoom to see features within the current map extent.

    +Pan and zoom to see features within the current map extent. -

    How it works

    +## How it works -
      -
    1. Create a WfsFeatureTable with a URL.
    2. +1. Create a `WfsFeatureTable` with a URL. +2. Create a `FeatureLayer` from the feature table and add it to the map. +3. Add a `NavigationChangedListener` to the map view and listen for a `NavigationChangedEvent`. Check if it `!isNavigating()` to detect when the user has stopped navigating the map. +4. When the user is finished navigating, use `populateFromServiceAsync(...)` to load the table with data for the current visible extent. -
    3. Create a FeatureLayer from the feature table and add it to the map.
    4. +## Relevant API -
    5. Add a NavigationChangedListener to the map view and listen for a -NavigationChangedEvent. Check if it !isNavigating() to detect -when the user has stopped navigating the map.
    6. +* FeatureLayer +* NavigationChangedEvent +* QueryParameters +* WfsFeatureTable -
    7. When the user is finished navigating, use -populateFromServiceAsync(...) to load the table with data for the -current visible extent.
    8. -
    +## About the data -

    Relevant API

    +This service shows building footprints for downtown Seattle. For additional information, see the underlying service on [ArcGIS Online](https://arcgisruntime.maps.arcgis.com/home/item.html?id=1b81d35c5b0942678140efc29bc25391). -
      -
    • FeatureLayer
    • +## Tags -
    • NavigationChangedEvent
    • - -
    • QueryParameters
    • - -
    • WfsFeatureTable
    • -
    - -

    About the data

    - -

    This service shows building footprints for downtown Seattle. For -additional information, see the underlying service on -ArcGIS Online.

    - -

    Tags

    - -

    OGC, WFS, layers, feature, web, service, browse, catalog, interaction cache

    \ No newline at end of file +OGC, WFS, layers. feature, web, service, browse, catalog, interaction cache diff --git a/ogc/open-street-map-layer/README.md b/ogc/open-street-map-layer/README.md index 9e3b62ff1a..6bd4fd35ec 100644 --- a/ogc/open-street-map-layer/README.md +++ b/ogc/open-street-map-layer/README.md @@ -1,24 +1,23 @@ -

    OpenStreetMap Layer

    +# OpenStreetMap Layer -

    Display tiles from OpenStreetMap.

    +Display tiles from OpenStreetMap. -

    +![](OpenStreetMapLayer.png) -

    How it works

    -

    To create a map with an OpenStreetMap basemap:

    -
      -
    1. Create an ArcGISMap with a Basemap.Type.OPEN_STREET_MAP.
    2. -
    3. Set the map to a MapView.
    4. -
    +## How it works -

    Relevant API

    +To create a map with an OpenStreetMap basemap: -
      -
    • ArcGISMap
    • -
    • Basemap
    • -
    • Basemap.Type
    • -
    • MapView
    • -
    +1. Create an `ArcGISMap` with a `Basemap.Type.OPEN_STREET_MAP`. +2. Set the map to a `MapView`. -

    Tags

    -

    Layers, OpenStreetMap

    +## Relevant API + +* ArcGISMap +* Basemap +* Basemap.Type +* MapView + +## Tags + +Layers, OpenStreetMap diff --git a/ogc/style-wms-layer/README.md b/ogc/style-wms-layer/README.md index ceedce0323..6dd60e141e 100644 --- a/ogc/style-wms-layer/README.md +++ b/ogc/style-wms-layer/README.md @@ -1,27 +1,21 @@ -

    Style WMS Layer

    +# Style WMS Layer -

    Change the style of a WMS layer.

    +Change the style of a WMS layer. -

    +![](StyleWmsLayer.png) -

    How to use the sample

    +## How to use the sample -

    Once the layer loads, the toggle button will be enabled. Click it to toggle between the first and second styles -of the WMS layer.

    +Once the layer loads, the toggle button will be enabled. Click it to toggle between the first and second styles of the WMS layer. -

    How it works

    +## How it works -

    To style a WMS Layer:

    +To style a WMS Layer: -
      -
    1. Create a WmsLayer specifying the URL of the service and the layer names you want new - WmsLayer(url, names).
    2. -
    3. When the layer is done loading, get it's list of style strings using wmsLayer.getSublayers().get(0).getSublayerInfo().getStyles().
    4. -
    5. Set one of the styles using wmsLayer.getSublayers().get(0).setCurrentStyle(styleString).
    6. -
    +1. Create a `WmsLayer` specifying the URL of the service and the layer names you want `new WmsLayer(url, names)`. +2. When the layer is done loading, get it's list of style strings using `wmsLayer.getSublayers().get(0).getSublayerInfo().getStyles()`. +3. Set one of the styles using `wmsLayer.getSublayers().get(0).setCurrentStyle(styleString)`. -

    Relevant API

    +## Relevant API -
      -
    • WmsLayer
    • -
    +* WmsLayer diff --git a/ogc/wfs-xml-query/README.md b/ogc/wfs-xml-query/README.md index d0861dd261..19bd5cf438 100644 --- a/ogc/wfs-xml-query/README.md +++ b/ogc/wfs-xml-query/README.md @@ -1,40 +1,31 @@ -

    Load WFS with XML query

    +# Load WFS with XML query -

    Load a WFS feature table using an XML query.

    +Load a WFS feature table using an XML query. -

    +![](WfsXmlQuery.png) -

    Use case

    +## Use case -

    ArcGIS Runtime QueryParameters objects can't represent all possible queries that can be made against a WFS feature service. For example, Runtime query parameters don't support wildcard searches. However, queries can be provided as raw XML strings, allowing access to query functionality not available with QueryParameters.

    +ArcGIS Runtime `QueryParameters` objects can't represent all possible queries that can be made against a WFS feature service. For example, Runtime query parameters don't support wildcard searches. However, queries can be provided as raw XML strings, allowing access to query functionality not available with `QueryParameters`. -

    How it works

    +## How it works -
      -
    1. Create a WfsFeatureTable with a URL.
    2. +1. Create a `WfsFeatureTable` with a URL. +2. Set the feature table's axis order to `NO_SWAP`, and the feature request mode to `MANUAL_CACHE`. +3. Create a `FeatureLayer` from the feature table and add it to the map's operational layers. +4. Call `populateFromServiceAsync` on the feature table to populate it with only those features returned by the XML query. -
    3. Set the feature table's axis order to NO_SWAP, and the feature request mode to MANUAL_CACHE.
    4. +## Relevant API -
    5. Create a FeatureLayer from the feature table and add it to the map's operational layers.
    6. +* FeatureLayer +* WfsFeatureTable -
    7. Call populateFromServiceAsync on the feature table to populate it with only those features returned by the XML query.
    8. -
    +## About the data -

    Relevant API

    +This service shows trees in downtown Seattle and the surrounding area. An XML-encoded `GetFeature` request is used to limit results to only trees of the genus *Tilia*. -
      -
    • FeatureLayer
    • +For additional information, see the underlying service on [ArcGIS Online](https://arcgisruntime.maps.arcgis.com/home/item.html?id=1b81d35c5b0942678140efc29bc25391). -
    • WfsFeatureTable
    • +## Tags -
    - -

    About the data

    - -

    This service shows trees in downtown Seattle and the surrounding area. An XML-encoded GetFeature request is used to limit results to only trees of the genus Tilia.

    - -

    For additional information, see the underlying service on ArcGIS Online.

    - -

    Tags

    - -

    OGC, WFS, feature, web, service, XML, query

    +OGC, WFS, feature, web, service, XML, query diff --git a/ogc/wms-layer-url/README.md b/ogc/wms-layer-url/README.md index 49b11025d2..21dea58f22 100644 --- a/ogc/wms-layer-url/README.md +++ b/ogc/wms-layer-url/README.md @@ -1,23 +1,18 @@ -

    WMS Layer URL

    +# WMS Layer URL -

    Display a WMS layer.

    +Display a WMS layer. -

    +![](WmsLayerUrl.png) -

    How it works

    +## How it works -

    To create a WmsLayer from a URL and display it:

    +To create a `WmsLayer` from a URL and display it: -
      -
    1. Create a WmsLayer specifying the URL of the service and the layer names you want new - WmsLayer(url, names).
    2. -
    3. To display it, add it to the map as an operational layer map.getOperationalLayers().add(wmsLayer).
    4. -
    +1. Create a `WmsLayer` specifying the URL of the service and the layer names you want `new WmsLayer(url, names)`. +2. To display it, add it to the map as an operational layer `map.getOperationalLayers().add(wmsLayer)`. -

    Relevant API

    +## Relevant API -
      -
    • ArcGISMap
    • -
    • MapView
    • -
    • WmsLayer
    • -
    +* ArcGISMap +* MapView +* WmsLayer diff --git a/ogc/wmts-layer/README.md b/ogc/wmts-layer/README.md index f3e6d2ae91..613d793b4e 100644 --- a/ogc/wmts-layer/README.md +++ b/ogc/wmts-layer/README.md @@ -1,28 +1,23 @@ -

    WMTS Layer

    +# WMTS Layer -

    Dsiplay tiles from a Web Map Tile Service.

    +Dsiplay tiles from a Web Map Tile Service. -

    +![](WmtsLayer.png) -

    How it works

    +## How it works -

    To display a WmtsLayer from a WmtsService:

    +To display a `WmtsLayer` from a `WmtsService`: -
      -
    1. Create a WmtsService using the URL of the WMTS Service.
    2. -
    3. After loading the WmtsService, get the list of WmtsLayerInfos from the service info: - service.getServiceInfo().getLayerInfos()
    4. -
    5. For the layer you want to display, get the layer ID using getLayerInfos().get(0).getId()
    6. -
    7. Use the LayerInfo to create the WMTSLayer: new WmtsLayer(layerInfos.get(0))
    8. -
    9. Set it as the maps' basemap with map.setBasemap(new Basemap(wmtsLayer))
    10. -
    +1. Create a `WmtsService` using the URL of the WMTS Service. +2. After loading the WmtsService, get the list of `WmtsLayerInfo`s from the service info: `service.getServiceInfo().getLayerInfos()` +3. For the layer you want to display, get the layer ID using `getLayerInfos().get(0).getId()` +4. Use the LayerInfo to create the WMTSLayer: `new WmtsLayer(layerInfos.get(0))` +5. Set it as the maps' basemap with `map.setBasemap(new Basemap(wmtsLayer))` -

    Relevant API

    +## Relevant API -
      -
    • ArcGISMap
    • -
    • Basemap
    • -
    • MapView
    • -
    • WmtsLayer
    • -
    • WmtsService
    • -
    +* ArcGISMap +* Basemap +* MapView +* WmtsLayer +* WmtsService diff --git a/portal/oauth/README.md b/portal/oauth/README.md index 98d0d520b7..a9573b973d 100644 --- a/portal/oauth/README.md +++ b/portal/oauth/README.md @@ -1,42 +1,33 @@ -

    OAuth

    +# OAuth -

    Authenticate with OAuth 2.0 to retrieve the user's profile information.

    +Authenticate with OAuth 2.0 to retrieve the user's profile information. -

    +![](OAuth.png) -

    How to use the sample

    +## How to use the sample -

    This sample requires you to setup your own app on arcgis.com. See the wiki for details.

    +This sample requires you to setup your own app on arcgis.com. See the [https://github.com/Esri/arcgis-runtime-samples-java/wiki/OAuth](wiki) for details. -

    Enter the details of the application registered on arcgis.com and click sign-in. -This will open a sign-in dialog. After the credentials are entered correctly, the sample -will receive an authorization code from the ArcGIS platform. This authorization code will then be used to obtain an -access token. This access token is used later to access user's profile.

    +Enter the details of the application registered on arcgis.com and click sign-in. This will open a sign-in dialog. After the credentials are entered correctly, the sample will receive an authorization code from the ArcGIS platform. This authorization code will then be used to obtain an access token. This access token is used later to access user's profile. -

    How it works

    +## How it works -
      -
    1. Setup an OAuthConfiguration with the settings of an application registered in the ArcGIS platform.
    2. -
    3. Setup an AuthenticationChallengeHandler that challenges the user for authentication. You could - create a custom handler similar to the one created in this sample: OAuthChallengeHandler.
    4. -
    5. On trying to access a secured resource, the authentication challenge in invoked.
    6. -
    7. OAuthChallengeHandler directs the user to a sign-in page (using a WebView) from ArcGIS platform.
    8. -
    9. On successful sign-in, the ArcGIS platform provides an authorization code.
    10. -
    11. Use the authorization code to create a OAuthTokenCredentialRequest. This will be used by the Runtime - to request an access token. The access token is then used to request a secured resource in the ArcGIS platform.
    12. -
    +1. Setup an `OAuthConfiguration` with the settings of an application registered in the ArcGIS platform. +2. Setup an `AuthenticationChallengeHandler` that challenges the user for authentication. You could create a custom handler similar to the one created in this sample: `OAuthChallengeHandler`. +3. On trying to access a secured resource, the authentication challenge in invoked. +4. `OAuthChallengeHandler` directs the user to a sign-in page (using a `WebView`) from ArcGIS platform. +5. On successful sign-in, the ArcGIS platform provides an authorization code. +6. Use the authorization code to create a `OAuthTokenCredentialRequest`. This will be used by the Runtime to request an access token. The access token is then used to request a secured resource in the ArcGIS platform. -

    Relevant API

    +## Relevant API -
      -
    • AuthenticationChallengeHandler
    • -
    • OAuthConfiguration
    • -
    • OAuthTokenCredential
    • -
    • OAuthTokenCredentialRequest
    • -
    • Portal
    • -
    • PortalUser
    • -
    +* AuthenticationChallengeHandler +* OAuthConfiguration +* OAuthTokenCredential +* OAuthTokenCredentialRequest +* Portal +* PortalUser -

    Additional information

    +## Additional information -

    The JavaFX WebEngine used in the OAuthChallengeHandler in this sample may not support rendering of some modern web elements returned by the AuthorizationURL. For this reason, we append &display=classic to the authorization URL, to ensure it renders properly.

    \ No newline at end of file +The JavaFX `WebEngine` used in the `OAuthChallengeHandler` in this sample may not support rendering of some modern web elements returned by the `AuthorizationURL`. For this reason, we append `&display=classic` to the authorization URL, to ensure it renders properly. diff --git a/portal/token-authentication/README.md b/portal/token-authentication/README.md index 5d4588cd0a..af3b11545c 100644 --- a/portal/token-authentication/README.md +++ b/portal/token-authentication/README.md @@ -1,40 +1,36 @@ -

    Token authentication

    +# Token authentication -

    Access a map service that is secured with an ArcGIS token-based authentication.

    +Access a map service that is secured with an ArcGIS token-based authentication. -

    +![](TokenAuthentication.png) -

    Use case

    +## Use case -

    Applications often require accessing data from private map services on remote servers. A token authentication system can be used to allow app users who hold a valid username and password to access the remote service.

    +Applications often require accessing data from private map services on remote servers. A token authentication system can be used to allow app users who hold a valid username and password to access the remote service. -

    How to use the sample

    +## How to use the sample -

    When starting the sample, the user is challenged for an ArcGIS Online login to view the protected map service. Enter a username and password for an ArcGIS Online named user account (such as your ArcGIS for Developers account). Upon successful authentication, the protected map service will display in the map.

    +When starting the sample, the user is challenged for an ArcGIS Online login to view the protected map service. Enter a username and password for an ArcGIS Online named user account (such as your ArcGIS for Developers account). Upon successful authentication, the protected map service will display in the map. -

    How it works

    +## How it works -
      -
    1. Create an AuthenticationChallengeHandler using the DefaultAuthenticationChallengeHandler to handle the challenges sent by the protected map service.
    2. -
    3. Set the AuthenticationChallengeHandler used by the AuthenticationManager.
    4. -
    5. Create a Portal to ArcGIS Online.
    6. -
    7. Create a PortalItem for the protected web map using the Portal and Item ID of the protected map service as parameters
    8. -
    9. Create an ArcGISMap from the portal item, and display it in a MapView
    10. -
    11. Set the map to display in the map view.
    12. -
    +1. Create an `AuthenticationChallengeHandler` using the `DefaultAuthenticationChallengeHandler` to handle the challenges sent by the protected map service. +2. Set the `AuthenticationChallengeHandler` used by the `AuthenticationManager`. +3. Create a `Portal` to ArcGIS Online. +4. Create a `PortalItem` for the protected web map using the `Portal` and Item ID of the protected map service as parameters +5. Create an `ArcGISMap` from the portal item, and display it in a `MapView` +6. Set the map to display in the map view. -

    Relevant API

    +## Relevant API -
      -
    • AuthenticationChallengeHandler
    • -
    • AuthenticationManager
    • -
    • DefaultAuthenticationChallengeHandler
    • -
    • Map
    • -
    • MapView
    • -
    • Portal
    • -
    • PortalItem
    • -
    +* AuthenticationChallengeHandler +* AuthenticationManager +* DefaultAuthenticationChallengeHandler +* Map +* MapView +* Portal +* PortalItem -

    Tags

    +## Tags -

    authentication, map service, security, token

    \ No newline at end of file +authentication, map service, security, token diff --git a/portal/webmap-keyword-search/README.md b/portal/webmap-keyword-search/README.md index e2fd5c282b..61f45fd36b 100644 --- a/portal/webmap-keyword-search/README.md +++ b/portal/webmap-keyword-search/README.md @@ -1,32 +1,27 @@ -

    Webmap Keyword Search

    +# Webmap Keyword Search -

    Find webmaps within a portal using a keyword.

    +Find webmaps within a portal using a keyword. -

    +![](WebmapKeywordSearch.png) -

    How to use the sample

    +## How to use the sample -Input a keyword into the text field and press Enter to search. Click on a result to show the webmap in the map view. -Click on the "Find More Results" button to add more results to the list. +Input a keyword into the text field and press Enter to search. Click on a result to show the webmap in the map view. Click on the "Find More Results" button to add more results to the list. -

    How it works

    +## How it works -

    To search for webmaps in a Portal matching a keyword:

    -
      -
    1. Create a Portal and load it
    2. -
    3. Create PortalItemQueryParameters. Set the type to PortalItem.Type.WEBMAP and the - query to the keyword you want to search
    4. -
    5. Use portal.findItemsAsync(params) to get the first set of matching items.
    6. -
    7. Get more results with portal.findItemsAsync(portalQueryResultSet.getNextQueryParameters())
    8. -
    +To search for webmaps in a `Portal` matching a keyword: -

    Relevant API

    +1. Create a `Portal` and load it +2. Create `PortalItemQueryParameters`. Set the type to `PortalItem.Type.WEBMAP` and the query to the keyword you want to search +3. Use `portal.findItemsAsync(params)` to get the first set of matching items. +4. Get more results with `portal.findItemsAsync(portalQueryResultSet.getNextQueryParameters())` -
      -
    • ArcGISMap
    • -
    • MapView
    • -
    • Portal
    • -
    • PortalItem
    • -
    • PortalQueryParameters
    • -
    • PortalQueryResultSet
    • -
    +## Relevant API + +* ArcGISMap +* MapView +* Portal +* PortalItem +* PortalQueryParameters +* PortalQueryResultSet diff --git a/raster/blend-renderer/README.md b/raster/blend-renderer/README.md index 33b5be8c96..3f3ea93a20 100644 --- a/raster/blend-renderer/README.md +++ b/raster/blend-renderer/README.md @@ -1,41 +1,33 @@ -

    Blend Renderer

    - -

    Apply a blend renderer to a raster.

    - -

    Blend renderers can be used to blend elevation data with imagery, creating a 3D effect.

    - -

    - -

    How to use the sample

    - -

    Choose and adjust the settings to update the blend renderer on the raster layer. To use a color ramp instead of -the satellite imagery, choose the color ramp type NONE.

    - -

    How it works

    - -

    To apply a BlendRenderer to a RasterLayer:

    -
      -
    1. Create a Raster from a raster file
    2. -
    3. Create a RasterLayer from the raster
    4. -
    5. Create a Basemap from the raster layer and set it to the map
    6. -
    7. Create a Raster for elevation from a grayscale raster file
    8. -
    9. Create a BlendRenderer, specifying the elevation raster, color ramp, and other properties -
        -
      • If you specify a non-null color ramp, use the elevation raster as the base raster in addition to the - elevation raster parameter. That way the color ramp is used instead of the satellite imagery
      • -
      -
    10. -
    11. Set the renderer on the raster layer with rasterLayer.setRenderer(renderer).
    12. -
    - -

    Relevant API

    - -
      -
    • ArcGISMap
    • -
    • Basemap
    • -
    • BlendRenderer
    • -
    • ColorRamp
    • -
    • MapView
    • -
    • Raster
    • -
    • RasterLayer
    • -
    +# Blend Renderer + +Apply a blend renderer to a raster. + +Blend renderers can be used to blend elevation data with imagery, creating a 3D effect. + +![](BlendRenderer.png) + +## How to use the sample + +Choose and adjust the settings to update the blend renderer on the raster layer. To use a color ramp instead of the satellite imagery, choose the color ramp type NONE. + +## How it works + +To apply a `BlendRenderer` to a `RasterLayer`: + +1. Create a `Raster` from a raster file +2. Create a `RasterLayer` from the raster +3. Create a `Basemap` from the raster layer and set it to the map +4. Create a `Raster` for elevation from a grayscale raster file +5. Create a `BlendRenderer`, specifying the elevation raster, color ramp, and other properties + * If you specify a non-null color ramp, use the elevation raster as the base raster in addition to the elevation raster parameter. That way the color ramp is used instead of the satellite imagery +6. Set the renderer on the raster layer with `rasterLayer.setRenderer(renderer)`. + +## Relevant API + +* ArcGISMap +* Basemap +* BlendRenderer +* ColorRamp +* MapView +* Raster +* RasterLayer diff --git a/raster/colormap-renderer/README.md b/raster/colormap-renderer/README.md index 4740291c92..d2b1bb1082 100644 --- a/raster/colormap-renderer/README.md +++ b/raster/colormap-renderer/README.md @@ -1,29 +1,25 @@ -

    Colormap Renderer

    +# Colormap Renderer -

    Apply a colormap renderer to a raster.

    +Apply a colormap renderer to a raster. -

    Colormap renderers can be used to replace values on a raster layer with a color based on the original value brightness.

    +Colormap renderers can be used to replace values on a raster layer with a color based on the original value brightness. -

    +![](ColormapRenderer.png) -

    How it works

    +## How it works -

    To apply a ColormapRenderer to a RasterLayer:

    -
      -
    1. Create a Raster from a raster file
    2. -
    3. Create a RasterLayer from the raster
    4. -
    5. Create a List<Integer> representing colors. Colors at the beginning of the list replace the darkest values in - the raster and colors at the end of the list replaced the brightest values of the raster.
    6. -
    7. Create a ColormapRenderer with the color list and apply it to the raster layer with rasterLayer.setRasterRenderer(colormapRenderer)
    8. -
    +To apply a `ColormapRenderer` to a `RasterLayer`: -

    Relevant API

    +1. Create a `Raster` from a raster file +2. Create a `RasterLayer` from the raster +3. Create a `List<Integer>` representing colors. Colors at the beginning of the list replace the darkest values in the raster and colors at the end of the list replaced the brightest values of the raster. +4. Create a `ColormapRenderer` with the color list and apply it to the raster layer with `rasterLayer.setRasterRenderer(colormapRenderer)` -
      -
    • ArcGISMap
    • -
    • Basemap
    • -
    • ColormapRenderer
    • -
    • MapView
    • -
    • Raster
    • -
    • RasterLayer
    • -
    +## Relevant API + +* ArcGISMap +* Basemap +* ColormapRenderer +* MapView +* Raster +* RasterLayer diff --git a/raster/hillshade-renderer/README.md b/raster/hillshade-renderer/README.md index 08805b8f2f..a173817bb7 100644 --- a/raster/hillshade-renderer/README.md +++ b/raster/hillshade-renderer/README.md @@ -1,33 +1,30 @@ -

    Hillshade Renderer

    +# Hillshade Renderer -

    Apply a hillshade renderer to a raster.

    +Apply a hillshade renderer to a raster. -

    Hillshade renderers can adjust a grayscale raster (usually of terrain) according to a sun angle.

    +Hillshade renderers can adjust a grayscale raster (usually of terrain) according to a sun angle. -

    +![](HillshadeRenderer.png) -

    How to use the sample

    +## How to use the sample -

    Choose and adjust the settings to update the hillshade renderer on the raster layer.

    +Choose and adjust the settings to update the hillshade renderer on the raster layer. -

    How it works

    +## How it works -

    To apply a HillshadeRenderer to a RasterLayer:

    -
      -
    1. Create a Raster from a grayscale raster file
    2. -
    3. Create a RasterLayer from the raster
    4. -
    5. Create a Basemap from the raster layer and set it to the map
    6. -
    7. Create a HillshadeRenderer, specifying the slope type and other properties
    8. -
    9. Set the renderer on the raster layer with rasterLayer.setRenderer(renderer).
    10. -
    +To apply a `HillshadeRenderer` to a `RasterLayer`: -

    Relevant API

    +1. Create a `Raster` from a grayscale raster file +2. Create a `RasterLayer` from the raster +3. Create a `Basemap` from the raster layer and set it to the map +4. Create a `HillshadeRenderer`, specifying the slope type and other properties +5. Set the renderer on the raster layer with `rasterLayer.setRenderer(renderer)`. -
      -
    • ArcGISMap
    • -
    • Basemap
    • -
    • HillshadeRenderer
    • -
    • MapView
    • -
    • Raster
    • -
    • RasterLayer
    • -
    +## Relevant API + +* ArcGISMap +* Basemap +* HillshadeRenderer +* MapView +* Raster +* RasterLayer diff --git a/raster/raster-function/README.md b/raster/raster-function/README.md index cbe83fd552..32673830e9 100644 --- a/raster/raster-function/README.md +++ b/raster/raster-function/README.md @@ -1,33 +1,29 @@ -

    Raster Function

    - -

    Apply a raster function to a raster.

    - -

    Raster functions are operations performed on a raster to apply on-the-fly processing. In this sample, a hillshade -raster function is applied to an online raster image service.

    - -

    - -

    How it works

    - -

    To create a RasterLayer using a RasterFunction and add it to the map:

    -
      -
    1. Create an initial raster such as an ImageServiceRaster
    2. -
    3. Create a RasterFunction from a json string source
    4. -
    5. Get the raster function's arguments with rasterFunction.getArguments()
    6. -
    7. Set the initial raster and raster name in the arguments: arguments.setRaster(arguments.getRasterNames().get(0), imageServiceRaster)
    8. -
    9. Create a new Raster from the function
    10. -
    11. Create a RasterLayer with the new raster
    12. -
    13. Add it as an operational layer with map.getOperationalLayers().add(rasterLayer)
    14. -
    - -

    Relevant API

    - -
      -
    • ArcGISMap
    • -
    • Basemap
    • -
    • ImageServiceRaster
    • -
    • MapView
    • -
    • RasterFunction
    • -
    • RasterFunctionArguments
    • -
    • RasterLayer
    • -
    +# Raster Function + +Apply a raster function to a raster. + +Raster functions are operations performed on a raster to apply on-the-fly processing. In this sample, a hillshade raster function is applied to an online raster image service. + +![](RasterFunction.png) + +## How it works + +To create a `RasterLayer` using a `RasterFunction` and add it to the map: + +1. Create an initial raster such as an `ImageServiceRaster` +2. Create a `RasterFunction` from a json string source +3. Get the raster function's arguments with `rasterFunction.getArguments()` +4. Set the initial raster and raster name in the arguments: `arguments.setRaster(arguments.getRasterNames().get(0), imageServiceRaster)` +5. Create a new `Raster` from the function +6. Create a `RasterLayer` with the new raster +7. Add it as an operational layer with `map.getOperationalLayers().add(rasterLayer)` + +## Relevant API + +* ArcGISMap +* Basemap +* ImageServiceRaster +* MapView +* RasterFunction +* RasterFunctionArguments +* RasterLayer diff --git a/raster/raster-layer-file/README.md b/raster/raster-layer-file/README.md index 4c935ea5d3..98f231ab2a 100644 --- a/raster/raster-layer-file/README.md +++ b/raster/raster-layer-file/README.md @@ -1,24 +1,21 @@ -

    Raster Layer File

    +# Raster Layer File -

    Display raster data from a local file.

    +Display raster data from a local file. -

    +![](RasterLayerFile.png) -

    How it works

    +## How it works -

    To add aRasterLayer as an operational layer from a local raster file:

    -
      -
    1. Create aRaster from a raster file
    2. -
    3. Create aRasterLayer from the raster
    4. -
    5. Add it as an operational layer with map.getOperationalLayers().add(rasterLayer)
    6. -
    +To add a`RasterLayer` as an operational layer from a local raster file: -

    Relevant API

    +1. Create a`Raster` from a raster file +2. Create a`RasterLayer` from the raster +3. Add it as an operational layer with `map.getOperationalLayers().add(rasterLayer)` -
      -
    • ArcGISMap
    • -
    • Basemap
    • -
    • MapView
    • -
    • Raster
    • -
    • RasterLayer
    • -
    +## Relevant API + +* ArcGISMap +* Basemap +* MapView +* Raster +* RasterLayer diff --git a/raster/raster-layer-geopackage/README.md b/raster/raster-layer-geopackage/README.md index e7c813886e..b93a63e33e 100644 --- a/raster/raster-layer-geopackage/README.md +++ b/raster/raster-layer-geopackage/README.md @@ -1,27 +1,23 @@ -

    Raster Layer GeoPackage

    +# Raster Layer GeoPackage -

    Display raster data from a geopackage.

    +Display raster data from a geopackage. -

    +![](RasterLayerGeoPackage.png) -

    How it works

    +## How it works -

    To add aRasterLayer as an operational layer from a GeoPackage:

    -
      -
    1. Create and load a GeoPackage, specifying the path to the local .gpkg file.
    2. -
    3. When it is done loading, get the GeoPackageRasters inside with geoPackage - .getGeoPackageRasters().
    4. -
    5. Construct a RasterLayer with the GeoPackageRaster in the list you want to use.
    6. -
    7. Add the raster layer to the map as an operational layer map.getOperationalLayers().add(rasterLayer).
    8. -
    +To add a`RasterLayer` as an operational layer from a `GeoPackage`: -

    Relevant API

    +1. Create and load a `GeoPackage`, specifying the path to the local .gpkg file. +2. When it is done loading, get the `GeoPackageRaster`s inside with `geoPackage.getGeoPackageRasters()`. +3. Construct a `RasterLayer` with the `GeoPackageRaster` in the list you want to use. +4. Add the raster layer to the map as an operational layer `map.getOperationalLayers().add(rasterLayer)`. -
      -
    • ArcGISMap
    • -
    • Basemap
    • -
    • GeoPackage
    • -
    • GeoPackageRaster
    • -
    • MapView
    • -
    • RasterLayer
    • -
    +## Relevant API + +* ArcGISMap +* Basemap +* GeoPackage +* GeoPackageRaster +* MapView +* RasterLayer diff --git a/raster/raster-layer-url/README.md b/raster/raster-layer-url/README.md index 9ebbe866bb..4f3c6e5654 100644 --- a/raster/raster-layer-url/README.md +++ b/raster/raster-layer-url/README.md @@ -1,24 +1,21 @@ -

    Raster Layer URL

    +# Raster Layer URL -

    Show raster data from an online raster image service.

    +Show raster data from an online raster image service. -

    +![](RasterLayerURL.png) -

    How it works

    +## How it works -

    To add a RasterLayer as an operational layer from an ImageServiceRaster:

    -
      -
    1. Create an ImageServiceRaster using the service's URL
    2. -
    3. Create a RasterLayer from the raster
    4. -
    5. Add it as an operational layer with map.getOperationalLayers().add(rasterLayer)
    6. -
    +To add a `RasterLayer` as an operational layer from an `ImageServiceRaster`: -

    Relevant API

    +1. Create an `ImageServiceRaster` using the service's URL +2. Create a `RasterLayer` from the raster +3. Add it as an operational layer with `map.getOperationalLayers().add(rasterLayer)` -
      -
    • ArcGISMap
    • -
    • Basemap
    • -
    • ImageServiceRaster
    • -
    • MapView
    • -
    • RasterLayer
    • -
    +## Relevant API + +* ArcGISMap +* Basemap +* ImageServiceRaster +* MapView +* RasterLayer diff --git a/raster/raster-rendering-rule/README.md b/raster/raster-rendering-rule/README.md index 98d3833050..34ca5df085 100644 --- a/raster/raster-rendering-rule/README.md +++ b/raster/raster-rendering-rule/README.md @@ -1,44 +1,40 @@ -

    Raster rendering rule

    +# Raster rendering rule -

    Display a raster on a map and apply different rendering rules to that raster.

    +Display a raster on a map and apply different rendering rules to that raster. -

    +![](RasterRenderingRule.png) -

    Use case

    +## Use case -

    Raster images whose individual pixels represent elevation values can be rendered in a number of different ways, including representation of slope, aspect, hillshade, and shaded relief. Applying these different rendering rules to the same raster allows for a powerful visual analysis of the data. For example, a geologist could interrogate the raster image to map subtle geological features on a landscape, which may become apparent only through comparing the raster when rendered using several different rules.

    +Raster images whose individual pixels represent elevation values can be rendered in a number of different ways, including representation of slope, aspect, hillshade, and shaded relief. Applying these different rendering rules to the same raster allows for a powerful visual analysis of the data. For example, a geologist could interrogate the raster image to map subtle geological features on a landscape, which may become apparent only through comparing the raster when rendered using several different rules. -

    How to use the sample

    +## How to use the sample -

    Run the sample and use the drop-down menu at the top to select a rendering rule.

    +Run the sample and use the drop-down menu at the top to select a rendering rule. -

    How it works

    +## How it works -
      -
    1. Create an ImageServiceRaster using a URL to an online image service.
    2. -
    3. After loading the raster, use imageServiceRaster.getServiceInfo().getRenderingRuleInfos() to get a list of RenderingRuleInfo supported by the service.
    4. -
    5. Choose a rendering rule info to apply and use it to create a RenderingRule.
    6. -
    7. Create a new ImageServiceRaster using the same URL.
    8. -
    9. Apply the rendering rule to the new raster using imageServiceRaster.setRenderingRule(renderingRuleInfo).
    10. -
    11. Create a RasterLayer from the raster for display.
    12. -
    +1. Create an `ImageServiceRaster` using a URL to an online image service. +2. After loading the raster, use `imageServiceRaster.getServiceInfo().getRenderingRuleInfos()` to get a list of `RenderingRuleInfo` supported by the service. +3. Choose a rendering rule info to apply and use it to create a `RenderingRule`. +4. Create a new `ImageServiceRaster` using the same URL. +5. Apply the rendering rule to the new raster using `imageServiceRaster.setRenderingRule(renderingRuleInfo)`. +6. Create a `RasterLayer` from the raster for display. -

    Relevant API

    +## Relevant API -
      -
    • ImageServiceRaster
    • -
    • RasterLayer
    • -
    • RenderingRule
    • -
    +* ImageServiceRaster +* RasterLayer +* RenderingRule -

    About the data

    +## About the data -

    This raster image service contains 9 LAS files covering Charlotte, North Carolina's downtown area. The lidar data was collected in 2007. Four Raster Rules are available for selection: None, RFTAspectColor, RFTHillshade, and RFTShadedReliefElevationColorRamp.

    +This raster image service contains 9 LAS files covering Charlotte, North Carolina's downtown area. The lidar data was collected in 2007. Four Raster Rules are available for selection: None, RFTAspectColor, RFTHillshade, and RFTShadedReliefElevationColorRamp. -

    Additional information

    +## Additional information -

    Image service rasters of any type can have rendering rules applied to them; they need not necessarily be elevation rasters. For a list of raster functions and the syntax for rendering rules, see the ArcGIS REST API documentation: https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm.

    +Image service rasters of any type can have rendering rules applied to them; they need not necessarily be elevation rasters. For a list of raster functions and the syntax for rendering rules, see the ArcGIS REST API documentation: https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm. -

    Tags

    +## Tags -

    raster, rendering rules, visualization

    +raster, rendering rules, visualization diff --git a/raster/rgb-renderer/README.md b/raster/rgb-renderer/README.md index 5e0f53455f..37c4dc5d66 100644 --- a/raster/rgb-renderer/README.md +++ b/raster/rgb-renderer/README.md @@ -1,35 +1,31 @@ -

    Rgb Renderer

    +# Rgb Renderer -

    Apply an RGB renderer to a raster.

    +Apply an RGB renderer to a raster. -

    An RGB renderer is used to adjust the color bands of a multispectral image.

    +An RGB renderer is used to adjust the color bands of a multispectral image. -

    +![](RgbRenderer.png) -

    How to use the sample

    +## How to use the sample -

    Choose one of the stretch parameter types. The other options will adjust based on the chosen type. Add your -inputs and press the Update button to update the renderer.

    +Choose one of the stretch parameter types. The other options will adjust based on the chosen type. Add your inputs and press the Update button to update the renderer. -

    How it works

    +## How it works -

    To apply a RgbRenderer to a RasterLayer:

    -
      -
    1. Create a Raster from a multispectral raster file
    2. -
    3. Create a RasterLayer from the raster
    4. -
    5. Create a Basemap from the raster layer and set it to the map
    6. -
    7. Create a RgbRenderer, specifying the stretch parameters and other properties
    8. -
    9. Set the renderer on the raster layer with rasterLayer.setRenderer(renderer)
    10. -
    +To apply a `RgbRenderer` to a `RasterLayer`: -

    Relevant API

    +1. Create a `Raster` from a multispectral raster file +2. Create a `RasterLayer` from the raster +3. Create a `Basemap` from the raster layer and set it to the map +4. Create a `RgbRenderer`, specifying the stretch parameters and other properties +5. Set the renderer on the raster layer with `rasterLayer.setRenderer(renderer)` -
      -
    • ArcGISMap
    • -
    • Basemap
    • -
    • MapView
    • -
    • Raster
    • -
    • RasterLayer
    • -
    • RgbRenderer
    • -
    • StretchParameters
    • -
    +## Relevant API + +* ArcGISMap +* Basemap +* MapView +* Raster +* RasterLayer +* RgbRenderer +* StretchParameters diff --git a/raster/stretch-renderer/README.md b/raster/stretch-renderer/README.md index 7fc395de77..54101588cb 100644 --- a/raster/stretch-renderer/README.md +++ b/raster/stretch-renderer/README.md @@ -1,36 +1,31 @@ -

    Stretch Renderer

    +# Stretch Renderer -

    Apply a stretch renderer to a raster.

    +Apply a stretch renderer to a raster. -

    A stretch renderer can be used to stretch tightly grouped values -across the available value spectrum, creating more contrast between objects. This is useful for identifying objects -in dark images.

    +A stretch renderer can be used to stretch tightly grouped values across the available value spectrum, creating more contrast between objects. This is useful for identifying objects in dark images. -

    +![](StretchRenderer.png) -

    How to use the sample

    +## How to use the sample -

    Choose one of the stretch parameter types. The other options will adjust based on the chosen type.

    +Choose one of the stretch parameter types. The other options will adjust based on the chosen type. -

    How it works

    +## How it works -

    To apply a StretchRenderer to a RasterLayer:

    -
      -
    1. Create a Raster from a raster file
    2. -
    3. Create a RasterLayer from the raster
    4. -
    5. Create a Basemap from the raster layer and set it to the map
    6. -
    7. Create a StretchRenderer, specifying the stretch parameters and other properties
    8. -
    9. Set the renderer on the raster layer with rasterLayer.setRenderer(renderer)
    10. -
    +To apply a `StretchRenderer` to a `RasterLayer`: -

    Relevant API

    +1. Create a `Raster` from a raster file +2. Create a `RasterLayer` from the raster +3. Create a `Basemap` from the raster layer and set it to the map +4. Create a `StretchRenderer`, specifying the stretch parameters and other properties +5. Set the renderer on the raster layer with `rasterLayer.setRenderer(renderer)` -
      -
    • ArcGISMap
    • -
    • Basemap
    • -
    • MapView
    • -
    • Raster
    • -
    • RasterLayer
    • -
    • StretchParameters
    • -
    • StretchRenderer
    • -
    +## Relevant API + +* ArcGISMap +* Basemap +* MapView +* Raster +* RasterLayer +* StretchParameters +* StretchRenderer diff --git a/scene/add-a-point-scene-layer/README.md b/scene/add-a-point-scene-layer/README.md index 5661746365..ba2054c4de 100644 --- a/scene/add-a-point-scene-layer/README.md +++ b/scene/add-a-point-scene-layer/README.md @@ -1,41 +1,35 @@ -

    Add a point scene layer

    +# Add a point scene layer -

    View a point scene layer from a scene service.

    +View a point scene layer from a scene service. -

    +![](AddAPointSceneLayer.png) -

    Use case

    +## Use case -

    Point scene layers can efficiently display large amounts of point features. While point cloud layers can only display simple symbols, point scene layers can display any type of billboard symbol or even 3D models, as long as the location of the symbol can be described by a point. Points are cached and automatically thinned when zoomed out to improve performance.

    +Point scene layers can efficiently display large amounts of point features. While point cloud layers can only display simple symbols, point scene layers can display any type of billboard symbol or even 3D models, as long as the location of the symbol can be described by a point. Points are cached and automatically thinned when zoomed out to improve performance. -

    How to use the sample

    +## How to use the sample -

    Pan around the scene and zoom in. Notice how many thousands of additional features appear at each successive zoom scale.

    +Pan around the scene and zoom in. Notice how many thousands of additional features appear at each successive zoom scale. -

    How it works

    +## How it works -
      -
    1. Create a scene.
    2. +1. Create a scene. +2. Create an `ArcGISSceneLayer` with the URL to a point scene layer service. +3. Add the layer to the scene's operational layers collection. -
    3. Create an ArcGISSceneLayer with the URL to a point scene layer service.
    4. +## Relevant API -
    5. Add the layer to the scene's operational layers collection.
    6. -
    +* ArcGISSceneLayer -

    Relevant API

    +## About the data -
      -
    • ArcGISSceneLayer
    • -
    +This dataset contains more than 40,000 points representing world airports. Points are retrieved on demand by the scene layer as the user navigates the scene. -

    About the data

    +## Additional information -

    This dataset contains more than 40,000 points representing world airports. Points are retrieved on demand by the scene layer as the user navigates the scene.

    +Point scene layers can also be retrieved from scene layer packages (.slpk) and mobile scene packages (.mspk). -

    Additional information

    +## Tags -

    Point scene layers can also be retrieved from scene layer packages (.slpk) and mobile scene packages (.mspk).

    - -

    Tags

    - -

    3D, point scene layer, layers

    \ No newline at end of file +3D, point scene layer, layers diff --git a/scene/add-an-integrated-mesh-layer/README.md b/scene/add-an-integrated-mesh-layer/README.md index c75e6d4284..ca5b04b9e9 100644 --- a/scene/add-an-integrated-mesh-layer/README.md +++ b/scene/add-an-integrated-mesh-layer/README.md @@ -1,32 +1,24 @@ -

    Add an integrated mesh layer

    +# Add an integrated mesh layer -

    View an integrated mesh layer from a scene service.

    +View an integrated mesh layer from a scene service. -

    +![](AddAnIntegratedMeshLayer.png) -

    Use Case

    +## Use Case -

    An integrated mesh can represent artificial and natural 3D features such as -building walls, trees, valleys, and cliffs, with realistic textures and -elevation information.

    +An integrated mesh can represent artificial and natural 3D features such as building walls, trees, valleys, and cliffs, with realistic textures and +elevation information. -

    How it works

    +## How it works -
      -
    1. Create a scene.
    2. +1. Create a scene. +2. Create an `IntegratedMeshLayer` with the URL to an integrated mesh layer scene service. +3. Add the layer to the scene's operational layers collection. -
    3. Create an IntegratedMeshLayer with the URL to an integrated mesh layer -scene service.
    4. +## Relevant API -
    5. Add the layer to the scene's operational layers collection.
    6. -
    +* IntegratedMeshLayer -

    Relevant API

    +## Tags -
      -
    • IntegratedMeshLayer
    • -
    - -

    Tags

    - -

    3D, integrated mesh, layers

    \ No newline at end of file +3D, integrated mesh, layers diff --git a/scene/animate-3d-graphic/README.md b/scene/animate-3d-graphic/README.md index b70244a233..f0af3b5f01 100644 --- a/scene/animate-3d-graphic/README.md +++ b/scene/animate-3d-graphic/README.md @@ -1,73 +1,66 @@ -

    Animate 3d Graphic

    - -

    Animate a graphic's position and orientation and follow it with the camera.

    - -

    - -

    How to use the sample

    - -

    Animation Controls (Top Left Corner): -

    • Select a mission -- selects a location with a route for plane to fly.
    • -
    • Mission progress -- shows how far along the route the plane is. Slide to change keyframe in animation.
    • -
    • Play -- toggles playing and stopping the animation.
    • -
    • Follow -- toggles camera following plane
    -

    - -

    Speed Slider (Top Right Corner): -

    • controls speed of animation
    -

    - -

    2D Map Controls (Bottom Left Corner): -

    • Plus and Minus -- controls distance of 2D view from ground level
    -

    - -

    Moving the Camera: -

    • Simply use regular zoom and pan interactions with the mouse. When in follow mode, the -OrbitGeoElementCameraController being used will keep the camera locked to the plane.
    -

    - -

    How it works

    - -

    To animate a Graphic by updating it's Geometrys, heading, pitch, and roll:

    - -
      -
    1. Create a GraphicsOverlay and attach it to the SceneView.
    2. -
    3. Create a ModelSceneSymbol with AnchorPosition.CENTER.
    4. -
    5. Create a Graphic(Geometry, Symbol). -
      • set geometry to a point where graphic will be located in scene view
      • -
      • set symbol to the one we made above
    6. -
    7. Add Attributes to graphic. -
      • Get attributes from graphic, Graphic.getAttributes().
      • -
      • Add heading, pitch, and roll attribute, attributes.put("[HEADING]", heading);
    8. -
    9. Create a SimpleRenderer to access and set it's expression properties. -
      • access properties with Renderer.getSceneProperties()
      • -
      • set heading, pitch, and roll expressions, SceneProperties.setHeadingExpression("[HEADING]").
    10. -
    11. Add graphic to the graphics overlay.
    12. -
    13. Set renderer to graphics overlay, GraphicsOverlay.setRenderer(Renderer)
    14. -
    15. Update graphic's location, Graphic.setGeometry(Point).
    16. -
    17. Update symbol's heading, pitch, and roll, attributes.replace("[HEADING]", heading).
    18. -
    - -

    Relevant API

    - -
      -
    • 3D
    • -
    • ArcGISMap
    • -
    • ArcGISScene
    • -
    • Camera
    • -
    • GlobeCameraController
    • -
    • Graphic
    • -
    • GraphicsOverlay
    • -
    • LayerSceneProperties.SurfacePlacement
    • -
    • MapView
    • -
    • ModelSceneSymbol
    • -
    • OrbitGeoElementCameraController
    • -
    • Point
    • -
    • Polyline
    • -
    • Renderer
    • -
    • Renderer.SceneProperties
    • -
    • SceneView
    • -
    • Viewpoint
    • -
    +# Animate 3. Graphic +Animate a graphic's position and orientation and follow it with the camera. +![](Animate3dGraphic.png) + +## How to use the sample + +Animation Controls (Top Left Corner): + +* Select a mission -- selects a location with a route for plane to fly. +* Mission progress -- shows how far along the route the plane is. Slide to change keyframe in animation. +* Play -- toggles playing and stopping the animation. +* Follow -- toggles camera following plane + +Speed Slider (Top Right Corner): + +* controls speed of animation + +2. Map Controls (Bottom Left Corner): + +* Plus and Minus -- controls distance of 2. view from ground level + +Moving the Camera: + +* Simply use regular zoom and pan interactions with the mouse. When in follow mode, the `OrbitGeoElementCameraController` being used will keep the camera locked to the plane. + +## How it works + +To animate a `Graphic` by updating it's `Geometry`s, heading, pitch, and roll: + +1. Create a `GraphicsOverlay` and attach it to the `SceneView`. +2. Create a `ModelSceneSymbol` with `AnchorPosition.CENTER`. +3. Create a `Graphic(Geometry, Symbol)`. + * set geometry to a point where graphic will be located in scene view + * set symbol to the one we made above +4. Add Attributes to graphic. + * Get attributes from graphic, `Graphic.getAttributes()`. + * Add heading, pitch, and roll attribute, `attributes.put("[HEADING]", heading)`; +5. Create a `SimpleRenderer` to access and set it's expression properties. + * access properties with `Renderer.getSceneProperties()` + * set heading, pitch, and roll expressions, `SceneProperties.setHeadingExpression("[HEADING]")`. +6. Add graphic to the graphics overlay. +7. Set renderer to graphics overlay, `GraphicsOverlay.setRenderer(Renderer)` +8. Update graphic's location, `Graphic.setGeometry(Point)`. +9. Update symbol's heading, pitch, and roll, `attributes.replace("[HEADING]", heading)`. + +## Relevant API + +* 3D +* ArcGISMap +* ArcGISScene +* Camera +* GlobeCameraController +* Graphic +* GraphicsOverlay +* LayerSceneProperties.SurfacePlacement +* MapView +* ModelSceneSymbol +* OrbitGeoElementCameraController +* Point +* Polyline +* Renderer +* Renderer.SceneProperties +* SceneView +* Viewpoint diff --git a/scene/change-atmosphere-effect/README.md b/scene/change-atmosphere-effect/README.md index 8b9ceeb223..044d1db23f 100644 --- a/scene/change-atmosphere-effect/README.md +++ b/scene/change-atmosphere-effect/README.md @@ -1,44 +1,34 @@ -

    Change Atmosphere Effect

    +# Change Atmosphere Effect -

    Change the appearance of the atmosphere in a scene.

    +Change the appearance of the atmosphere in a scene. -

    +![](ChangeAtmosphereEffect.gif) -

    How to use the sample

    +## How to use the sample -

    Select one of the three available atmosphere effects. The sky will change to display the selected atmosphere effect.

    +Select one of the three available atmosphere effects. The sky will change to display the selected atmosphere effect. -

    How it works

    +## How it works -

    To change the atmosphere effect:

    +To change the atmosphere effect: -
      -
    1. Create an ArcGISScene and display it in a SceneView.
    2. +1. Create an `ArcGISScene` and display it in a `SceneView`. +2. Change the atmosphere effect with `sceneView.setAtmosphereEffect(atmosphereEffect)`. -
    3. Change the atmosphere effect with sceneView.setAtmosphereEffect(atmosphereEffect).
    4. -
    +## Relevant API -

    Relevant API

    +* ArcGISScene +* AtmosphereEffect +* SceneView -
      -
    • ArcGISScene
    • +## Additional Information -
    • AtmosphereEffect
    • - -
    • SceneView
    • - -
    - -

    Additional Information

    There are three atmosphere effect options: -
      -
    • Realistic - Atmosphere effect applied to both the sky and the surface as viewed from above.
    • -
    • Horizon only - Atmosphere effect applied to the sky (horizon) only.
    • -
    • None - No atmosphere effect. The sky is rendered black with a starfield consisting of randomly placed white dots.
    • -
    - -

    Tags

    +* **Realistic** - Atmosphere effect applied to both the sky and the surface as viewed from above. +* **Horizon only** - Atmosphere effect applied to the sky (horizon) only. +* **None** - No atmosphere effect. The sky is rendered black with a starfield consisting of randomly placed white dots. -

    3D, AtmosphereEffect, Scene

    +## Tags +3D, AtmosphereEffect, Scene diff --git a/scene/choose-camera-controller/README.md b/scene/choose-camera-controller/README.md index 3faa4af7e1..b622f2d21c 100644 --- a/scene/choose-camera-controller/README.md +++ b/scene/choose-camera-controller/README.md @@ -1,37 +1,31 @@ -

    Choose camera controller

    +# Choose camera controller -

    Control the behavior of the camera in a scene.

    +Control the behavior of the camera in a scene. -

    +![](ChooseCameraController.png) -

    Use case

    +## Use case -

    The globe camera controller (the default camera controller in all new scenes) allows a user to explore the scene freely by zooming in/out and panning around the globe. The orbit camera controllers fix the camera to look at a target location or geoelement. A primary use case is for following moving objects like cars and planes.

    +The globe camera controller (the default camera controller in all new scenes) allows a user to explore the scene freely by zooming in/out and panning around the globe. The orbit camera controllers fix the camera to look at a target location or geoelement. A primary use case is for following moving objects like cars and planes. -

    How to use the sample

    +## How to use the sample -

    The application loads with the default globe camera controller. To rotate and fix the scene around the plane, exit globe mode by choosing the "Orbit camera around plane" option (i.e. camera will now be fixed to the plane). Choose the "Orbit camera around crater" option to rotate and centre the scene around the location of the Upheaval Dome crater structure, or choose the "Free pan round the globe" option to return to default free navigation.

    +The application loads with the default globe camera controller. To rotate and fix the scene around the plane, exit globe mode by choosing the "Orbit camera around plane" option (i.e. camera will now be fixed to the plane). Choose the "Orbit camera around crater" option to rotate and centre the scene around the location of the Upheaval Dome crater structure, or choose the "Free pan round the globe" option to return to default free navigation. -

    How it works

    +## How it works -
      -
    1. Create an instance of a class extending CameraController: GlobeCameraController, OrbitLocationCameraController, OrbitGeoElementCameraController
    2. -
    3. Set the scene view's camera controller with sceneView.setCameraController(cameraController).
    4. -
    +1. Create an instance of a class extending `CameraController`: `GlobeCameraController`, `OrbitLocationCameraController`, `OrbitGeoElementCameraController` +2. Set the scene view's camera controller with `sceneView.setCameraController(cameraController)`. -

    Relevant API

    +## Relevant API -
      -
    • ArcGISScene
    • -
    • Camera
    • -
    • GlobeCameraController
    • -
    • OrbitGeoElementCameraController
    • -
    • OrbitLocationCameraController
    • -
    • SceneView
    • -
    +* ArcGISScene +* Camera +* GlobeCameraController +* OrbitGeoElementCameraController +* OrbitLocationCameraController +* SceneView -

    Tags

    +## Tags camera controller, Camera, SceneView, 3D - - diff --git a/scene/create-terrain-surface-from-local-raster/README.md b/scene/create-terrain-surface-from-local-raster/README.md index dbdaff8b1d..c7631e78d2 100644 --- a/scene/create-terrain-surface-from-local-raster/README.md +++ b/scene/create-terrain-surface-from-local-raster/README.md @@ -1,38 +1,36 @@ -

    Create Terrain Surface from a Local Raster

    - -

    Set the terrain surface with elevation described by a raster file.

    - -

    - -

    The terrain surface is what the basemap, operational layers, and graphics are draped on. Supported raster formats include:

    -
      -
    • ASRP/USRP
    • -
    • CIB1, 5, 10
    • -
    • DTED0, 1, 2
    • -
    • GeoTIFF
    • -
    • HFA
    • -
    • HRE
    • -
    • IMG
    • -
    • JPEG
    • -
    • JPEG 2000
    • -
    • NITF
    • -
    • PNG
    • -
    • RPF
    • -
    • SRTM1, 2
    • -
    - -

    How it works

    -
      -
    1. Create an ArcGISScene and add it to a SceneView.
    2. -
    3. Create a RasterElevationSource with a list of raster file paths.
    4. -
    5. Add this source to the scene's base surface: scene.getBaseSurface().getElevationSources().add(rasterElevationSource).
    6. -
    - -

    Relevant API

    -
      -
    • RasterElevationSource
    • -
    • Surface
    • -
    - -

    Tags

    -

    3D, Raster, Elevation, Surface

    \ No newline at end of file +# Create Terrain Surface from a Local Raster + +Set the terrain surface with elevation described by a raster file. + +![](CreateTerrainSurfaceFromLocalRaster.png) + +The terrain surface is what the basemap, operational layers, and graphics are draped on. Supported raster formats include: + +* ASRP/USRP +* CIB1.5. 10 +* DTED0, 1. 2 +* GeoTIFF +* HFA +* HRE +* IMG +* JPEG +* JPEG 2000 +* NITF +* PNG +* RPF +* SRTM1. 2 + +## How it works + +1. Create an `ArcGISScene` and add it to a `SceneView`. +2. Create a `RasterElevationSource` with a list of raster file paths. +3. Add this source to the scene's base surface: `scene.getBaseSurface().getElevationSources().add(rasterElevationSource)`. + +## Relevant API + +* RasterElevationSource +* Surface + +## Tags + +3D, Raster, Elevation, Surface diff --git a/scene/create-terrain-surface-from-local-tile-package/README.md b/scene/create-terrain-surface-from-local-tile-package/README.md index 8553f2f4e7..8bf0b80f63 100644 --- a/scene/create-terrain-surface-from-local-tile-package/README.md +++ b/scene/create-terrain-surface-from-local-tile-package/README.md @@ -1,23 +1,22 @@ -

    Create Terrain from a Local Tile Package

    +# Create Terrain from a Local Tile Package -

    Set the terrain surface with elevation described by a local tile package.

    +Set the terrain surface with elevation described by a local tile package. -

    The terrain surface is what the basemap, operational layers, and graphics are draped on. The tile package must be a LERC (limited error raster compression) encoded TPK. Details on creating these are in the ArcGIS Pro documentation.

    +The terrain surface is what the basemap, operational layers, and graphics are draped on. The tile package must be a LERC (limited error raster compression) encoded TPK. Details on creating these are in the [ArcGIS Pro documentation](https://pro.arcgis.com/en/pro-app/help/sharing/overview/tile-package.htm). -

    +![](CreateTerrainSurfaceFromLocalTilePackage.png) -

    How it works

    -
      -
    1. Create an ArcGISScene and add it to a SceneView.
    2. -
    3. Create an ArcGISTiledElevationSource with the path to the local tile package.
    4. -
    5. Add this source to the scene's base surface: scene.getBaseSurface().getElevationSources().add(tiledElevationSource).
    6. -
    +## How it works -

    Relevant API

    -
      -
    • ArcGISTiledElevationSource
    • -
    • Surface
    • -
    +1. Create an `ArcGISScene` and add it to a `SceneView`. +2. Create an `ArcGISTiledElevationSource` with the path to the local tile package. +3. Add this source to the scene's base surface: `scene.getBaseSurface().getElevationSources().add(tiledElevationSource)`. -

    Tags

    -

    3D, Tile Cache, Elevation, Surface

    +## Relevant API + +* ArcGISTiledElevationSource +* Surface + +## Tags + +3D, Tile Cache, Elevation, Surface diff --git a/scene/display-scene/README.md b/scene/display-scene/README.md index 6fb1f93935..9f0a76031c 100644 --- a/scene/display-scene/README.md +++ b/scene/display-scene/README.md @@ -1,26 +1,22 @@ -

    Display Scene

    +# Display Scene -

    Display a 3D scene with terrain and imagery.

    +Display a 3. scene with terrain and imagery. -

    +![](DisplayScene.png) -

    How it works

    +## How it works -

    To create an ArcGISScene with elevation data:

    +To create an `ArcGISScene` with elevation data: -
      -
    1. Create an ArcGIS scene and set the Basemap with ArcGISScene.setBasemap().
    2. -
    3. Create a SceneView and set the scene to the view, SceneView.setScene(scene).
    4. -
    5. Create a Surface and add a ArcGISTiledElevationSource, Surface.getElevationSources().add().
    6. -
    7. Set the surface as the scene's base surface: ArcGIScene.setBaseSurface(surface).
    8. -
    +1. Create an ArcGIS scene and set the `Basemap` with `ArcGISScene.setBasemap()`. +2. Create a `SceneView` and set the scene to the view, `SceneView.setScene(scene)`. +3. Create a `Surface` and add a `ArcGISTiledElevationSource`, `Surface.getElevationSources().add()`. +4. Set the surface as the scene's base surface: `ArcGIScene.setBaseSurface(surface)`. -

    Relevant API

    +## Relevant API -
      -
    • ArcGISScene
    • -
    • ArcGISTiledElevationSource
    • -
    • Camera
    • -
    • SceneView
    • -
    • Surface
    • -
    \ No newline at end of file +* ArcGISScene +* ArcGISTiledElevationSource +* Camera +* SceneView +* Surface diff --git a/scene/distance-composite-symbol/README.md b/scene/distance-composite-symbol/README.md index 003ce6644d..81b579d922 100644 --- a/scene/distance-composite-symbol/README.md +++ b/scene/distance-composite-symbol/README.md @@ -1,46 +1,39 @@ -

    Distance Composite Symbol

    +# Distance Composite Symbol -

    Change a graphic's symbol based on camera proximity.

    +Change a graphic's symbol based on camera proximity. -

    Distance composite scene symbols can render different symbols depending on the distance between the camera and the - graphic.

    +Distance composite scene symbols can render different symbols depending on the distance between the camera and the graphic. -

    +![](DistanceCompositeSymbol.gif) -

    How to use the sample

    +## How to use the sample -

    The symbol of graphic will change while zooming in or out.

    +The symbol of graphic will change while zooming in or out. -

    How it works

    +## How it works -

    To create and display a DistanceCompositeSceneSymbol:

    +To create and display a `DistanceCompositeSceneSymbol`: -
      -
    1. Create a GraphicsOverlay and add it to the SceneView.
    2. -
    3. Create symbols for each Range the composite symbol.
    4. -
    5. Create a distance composite scene symbol`.
    6. -
    7. Add a range for each symbol to DistanceCompositeSceneSymbol.getRangeCollection().add(new Range(symbol, min distance, max distance)). -
      • symbol, symbol to be used within the min/max range that is given
      • -
      • min/max distance, the minimum and maximum distance that the symbol will be display from the Camera
    8. -
    9. Create a Graphic with the symbol: Graphic(Point, DistanceCompositeSceneSymbol)
    10. -
    11. Add the graphic to the graphics overlay.
    12. -
    - -

    Relevant API

    - -
      -
    • ArcGISScene
    • -
    • ArcGISTiledElevationSource
    • -
    • Camera
    • -
    • DistanceCompositeSceneSymbol
    • -
    • DistanceCompositeSceneSymbol.Range
    • -
    • Graphic
    • -
    • GraphicsOverlay
    • -
    • ModelSceneSymbol
    • -
    • Range
    • -
    • RangeCollection
    • -
    • SceneView
    • -
    • SimpleMarkerSceneSymbol
    • -
    +1. Create a `GraphicsOverlay` and add it to the `SceneView`. +2. Create symbols for each `Range` the composite symbol. +3. Create a distance composite scene symbol`. +4. Add a range for each symbol to `DistanceCompositeSceneSymbol.getRangeCollection().add(new Range(symbol, min distance, max distance))`. + * symbol, symbol to be used within the min/max range that is given + * min/max distance, the minimum and maximum distance that the symbol will be display from the `Camera` +5. Create a `Graphic` with the symbol: `Graphic(Point, DistanceCompositeSceneSymbol)` +6. Add the graphic to the graphics overlay. +## Relevant API +* ArcGISScene +* ArcGISTiledElevationSource +* Camera +* DistanceCompositeSceneSymbol +* DistanceCompositeSceneSymbol.Range +* Graphic +* GraphicsOverlay +* ModelSceneSymbol +* Range +* RangeCollection +* SceneView +* SimpleMarkerSceneSymbol diff --git a/scene/elevation-mode/README.md b/scene/elevation-mode/README.md index ec1dbb11fe..ffc09bc7f0 100644 --- a/scene/elevation-mode/README.md +++ b/scene/elevation-mode/README.md @@ -1,34 +1,28 @@ -

    Elevation Mode

    +# Elevation Mode -

    Position graphics relative to terrain.

    +Position graphics relative to terrain. -

    +![](ElevationMode.png) -

    How it works

    +## How it works -

    To position Graphics using SurfacePlacement (DRAPED, RELATIVE, ABSOLUTE):

    +To position `Graphic`s using `SurfacePlacement` (DRAPED, RELATIVE, ABSOLUTE): -
      -
    1. Create a GraphicsOverlay.
    2. -
    3. Set the surface placement mode GraphicsOverlay.getSceneProperties().setSurfacePlacement(SurfacePlacement). -
      • Draped, Z value of graphic has no affect and graphic is attached to surface
      • -
      • Absolute, position graphic using only it's Z value
      • -
      • Relative, position graphic using it's Z value plus the elevation of the surface
    4. -
    5. Add graphics to the graphics overlay, GraphicsOverlay.getGraphics.add(Graphic).
    6. -
    7. Add the graphics overlay to the SceneView, SceneView.getGraphicsOverlays().add(GraphicsOverlay).
    8. -
    - -

    Relevant API

    - -
      -
    • ArcGISScene
    • -
    • Camera
    • -
    • Graphic
    • -
    • GraphicsOverlay
    • -
    • LayerSceneProperties.SurfacePlacement
    • -
    • SceneProperties
    • -
    • SceneView
    • -
    • Surface
    • -
    +1. Create a `GraphicsOverlay`. +2. Set the surface placement mode `GraphicsOverlay.getSceneProperties().setSurfacePlacement(SurfacePlacement)`. + * Draped, Z value of graphic has no affect and graphic is attached to surface + * Absolute, position graphic using only it's Z value + * Relative, position graphic using it's Z value plus the elevation of the surface +3. Add graphics to the graphics overlay, `GraphicsOverlay.getGraphics.add(Graphic)`. +4. Add the graphics overlay to the `SceneView`, `SceneView.getGraphicsOverlays().add(GraphicsOverlay)`. +## Relevant API +* ArcGISScene +* Camera +* Graphic +* GraphicsOverlay +* LayerSceneProperties.SurfacePlacement +* SceneProperties +* SceneView +* Surface diff --git a/scene/extrude-graphics/README.md b/scene/extrude-graphics/README.md index 7e37d3f840..6f76c2d767 100644 --- a/scene/extrude-graphics/README.md +++ b/scene/extrude-graphics/README.md @@ -1,36 +1,28 @@ -

    Extrude Graphics

    +# Extrude Graphics -

    Extrude graphics based on attributes.

    +Extrude graphics based on attributes. -

    +![](ExtrudeGraphics.png) -

    How to use the sample

    +## How to use the sample -

    Zoom and pan the scene to find the extruded graphics. Note how they are extruded to the level set in their height - property.

    +Zoom and pan the scene to find the extruded graphics. Note how they are extruded to the level set in their height property. -

    How it works

    +## How it works -

    To extrude graphics according to a property:

    +To extrude graphics according to a property: -
      -
    1. Create a GraphicsOverlay and SimpleRenderer.
    2. -
    3. Get the renderer's SceneProperties using Renderer.getSceneProperties().
    4. -
    5. Set the extrusion mode for the renderer with SceneProperties.setExtrusionMode(ExtrusionMode).
    6. -
    7. Specify the attribute name of the graphic that the extrusion mode will use, SceneProperties - .setExtrusionExpression("[HEIGHT]").
    8. -
    9. Set the renderer on the graphics overlay, GraphicsOverlay.setRenderer(Renderer).
    10. -
    11. Create graphics with their attribute set, Graphic.getAttributes().put("HEIGHT", Z Value).
    12. -
    - -

    Relevant API

    - -
      -
    • ArcGISScene
    • -
    • Graphic
    • -
    • GraphicsOverlay
    • -
    • Renderer
    • -
    • Renderer.SceneProperties
    • -
    +1. Create a `GraphicsOverlay` and `SimpleRenderer`. +2. Get the renderer's `SceneProperties` using `Renderer.getSceneProperties()`. +3. Set the extrusion mode for the renderer with `SceneProperties.setExtrusionMode(ExtrusionMode)`. +4. Specify the attribute name of the graphic that the extrusion mode will use, `SceneProperties.setExtrusionExpression("[HEIGHT]")`. +5. Set the renderer on the graphics overlay, `GraphicsOverlay.setRenderer(Renderer)`. +6. Create graphics with their attribute set, `Graphic.getAttributes().put("HEIGHT", Z Value)`. +## Relevant API +* ArcGISScene +* Graphic +* GraphicsOverlay +* Renderer +* Renderer.SceneProperties diff --git a/scene/feature-layer-rendering-mode-scene/README.md b/scene/feature-layer-rendering-mode-scene/README.md index 7a173f28ef..8b5b871f10 100644 --- a/scene/feature-layer-rendering-mode-scene/README.md +++ b/scene/feature-layer-rendering-mode-scene/README.md @@ -1,43 +1,31 @@ -

    Feature Layer Rendering Mode (Scene)

    +# Feature Layer Rendering Mode (Scene) -

    Render features statically or dynamically in 3D.

    +Render features statically or dynamically in 3D. -

    +![](FeatureLayerRenderingModeScene.gif) -

    How it works

    +## How it works -

    To change FeatureLayer.RenderingMode using LoadSettings:

    +To change `FeatureLayer.RenderingMode` using `LoadSettings`: -
      -
    1. Create a ArcGISScene.
    2. -
    3. Set preferred rendering mode to scene, sceneBottom.getLoadSettings().setPreferredPointFeatureRenderingMode(FeatureLayer.RenderingMode.DYNAMIC). -
        -
      • Can set preferred rendering mode for Points, Polylines, or Polygons.
      • -
      • Multipoint preferred rendering mode is the same as point.
      • -
      -
    4. -
    5. Set scene to SceneView, sceneViewBottom.setArcGISScene(sceneBottom).
    6. -
    7. Create a ServiceFeatureTable from a point service, new ServiceFeatureTable("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Energy/Geology/FeatureServer/0");.
    8. -
    9. Create FeatureLayer from table, new FeatureLayer(poinServiceFeatureTable).
    10. -
    11. Add layer to scene, sceneBottom.getOperationalLayers().add(pointFeatureLayer.copy()) -
        -
      • Now the point layer will be rendered dynamically to scene view.
      • -
      -
    12. -
    - -

    Relevant API

    - -
      -
    • ArcGISScene
    • -
    • Camera
    • -
    • FeatureLayer
    • -
    • FeatureLayer.RenderingMode
    • -
    • LoadSettings
    • -
    • Point
    • -
    • Polyline
    • -
    • Polygon
    • -
    • ServiceFeatureTable
    • -
    +1. Create a `ArcGISScene`. +2. Set preferred rendering mode to scene, `sceneBottom.getLoadSettings().setPreferredPointFeatureRenderingMode(FeatureLayer.RenderingMode.DYNAMIC)`. + * Can set preferred rendering mode for `Points`, `Polylines`, or `Polygons`. + * `Multipoint` preferred rendering mode is the same as point. +3. Set scene to `SceneView`, `sceneViewBottom.setArcGISScene(sceneBottom)`. +4. Create a `ServiceFeatureTable` from a point service, `new ServiceFeatureTable("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Energy/Geology/FeatureServer/0");`. +5. Create `FeatureLayer` from table, `new FeatureLayer(poinServiceFeatureTable)`. +6. Add layer to scene, `sceneBottom.getOperationalLayers().add(pointFeatureLayer.copy())` + * Now the point layer will be rendered dynamically to scene view. +## Relevant API +* ArcGISScene +* Camera +* FeatureLayer +* FeatureLayer.RenderingMode +* LoadSettings +* Point +* Polyline +* Polygon +* ServiceFeatureTable diff --git a/scene/get-elevation-at-a-point/README.md b/scene/get-elevation-at-a-point/README.md index cc391033dd..144e8f6660 100644 --- a/scene/get-elevation-at-a-point/README.md +++ b/scene/get-elevation-at-a-point/README.md @@ -1,47 +1,36 @@ -

    Get elevation at a point

    +# Get elevation at a point -

    Get the elevation for a given point on a surface in a scene.

    +Get the elevation for a given point on a surface in a scene. -

    +![](GetElevationAtAPoint.png) -

    Use case

    +## Use case -

    Knowing the elevation at a given point in a landscape can aid in navigation, planning and survey in the field.

    +Knowing the elevation at a given point in a landscape can aid in navigation, planning and survey in the field. -

    How to use the sample

    +## How to use the sample -

    Click anywhere on the surface to get the elevation at that point. Elevation is reported in meters since the scene view is in WGS84.

    +Click anywhere on the surface to get the elevation at that point. Elevation is reported in meters since the scene view is in WGS84. -

    How it works

    +## How it works -
      -
    1. Create a SceneView and Scene with an imagery base map.
    2. +1. Create a `SceneView` and `Scene` with an imagery base map. +2. Set an `ArcGISTiledElevationService` as the elevation source of the scene's base surface. +3. Use the `screenToBaseSurface(screenPoint)` method on the scene view to convert the selected screen point into a point on surface. +4. Use the `getElevationAsync(surfacePoint)` method on the base surface to asynchronously get the elevation. -
    3. Set an ArcGISTiledElevationService as the elevation source of the scene's base surface.
    4. +## Relevant API -
    5. Use the screenToBaseSurface(screenPoint) method on the scene view to convert the selected screen point into a point on surface.
    6. +* ArcGISTiledElevationSource +* BaseSurface +* ElevationSourcesList +* SceneView -
    7. Use the getElevationAsync(surfacePoint) method on the base surface to asynchronously get the elevation.
    8. -
    +## Additional information -

    Relevant API

    +`getElevationAsync(surfacePoint)` retrieves the most accurate available elevation value at a given point. To do this, the method must go to the server or local raster file and load the highest level of detail of data for the target location and return the elevation value. +If multiple elevation sources are present in the surface, the top most visible elevation source with a valid elevation in the given location is used to determine the result. -
      -
    • ArcGISTiledElevationSource
    • +## Tags -
    • BaseSurface
    • - -
    • ElevationSourcesList
    • - -
    • SceneView
    • -
    - -

    Additional information

    - -

    getElevationAsync(surfacePoint) retrieves the most accurate available elevation value at a given point. To do this, the method must go to the server or local raster file and load the highest level of detail of data for the target location and return the elevation value.

    - -

    If multiple elevation sources are present in the surface, the top most visible elevation source with a valid elevation in the given location is used to determine the result.

    - -

    Tags

    - -

    elevation, point, surface

    +elevation, point, surface diff --git a/scene/open-mobile-scene-package/README.md b/scene/open-mobile-scene-package/README.md index 363c091b46..659bb5152d 100644 --- a/scene/open-mobile-scene-package/README.md +++ b/scene/open-mobile-scene-package/README.md @@ -1,37 +1,29 @@ -

    Open mobile scene package

    +# Open mobile scene package -

    Open and display a scene from an offline Mobile Scene Package (.mspk).

    +Open and display a scene from an offline Mobile Scene Package (.mspk). -

    +![](OpenMobileScenePackage.png) -

    Use Case

    +## Use Case -

    A .mspk file is an archive containing the data (specifically, basemaps and features) used to display an offline 3D scene.

    +A .mspk file is an archive containing the data (specifically, basemaps and features) used to display an offline 3. scene. -

    How it works

    +## How it works -
      -
    1. Use the static method MobileScenePackage.isDirectReadSupportedAsync(mspkData) to check whether the package can be read in the archived form (.mspk) or whether it needs to be unpacked.
    2. +1. Use the static method `MobileScenePackage.isDirectReadSupportedAsync(mspkData)` to check whether the package can be read in the archived form (.mspk) or whether it needs to be unpacked. +2. If direct read is supported, use `isDirectReadSupported.get()` and instantiate a `MobileScenePackage` with the path to the .mspk file. +3. If the mobile scene package requires unpacking, use `MobileScenePackage.unpackAsync(mspkPath, pathToUnpackTo)` and instantiate a `MobileScenePackage` with the path to the unpacked .mspk file. +4. Call `mobileScenePackage.loadAsync` to load the mobile scene package. When finished, get the `ArcGISScene` objects inside with `mobileScenePackage.getScenes()`. +5. Set the first scene in the object collection on the scene view with `sceneView.setArcGISScene(scene)`. -
    3. If direct read is supported, use isDirectReadSupported.get() and instantiate a MobileScenePackage with the path to the .mspk file.
    4. +## Relevant API -
    5. If the mobile scene package requires unpacking, use MobileScenePackage.unpackAsync(mspkPath, pathToUnpackTo) and instantiate a MobileScenePackage with the path to the unpacked .mspk file.
    6. +* MobileScenePackage -
    7. Call mobileScenePackage.loadAsync to load the mobile scene package. When finished, get the ArcGISScene objects inside with mobileScenePackage.getScenes().
    8. +## Additional information -
    9. Set the first scene in the object collection on the scene view with sceneView.setArcGISScene(scene).
    10. -
    +Before loading the `MobileScenePackage`, it is important to first check if direct read is supported. The mobile scene package could contain certain data types that would require the data to be unpacked. For example, scenes containing raster data will need to be unpacked. -

    Relevant API

    +## Tags -
      -
    • MobileScenePackage
    • -
    - -

    Additional information

    - -

    Before loading the MobileScenePackage, it is important to first check if direct read is supported. The mobile scene package could contain certain data types that would require the data to be unpacked. For example, scenes containing raster data will need to be unpacked.

    - -

    Tags

    - -

    Offline, Scene, MobileScenePackage

    \ No newline at end of file +Offline, Scene, MobileScenePackage diff --git a/scene/open-scene-portal-item/README.md b/scene/open-scene-portal-item/README.md index d244a35c81..651c08431c 100644 --- a/scene/open-scene-portal-item/README.md +++ b/scene/open-scene-portal-item/README.md @@ -1,25 +1,21 @@ -

    Open Scene (Portal Item)

    +# Open Scene (Portal Item) -

    Display a web scene.

    +Display a web scene. -

    Just like Web Maps are the ArcGIS format for maps, Web Scenes are the ArcGIS format for scenes. These scenes can -be stored in ArcGIS Online or Portal.

    +Just like Web Maps are the ArcGIS format for maps, Web Scenes are the ArcGIS format for scenes. These scenes can +be stored in ArcGIS Online or Portal. -

    +![](OpenScenePortalItem.png) -

    How it works

    +## How it works -

    To open a web scene:

    +To open a web scene: -
      -
    1. Create a PortalItem with an item ID pointing to a web scene.
    2. -
    3. Create an ArcGISScene passing in the portal item.
    4. -
    +1. Create a `PortalItem` with an item ID pointing to a web scene. +2. Create an `ArcGISScene` passing in the portal item. -

    Relevant API

    +## Relevant API -
      -
    • ArcGISScene
    • -
    • Portal
    • -
    • PortalItem
    • -
    +* ArcGISScene +* Portal +* PortalItem diff --git a/scene/orbit-the-camera-around-an-object/README.md b/scene/orbit-the-camera-around-an-object/README.md index 977e9d52fb..d2885da6bf 100644 --- a/scene/orbit-the-camera-around-an-object/README.md +++ b/scene/orbit-the-camera-around-an-object/README.md @@ -1,92 +1,57 @@ -

    Orbit the camera around an object

    - -

    Fix the camera to point at and rotate around a target object.

    - -

    - -

    Use case

    - -

    The orbit geoelement camera controller provides control over the following camera behaviors:

    - -
      -
    • automatically track the target
    • - - -
    • stay near the target by setting a minimum and maximum distance offset
    • - -
    • restrict where you can rotate around the target
    • - -
    • automatically rotate the camera when the target's heading and pitch changes
    • - -
    • disable user interactions for rotating the camera
    • - -
    • animate camera movement over a specified duration
    • - -
    • control the vertical positioning of the target on the screen
    • - -
    • set a target offset (e.g.to orbit around the tail of the plane) instead of defaulting to orbiting the center of the object
    • -
    - -

    How to use the sample

    - -

    The sample loads with the camera orbiting an plane model. The camera is preset with a restricted camera heading and pitch, and a limited minimum and maximum camera distance set from the plane. The position of the plane on the screen is also set just below center.

    - - -

    Use the "Camera Heading" slider to adjust the camera heading. Select the "Allow camera distance interaction" checkbox to allow zooming in and out with the mouse/keyboard: when the checkbox is deselected the user will be unable to adjust with the camera distance.

    - -

    Use the "Plane Pitch" slider to adjust the plane's pitch. When not in Cockpit view, the plane's pitch will change independently to that of the camera pitch.

    - -

    Use the "Cockpit view" button to offset and fix the camera into the cockpit of the plane. Use the "Plane pitch" slider to control the pitch of plane: the camera will follow the pitch of the plane in this mode. In this view adjusting the camera distance is disabled. Hit the "Center view" button to exit cockpit view mode and fix the camera controller on the center of the plane.

    - -

    How it works

    - -
      -
    1. Instantiate an OrbitGeoElementCameraController, with GeoElement and camera distance as parameters.
    2. -
    3. Use sceneView.setCameraController(OrbitCameraController) to set the camera to the scene view.
    4. -
    5. Set the heading, pitch and distance camera properties with: -
        -
      • orbitCameraController.setCameraHeadingOffset(double)
      • orbitCameraController.setCameraPitchOffset(double)
      • -
      • orbitCameraController.setCameraDistance(double)
      • -
    6. -
    7. Set the minimum and maximum angle of heading and pitch, and minimum and maximum distance for the camera with: -
        -
      • orbitCameraController.setMin or setMaxCameraHeadingOffset(double).
      • -
      • orbitCameraController.setMin or setMaxCameraPitchOffset(double).
      • -
      • orbitCameraController.setMin or setMaxCameraDistance(double).
      • -
    8. -
    9. Set the distance from which the camera is offset from the plane with: -
        -
      • orbitCameraController.setTargetOffsetsAsync(x, y, z, duration)
      • -
      • orbitCameraController.setTargetOffsetX(double)
      • -
      • orbitCameraController.setTargetOffsetY(double)
      • -
      • orbitCameraController.setTargetOffsetZ(double)
      • -
    10. -
    11. Set the vertical screen factor to determine where the plane appears in the scene: -
        -
      • orbitCameraController.setTargetVerticalScreenFactor(float)
      • -
    12. - -
    13. Animate the camera to the cockpit using orbitCameraController.setTargetOffsetsAsync(x, y, z, duration) -
    14. - -
    15. Set if the camera distance will adjust when zooming or panning using mouse or keyboard (default is true): -
        -
      • orbitCameraController.setCameraDistanceInteractive(boolean)
      • -
    16. -
    17. Set if the camera will follow the pitch of the plane (default is true): -
        -
      • orbitCameraController.setAutoPitchEnabled(boolean)
      • -
    18. -
    - -

    Relevant API

    - -
      -
    • OrbitGeoElementCameraController
    • -
    - -

    Tags

    +# Orbit the camera around an object + +Fix the camera to point at and rotate around a target object. + +![](OrbitTheCameraAroundAnObject.png) + +## Use case + +The orbit geoelement camera controller provides control over the following camera behaviors: + +* automatically track the target +* stay near the target by setting a minimum and maximum distance offs +* restrict where you can rotate around the targ +* automatically rotate the camera when the target's heading and pitch changes +* disable user interactions for rotating the camera +* animate camera movement over a specified duration +* control the vertical positioning of the target on the screen +* set a target offset (e.g.to orbit around the tail of the plane) instead of defaulting to orbiting the center of the object + +## How to use the sample + +The sample loads with the camera orbiting an plane model. The camera is preset with a restricted camera heading and pitch, and a limited minimum and maximum camera distance set from the plane. The position of the plane on the screen is also set just below center. +Use the "Camera Heading" slider to adjust the camera heading. Select the "Allow camera distance interaction" checkbox to allow zooming in and out with the mouse/keyboard: when the checkbox is deselected the user will be unable to adjust with the camera distance. +Use the "Plane Pitch" slider to adjust the plane's pitch. When not in Cockpit view, the plane's pitch will change independently to that of the camera pitch. +Use the "Cockpit view" button to offset and fix the camera into the cockpit of the plane. Use the "Plane pitch" slider to control the pitch of plane: the camera will follow the pitch of the plane in this mode. In this view adjusting the camera distance is disabled. Hit the "Center view" button to exit cockpit view mode and fix the camera controller on the center of the plane. + +## How it works + +1. Instantiate an `OrbitGeoElementCameraController`, with `GeoElement` and camera distance as parameters. +2. Use `sceneView.setCameraController(OrbitCameraController)` to set the camera to the scene view. +3. Set the heading, pitch and distance camera properties with: + * `orbitCameraController.setCameraHeadingOffset(double)` * `orbitCameraController.setCameraPitchOffset(double)` + * `orbitCameraController.setCameraDistance(double)` +4. Set the minimum and maximum angle of heading and pitch, and minimum and maximum distance for the camera with: + * `orbitCameraController.setMin` or `setMaxCameraHeadingOffset(double)`. + * `orbitCameraController.setMin` or `setMaxCameraPitchOffset(double)`. + * `orbitCameraController.setMin` or `setMaxCameraDistance(double)`. +5. Set the distance from which the camera is offset from the plane with: + * `orbitCameraController.setTargetOffsetsAsync(x, y, z, duration)` + * `orbitCameraController.setTargetOffsetX(double)` + * `orbitCameraController.setTargetOffsetY(double)` + * `orbitCameraController.setTargetOffsetZ(double)` +6. Set the vertical screen factor to determine where the plane appears in the scene: + * `orbitCameraController.setTargetVerticalScreenFactor(float)` +7. Animate the camera to the cockpit using `orbitCameraController.setTargetOffsetsAsync(x, y, z, duration)` +8. Set if the camera distance will adjust when zooming or panning using mouse or keyboard (default is true): + * `orbitCameraController.setCameraDistanceInteractive(boolean)` +9. Set if the camera will follow the pitch of the plane (default is true): + * `orbitCameraController.setAutoPitchEnabled(boolean)` + +## Relevant API + +* OrbitGeoElementCameraController + +## Tags OrbitGeoElementCameraController, Camera, SceneView, 3D - - diff --git a/scene/scene-layer-selection/README.md b/scene/scene-layer-selection/README.md index 6483e8544a..8882922d03 100644 --- a/scene/scene-layer-selection/README.md +++ b/scene/scene-layer-selection/README.md @@ -1,32 +1,25 @@ -

    Scene Layer Selection

    +# Scene Layer Selection -

    Select clicked features in a scene.

    +Select clicked features in a scene. -

    +![](SceneLayerSelection.png) -

    How to use the sample

    +## How to use the sample -

    Click on a building in the scene layer to select it. Unselect buildings by clicking away from the buildings.

    +Click on a building in the scene layer to select it. Unselect buildings by clicking away from the buildings. -

    How it works

    +## How it works -

    To select geoelements in a scene layer:

    +To select geoelements in a scene layer: -
      -
    1. Create an ArcGISSceneLayer passing in the URL to a scene layer service.
    2. -
    3. Use sceneView.setOnMouseClicked to get the screen click location Point2D.
    4. -
    5. Call sceneView.identifyLayersAsync(sceneLayer, point2D, tolerance, false, 1) to identify features - in the scene.
    6. -
    7. From the resulting IdentifyLayerResult, get the list of identified GeoElements with - result.getElements().
    8. -
    9. Get the first element in the list, checking that it is a feature, and call sceneLayer.selectFeature - (feature) to select it.
    10. -
    +1. Create an `ArcGISSceneLayer` passing in the URL to a scene layer service. +2. Use `sceneView.setOnMouseClicked` to get the screen click location `Point2D`. +3. Call `sceneView.identifyLayersAsync(sceneLayer, point2D, tolerance, false, 1)` to identify features in the scene. +4. From the resulting `IdentifyLayerResult`, get the list of identified `GeoElement`s with `result.getElements()`. +5. Get the first element in the list, checking that it is a feature, and call `sceneLayer.selectFeature(feature)` to select it. -

    Relevant API

    +## Relevant API -
      -
    • ArcGISSceneLayer
    • -
    • GeoElement
    • -
    • IdentifyLayerResult
    • -
    +* ArcGISSceneLayer +* GeoElement +* IdentifyLayerResult diff --git a/scene/scene-layer/README.md b/scene/scene-layer/README.md index 315d9c2697..a8f96fba56 100644 --- a/scene/scene-layer/README.md +++ b/scene/scene-layer/README.md @@ -1,28 +1,24 @@ -

    Scene Layer

    +# Scene Layer -

    Display a scene layer with 3D buildings.

    - -

    +Display a scene layer with 3. buildings. -

    How it works

    +![](SceneLayer.png) -

    To add an ArcGISSceneLayer to a scene:

    +## How it works -
      -
    1. Create an ArcGISScene and set its Basemap with ArcGISScene.setBasemap().
    2. -
    3. Create a SceneView and set the scene to the view, SceneView.setScene(scene).
    4. -
    5. Create an ArcGISSceneLayer: sceneLayer = new ArcGISSceneLayer(SCENE_LAYER_SERVICE_URL)
    6. -
    7. Add the scene layer to the scene: Scene.getOperationalLayers().add(sceneLayer);
    8. -
    +To add an `ArcGISSceneLayer` to a scene: -

    Relevant API

    +1. Create an `ArcGISScene` and set its `Basemap` with `ArcGISScene.setBasemap()`. +2. Create a `SceneView` and set the scene to the view, `SceneView.setScene(scene)`. +3. Create an `ArcGISSceneLayer`. `sceneLayer = new ArcGISSceneLayer(SCENE_LAYER_SERVICE_URL)` +4. Add the scene layer to the scene: `Scene.getOperationalLayers().add(sceneLayer)`; -
      -
    • 3D
    • -
    • ArcGISScene
    • -
    • ArcGISSceneLayer
    • -
    • ArcGISTiledElevationSource
    • -
    • Camera
    • -
    • SceneView
    • -
    • Surface
    • -
    +## Relevant API + +* 3D +* ArcGISScene +* ArcGISSceneLayer +* ArcGISTiledElevationSource +* Camera +* SceneView +* Surface diff --git a/scene/scene-properties-expressions/README.md b/scene/scene-properties-expressions/README.md index 86c054d07d..b8eafa60b9 100644 --- a/scene/scene-properties-expressions/README.md +++ b/scene/scene-properties-expressions/README.md @@ -1,37 +1,29 @@ -

    Scene Properties Expressions

    +# Scene Properties Expressions -

    Update the orientation of a graphic using scene property rotation expressions.

    +Update the orientation of a graphic using scene property rotation expressions. -

    +![](ScenePropertiesExpressions.gif) -

    How to use the sample

    +## How to use the sample -

    Move the heading and pitch sliders to change the cone's orientation.

    +Move the heading and pitch sliders to change the cone's orientation. -

    How it works

    +## How it works -

    To update a Graphic's orientation using expressions:

    +To update a `Graphic`'s orientation using expressions: -
      -
    1. Create a new GraphicsOverlay.
    2. -
    3. Create a SimpleRenderer and set expressions on its scene properties: Renderer - .getSceneProperties().setHeadingExpression("[HEADING]"). Then set the renderer to the graphics overlay - with GraphicsOverlay.setRenderer(renderer).
    4. -
    5. Create a graphic and add it to the graphics overlay.
    6. -
    7. To update the graphic's rotation, use Graphic.getAttributes.put("HEADING", heading) where the attribute key is - the expression and the value is the rotation angle.
    8. -
    - -

    Relevant API

    - -
      -
    • ArcGISScene
    • -
    • Graphic
    • -
    • GraphicsOverlay
    • -
    • Renderer
    • -
    • Renderer.SceneProperties
    • -
    • SceneView
    • -
    • Viewpoint
    • -
    +1. Create a new `GraphicsOverlay`. +2. Create a `SimpleRenderer` and set expressions on its scene properties: `Renderer.getSceneProperties().setHeadingExpression("[HEADING]")`. Then set the renderer to the graphics overlay wit. `GraphicsOverlay.setRenderer(renderer)`. +3. Create a graphic and add it to the graphics overlay. +4. To update the graphic's rotation, use `Graphic.getAttributes.put("HEADING", heading)` where the attribute key is + the expression and the value is the rotation angle. +## Relevant API +* ArcGISScene +* Graphic +* GraphicsOverlay +* Renderer +* Renderer.SceneProperties +* SceneView +* Viewpoint diff --git a/scene/symbols/README.md b/scene/symbols/README.md index 0c78dd87d1..05e0cc4e71 100644 --- a/scene/symbols/README.md +++ b/scene/symbols/README.md @@ -1,34 +1,30 @@ -

    Symbols

    +# Symbols -

    Create graphics with simple 3D shapes.

    +Create graphics with simple 3D shapes. -

    Includes tetrahedrons, cubes, spheres, diamonds, cylinders, and cones.

    +Includes tetrahedrons, cubes, spheres, diamonds, cylinders, and cones. -

    +![](Symbols3D.png) -

    How it works

    +## How it works -

    To create a SimpleMarkerSceneSymbol with a 3D shape:

    +To create a `SimpleMarkerSceneSymbol` with a 3. shape: -
      -
    1. Create a GraphicsOverlay.
    2. -
    3. Create a SimpleMarkerSceneSymbol(Style, color, width, height, depth, AnchorPosition). -
      • You can also use SimpleMarkerSceneSymbol.createCone(color, diameter, height)
      • -
      • color, hex code color of symbol (Red = 0xFFFF0000)
      • -
      • (width, height, depth), size of the symbol
      • -
      • AnchorPosition, where to postion symbol on Graphic
    4. -
    5. Create a graphic using the symbol, Graphic(Geometry, Symbol).
    6. -
    7. Add the graphic to the graphics overlay, GraphicsOverlay.getGraphics().add(Graphic).
    8. -
    9. Add the graphics overlay to the SceneView, SceneView.getGraphicsOverlays().add(GraphicsOverlay).
    10. -
    +1. Create a `GraphicsOverlay`. +2. Create a `SimpleMarkerSceneSymbol(Style, color, width, height, depth, AnchorPosition)`. + * You can also use `SimpleMarkerSceneSymbol.createCone(color, diameter, height)` + * color, hex code color of symbol (Red = 0xFFFF0000) + * (width, height, depth), size of the symbol + * AnchorPosition, where to postion symbol on `Graphic` +3. Create a graphic using the symbol, `Graphic(Geometry, Symbol)`. +4. Add the graphic to the graphics overlay, `GraphicsOverlay.getGraphics().add(Graphic)`. +5. Add the graphics overlay to the `SceneView`, `SceneView.getGraphicsOverlays().add(GraphicsOverlay)`. -

    Relevant API

    +## Relevant API -
      -
    • ArcGISScene
    • -
    • Graphic
    • -
    • GraphicsOverlay
    • -
    • SimpleMarkerSceneSymbol
    • -
    • SimpleMarkerSceneSymbol.STYLE
    • -
    • SceneSymbol.AnchorPosition
    • -
    +* ArcGISScene +* Graphic +* GraphicsOverlay +* SimpleMarkerSceneSymbol +* SimpleMarkerSceneSymbol.STYLE +* SceneSymbol.AnchorPosition diff --git a/scene/sync-map-and-scene-viewpoints/README.md b/scene/sync-map-and-scene-viewpoints/README.md index fe6f532c34..e52b521d67 100644 --- a/scene/sync-map-and-scene-viewpoints/README.md +++ b/scene/sync-map-and-scene-viewpoints/README.md @@ -1,40 +1,31 @@ -

    Sync Map and Scene Viewpoints

    +# Sync Map and Scene Viewpoints -

    Synchronize the viewpoints between a MapView and a SceneView.

    +Synchronize the viewpoints between a `MapView` and a `SceneView`. -

    The two GeoViews share a common ViewPoint. When navigating in one view, the other view is immediately updated to display the same ViewPoint.

    +The two `GeoViews` share a common `ViewPoint`. When navigating in one view, the other view is immediately updated to display the same `ViewPoint`. -

    +![](SyncMapAndSceneViewpoints.png) -

    How to use the sample

    +## How to use the sample -

    Interact with the map by panning, zooming or rotating the map or scene view. The other view will update automatically to match your navigation. Note that the resulting maps may not look identical due to the fact the MapView is 2D and the SceneView is 3D: but the centers and scales of each view will be kept the same.

    +Interact with the map by panning, zooming or rotating the map or scene view. The other view will update automatically to match your navigation. Note that the resulting maps may not look identical due to the fact the `MapView` is 2. and the `SceneView` is 3D: but the centers and scales of each view will be kept the same. -

    How it works

    +## How it works -

    MapView and SceneView inherit from the GeoView parent class. When the GeoView's viewpoint has changed, a listener can be added and allow the viewpoint of the other GeoView to be set and synchronized. +`MapView` and `SceneView` inherit from the `GeoView` parent class. When the `GeoView`'s viewpoint has changed, a listener can be added and allow the viewpoint of the other `GeoView` to be set and synchronized. +1. Create a `MapView` and a `SceneView`. +2. Add a viewpoint changed listener to each `GeoView` with `geoView.addViewpointChangedListener(viewpointChangedEvent)`. +3. Check if the `GeoView` is being navigated with `geoView.isNavigating()`. +4. Get the current viewpoint of the active `GeoView` with `geoView.getcurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE)`. +5. Set the viewpoint of the other view to the active view's viewpoint with `geoView.setViewpoint(Viewpoint)`. -

      -
    1. Create a MapView and a SceneView.
    2. -
    3. Add a viewpoint changed listener to each GeoView with geoView.addViewpointChangedListener(viewpointChangedEvent).
    4. -
    5. Check if the GeoView is being navigated with geoView.isNavigating().
    6. -
    7. Get the current viewpoint of the active GeoView with geoView.getcurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE).
    8. -
    9. Set the viewpoint of the other view to the active view's viewpoint with geoView.setViewpoint(Viewpoint).
    10. -
    +## Relevant API -

    Relevant API

    +* GeoView +* Viewpoint +* ViewpointChangedEvent -
      -
    • GeoView
    • - -
    • Viewpoint
    • - -
    • ViewpointChangedEvent
    • - -
    - -

    Tags

    - -

    2D, 3D, view synchronisation, Viewpoint, Scene, Map

    +## Tags +2D, 3D, view synchronisation, Viewpoint, Scene, Map diff --git a/scene/terrain-exaggeration/README.md b/scene/terrain-exaggeration/README.md index 66e4a59ca4..d5ba116c80 100644 --- a/scene/terrain-exaggeration/README.md +++ b/scene/terrain-exaggeration/README.md @@ -1,27 +1,23 @@ -

    Terrain Exaggeration

    +# Terrain Exaggeration -

    Vertically exaggerate terrain.

    +Vertically exaggerate terrain. -

    +![](TerrainExaggeration.gif) -

    How to use the sample

    +## How to use the sample -

    Selecting an exaggeration amount from the slider will apply that to the scene's surface.

    +Selecting an exaggeration amount from the slider will apply that to the scene's surface. -

    How it works

    +## How it works -

    To exaggerate a Scene's Surface:

    +To exaggerate a `Scene`'s `Surface`: -
      -
    1. Create an elevated surface and add it to the scene, Surface.getElevationSources().add("elevationURL")
    2. -
    3. Add surface to the scene, scene.setBaseSurface(Surface)
    4. -
    5. Set exaggeration amount of the surface, Surface.setElevationExaggeration(exaggeration)
    6. -
    +1. Create an elevated surface and add it to the scene, `Surface.getElevationSources().add("elevationURL")` +2. Add surface to the scene, ` scene.setBaseSurface(Surface)` +3. Set exaggeration amount of the surface, `Surface.setElevationExaggeration(exaggeration)` -

    Relevant API

    +## Relevant API -
      -
    • ArcGISScene
    • -
    • Surface
    • -
    • ArcGISTiledElevationSource
    • -
    +* ArcGISScene +* Surface +* ArcGISTiledElevationSource diff --git a/scene/view-content-beneath-terrain-surface/README.md b/scene/view-content-beneath-terrain-surface/README.md index f957345b6c..793cfc6369 100644 --- a/scene/view-content-beneath-terrain-surface/README.md +++ b/scene/view-content-beneath-terrain-surface/README.md @@ -1,35 +1,28 @@ -

    View content beneath terrain surface

    +# View content beneath terrain surface -

    See through terrain in a scene and move the camera underground.

    +See through terrain in a scene and move the camera underground. -

    +![](ViewContentBeneathTerrainSurface.png) -

    Use case

    +## Use case -

    By default, a scene's terrain is fully opaque and the camera cannot go underground. To see underground features such as pipes in a utility network, you can lower the opacity of the terrain surface and set the navigation constraint on the surface to allow underground navigation.

    +By default, a scene's terrain is fully opaque and the camera cannot go underground. To see underground features such as pipes in a utility network, you can lower the opacity of the terrain surface and set the navigation constraint on the surface to allow underground navigation. -

    How it works

    +## How it works -
      -
    1. Display an ArcGISScene in a SceneView which contains layers with underground features.
    2. +1. Display an `ArcGISScene` in a `SceneView` which contains layers with underground features. +2. To see underground, get the scene's base surface and set its opacity to a value between 0 and 1. +3. To allow the camera to go underground, set the surface's navigation constraint to `NONE`. -
    3. To see underground, get the scene's base surface and set its opacity to a value between 0 and 1.
    4. +## Relevant API -
    5. To allow the camera to go underground, set the surface's navigation constraint to NONE.
    6. -
    +* Surface +* Surface.NavigationConstraint -

    Relevant API

    +## About the data -
      -
    • Surface
    • +This data is a point scene layer showing underground wellbore paths (green polylines) and seismic events (brown points). -
    • Surface.NavigationConstraint
    • -
    +## Tags -

    About the data

    - -

    This data is a point scene layer showing underground wellbore paths (green polylines) and seismic events (brown points).

    - -

    Tags

    - -

    3D, subsurface, underground, utilities

    \ No newline at end of file +3D, subsurface, underground, utilities diff --git a/scene/view-point-cloud-data-offline/README.md b/scene/view-point-cloud-data-offline/README.md index 9d230afaee..c03701a7d3 100644 --- a/scene/view-point-cloud-data-offline/README.md +++ b/scene/view-point-cloud-data-offline/README.md @@ -1,37 +1,30 @@ -

    View point cloud data offline

    +# View point cloud data offline -

    Display local 3D point cloud data.

    +Display local 3. point cloud data. -

    +![](ViewPointCloudDataOffline.png) -

    Use case

    +## Use case -

    Point clouds are often used to visualize massive sets of sensor data such as lidar. The point locations indicate where the sensor data was measured spatially, and the color or size of the points indicate the measured/derived value of the sensor reading. In the case of lidar, the color of the visualized point could be the color of the reflected light, so that the point cloud forms a true color 3D image of the area.

    +Point clouds are often used to visualize massive sets of sensor data such as lidar. The point locations indicate where the sensor data was measured spatially, and the color or size of the points indicate the measured/derived value of the sensor reading. In the case of lidar, the color of the visualized point could be the color of the reflected light, so that the point cloud forms a true color 3. image of the area. -

    How it works

    +## How it works -
      -
    1. Create a PointCloudLayer with the path to a local .slpk file containing a point cloud layer.
    2. +1. Create a `PointCloudLayer` with the path to a local .slpk file containing a point cloud layer. +2. Add the layer to a scene's operational layers collection. -
    3. Add the layer to a scene's operational layers collection.
    4. -
    +## Relevant API -

    Relevant API

    +* PointCloudLayer -
      -
    • PointCloudLayer
    • -
    +## About the data -

    About the data

    +This point cloud data comes from Balboa Park in San Diego, California. Created and provided by USGS. The points are colored by elevation on a spectrum from red (higher elevation) to blue (lower elevation). -

    This point cloud data comes from Balboa Park in San Diego, California. Created and provided by USGS.

    +## Additional information -

    The points are colored by elevation on a spectrum from red (higher elevation) to blue (lower elevation).

    +Point clouds can be loaded offline from scene layer packages (.slpk) or online via a scene service. -

    Additional information

    +## Tags -

    Point clouds can be loaded offline from scene layer packages (.slpk) or online via a scene service.

    - -

    Tags

    - -

    3D, point cloud, lidar

    +3D, point cloud, lidar diff --git a/search/find-address/README.md b/search/find-address/README.md index 4d1782a89d..a549ba2c8f 100644 --- a/search/find-address/README.md +++ b/search/find-address/README.md @@ -1,32 +1,27 @@ -

    Find Address

    +# Find Address -

    Find the location for an address.

    +Find the location for an address. -

    +![](FindAddress.gif) -

    How to use the sample

    +## How to use the sample -

    For simplicity, the sample comes loaded with a set of addresses. You can select an address to perform online geocoding and show the matching results on the ArcGISMap.

    +For simplicity, the sample comes loaded with a set of addresses. You can select an address to perform online geocoding and show the matching results on the ArcGISMap. -

    How it works

    +## How it works -

    To get a geocode from a query and display its location on the ArcGISMap:

    +To get a geocode from a query and display its location on the `ArcGISMap`: -
      -
    1. Create a LocatorTask using a URL.
    2. -
    3. Set the GeocodeParameters for the locator task and specify the geocode's attributes.
    4. -
    5. Get the matching results from the GeocodeResult using LocatorTask.geocodeAsync(query, geocodeParameters).
    6. -
    7. Show each result with a Graphics in a GraphicsOverlay, storing the attributes in - the graphic's attributes so they can later be shown in a callout.
    8. -
    +1. Create a `LocatorTask` using a URL. +2. Set the `GeocodeParameters` for the locator task and specify the geocode's attributes. +3. Get the matching results from the `GeocodeResult` using `LocatorTask.geocodeAsync(query, geocodeParameters)`. +4. Show each result with a `Graphics` in a `GraphicsOverlay`, storing the attributes in the graphic's attributes so they can later be shown in a callout. -

    Relevant API

    +## Relevant API -
      -
    • ArcGISMap
    • -
    • GeocodeParameters
    • -
    • GeocodeResult
    • -
    • GraphicsOverlay
    • -
    • LocatorTask
    • -
    • MapView
    • -
    +* ArcGISMap +* GeocodeParameters +* GeocodeResult +* GraphicsOverlay +* LocatorTask +* MapView diff --git a/search/find-place/README.md b/search/find-place/README.md index abf16b37ee..75bc3f1823 100644 --- a/search/find-place/README.md +++ b/search/find-place/README.md @@ -1,41 +1,34 @@ -

    Find Place

    +# Find Place -

    Find places of interest near a location or within an specific area.

    +Find places of interest near a location or within an specific area. -

    +![](FindPlace.png) -

    How to use the sample

    +## How to use the sample -

    Choose from the dropdown or input your own place and location to search near. Click the search button to find matching places. A redo search button will appear if you pan the map after a search.

    +Choose from the dropdown or input your own place and location to search near. Click the search button to find matching places. A redo search button will appear if you pan the map after a search. -

    How it works

    +## How it works -

    To find locations matching a query and a search area:

    - -
      -
    1. Create an ArcGISMap's with Basemap. -
      • basemap is created using a TileCache to represent an offline resource.
    2. -
    3. Add the map to the MapView, MapView.setMap().
    4. -
    5. Create a LocatorTask using a URL and set the GeocodeParameters.
    6. -
    7. To reverse geocode near a location, pass the location's position into GeocodeParameters.setSearchArea(Geometry) to set the search area.
    8. -
    9. Limit results to the view's visible area using the MapView.getVisibleArea() method.
    10. -
    11. Show the matching retrieved results from the LocatorTask.geocodeAsync(String, GeocodeParameters) via PictureMarkerSymbols with a Graphic in a GraphicsOverlay.
    12. -
    - -

    Relevant API

    - -
      -
    • ArcGISMap
    • -
    • GeocodeParameters
    • -
    • GeocodeResult
    • -
    • Graphic
    • -
    • GraphicsOverlay
    • -
    • LocatorTask
    • -
    • MapView
    • -
    • PictureMarkerSymbol
    • -
    • ReverseGeocodeParameters
    • -
    • TileCache
    • -
    +To find locations matching a query and a search area: +1. Create an `ArcGISMap`'s with `Basemap`. + * basemap is created using a `TileCache` to represent an offline resource. +2. Add the map to the `MapView`, `MapView.setMap()`. +3. Create a `LocatorTask` using a URL and set the `GeocodeParameters`. +4. To reverse geocode near a location, pass the location's position into `GeocodeParameters.setSearchArea(Geometry)` to set the search area. +5. Limit results to the view's visible area using the `MapView.getVisibleArea()` method. +6. Show the matching retrieved results from the `LocatorTask.geocodeAsync(String, GeocodeParameters)` via `PictureMarkerSymbol`s with a `Graphic` in a `GraphicsOverlay`. +## Relevant API +* ArcGISMap +* GeocodeParameters +* GeocodeResult +* Graphic +* GraphicsOverlay +* LocatorTask +* MapView +* PictureMarkerSymbol +* ReverseGeocodeParameters +* TileCache diff --git a/search/offline-geocode/README.md b/search/offline-geocode/README.md index 9c7076bed5..bd89c80a78 100644 --- a/search/offline-geocode/README.md +++ b/search/offline-geocode/README.md @@ -1,46 +1,36 @@ -

    Offline Geocode

    +# Offline Geocode -

    Geocode with offline data.

    +Geocode with offline data. -

    +![](OfflineGeocode.png) -

    How to use the sample

    +## How to use the sample -

    For simplicity, the sample comes loaded with a set of addresses. You can select any address to perform geocoding -and show it's location on map. You can select the pin and move the mouse to perform reverse geocoding in real-time. -.

    +For simplicity, the sample comes loaded with a set of addresses. You can select any address to perform geocoding and show it's location on map. You can select the pin and move the mouse to perform reverse geocoding in real-time. -

    How it works

    +## How it works -

    To perform geocoding with offline resources:

    +To perform geocoding with offline resources: -
      -
    1. Create an ArcGISMap's using a Basemap and add it to the map view. -
      • basemap is created using a TileCache, which represent our offline resource
      -
    2. -
    3. Create a LocatorTask using a URI to the offline locator file and define the ReverseGeocodeParameters/GeocodeParameters for the LocatorTask.
    4. -
    5. To geocode an address, set the geocode parameters and use LocatorTask.geocodeAsync(query, geocodeParameters).
    6. -
    7. To reverse geocode a location, get the Point location on the map view and use LocatorTask - .reverseGeocodeAsync(point, reverseGeocodeParameters).
    8. -
    9. Show the retrieved results by creating a PictureMarkerSymbol with attributes from the result and add that symbol to a Graphic in the GraphicsOverlay.
    10. -
    - -

    Relevant API

    - -
      -
    • ArcGISMap
    • -
    • ArcGISTiledLayer
    • -
    • Callout
    • -
    • MapView
    • -
    • LocatorTask
    • -
    • GeocodeParameters
    • -
    • GeocodeResult
    • -
    • Graphic
    • -
    • GraphicsOverlay
    • -
    • Point
    • -
    • PictureMarkerSymbol
    • -
    • ReverseGeocodeParameters
    • -
    • TileCache
    • -
    +1. Create an `ArcGISMap`'s using a `Basemap` and add it to the map view. + * basemap is created using a `TileCache`, which represent our offline resource +2. Create a `LocatorTask` using a URI to the offline locator file and define the `ReverseGeocodeParameters`/`GeocodeParameters` fo. the LocatorTask. +3. To geocode an address, set the geocode parameters and use `LocatorTask.geocodeAsync(query, geocodeParameters)`. +4. To reverse geocode a location, get the `Point` location on the map view and use `LocatorTask.reverseGeocodeAsync(point, reverseGeocodeParameters)`. +5. Show the retrieved results by creating a `PictureMarkerSymbol` with attributes from the result and add that symbol to a `Graphic. in the `GraphicsOverlay`. +## Relevant API +* ArcGISMap +* ArcGISTiledLayer +* Callout +* MapView +* LocatorTask +* GeocodeParameters +* GeocodeResult +* Graphic +* GraphicsOverlay +* Point +* PictureMarkerSymbol +* ReverseGeocodeParameters +* TileCache diff --git a/search/reverse-geocode-online/README.md b/search/reverse-geocode-online/README.md index 44cfaddf30..4d95a998d4 100644 --- a/search/reverse-geocode-online/README.md +++ b/search/reverse-geocode-online/README.md @@ -1,38 +1,31 @@ -

    Reverse Geocode Online

    +# Reverse Geocode Online -

    Find the address of a location.

    +Find the address of a location. -

    +![](ReverseGeocodeOnline.png) -

    How to use the sample

    +## How to use the sample -

    You can click on the ArcGISMap to perform online reverse geocoding and show the matching results in the ArcGISMap.

    +You can click on the ArcGISMap to perform online reverse geocoding and show the matching results in the ArcGISMap. -

    How it works

    +## How it works -

    To perform online reverse geocode:

    - -
      -
    1. Create the ArcGISMap's with Basemap. -
      • basemap is created using a TileCache to represent an offline resource
    2. -
    3. Create a LocatorTask using a URL.
    4. -
    5. Set the GeocodeParameters for the LocatorTask and specify the geocodes' attributes.
    6. -
    7. Get the matching results from the GeocodeResult using LocatorTask.reverseGeocodeAsync().
    8. -
    9. Lastly, to show the results using a PictureMarkerSymbol with attributes and add the symbol to a Graphic in the GraphicsOverlay.
    10. -
    - -

    Relevant API

    - -
      -
    • ArcGISMap
    • -
    • GeocodeParameters
    • -
    • GraphicsOverlay
    • -
    • LocatorTask
    • -
    • MapView
    • -
    • PictureMarkerSymbol
    • -
    • ReverseGeocodeParameters
    • -
    • TileCache
    • -
    +To perform online reverse geocode: +1. Create the `ArcGISMap`'s with `Basemap`. +* basemap is created using a `TileCache` to represent an offline resource +2. Create a `LocatorTask` using a URL. +3. Set the `GeocodeParameters` for the LocatorTask and specify the geocodes' attributes. +4. Get the matching results from the `GeocodeResult` using `LocatorTask.reverseGeocodeAsync()`. +5. Lastly, to show the results using a `PictureMarkerSymbol` with attributes and add the symbol to a `Graphic` in th. `GraphicsOverlay`. +## Relevant API +* ArcGISMap +* GeocodeParameters +* GraphicsOverlay +* LocatorTask +* MapView +* PictureMarkerSymbol +* ReverseGeocodeParameters +* TileCache diff --git a/symbology/graphics-overlay-dictionary-renderer-3D/README.md b/symbology/graphics-overlay-dictionary-renderer-3D/README.md index a4c84fb6d2..a80e7f7122 100644 --- a/symbology/graphics-overlay-dictionary-renderer-3D/README.md +++ b/symbology/graphics-overlay-dictionary-renderer-3D/README.md @@ -1,39 +1,30 @@ -

    Graphics Overlay Dictionary Renderer 3D

    +# Graphics Overlay Dictionary Renderer 3D -

    Display MIL-STD-2525D military symbology in 3D.

    +Display MIL-STD-2525. military symbology in 3D. -

    The dictionary renderer creates these graphics using a local mil2525d style file included in the SDK's -resources/symbols directory plus an XML file with key-value attributes for each graphic.

    +The dictionary renderer creates these graphics using a local mil2525. style file included in the SDK's resources/symbols directory plus an XML file with key-value attributes for each graphic. -

    +![](GraphicsOverlayDictionaryRenderer3D.png) -

    How it works

    +## How it works -

    To apply a DictionaryRenderer and display mil2525d graphics in 3D:

    +To apply a `DictionaryRenderer` and display mil2525. graphics in 3D: -
      -
    1. Create a SymbolDicitonary with the "mil2525d" specification type: SymbolDictionary("mil2525d").
    2. -
    3. Create a DictionaryRenderer with the symbol dictionary.
    4. -
    5. Set the renderer on a graphics overlay with graphicsOverlay.setRenderer(dictionaryRenderer).
    6. -
    7. Parse an XML file conforming to the specification. It should have key-value pairs to use as attributes for - each graphic: -
        -
      • Use the name of the XML node as the attribute key and the content of the node as the attribute - value.
      • -
      • Get the WKID and coordinates from the XML to create the graphic's geometry.
      • -
      -
    8. -
    9. The other attributes such as "symbolentity" and "symbolset" will describe the symbology for the graphic.
    10. -
    11. Create the graphic with the geometry and attributes and add it to the graphics overlay.
    12. -
    +1. Create a `SymbolDicitonary` with the "mil2525d" specification type: `SymbolDictionary("mil2525d")`. +2. Create a `DictionaryRenderer` with the symbol dictionary. +3. Set the renderer on a graphics overlay with `graphicsOverlay.setRenderer(dictionaryRenderer)`. +4. Parse an XML file conforming to the specification. It should have key-value pairs to use as attributes for each graphic: + * Use the name of the XML node as the attribute key and the content of the node as the attribute value. + * Get the WKID and coordinates from the XML to create the graphic's geometry. +5. The other attributes such as "symbolentity" and "symbolset" will describe the symbology for the graphic. +6. Create the graphic with the geometry and attributes and add it to the graphics overlay. -

    Relevant API

    +## Relevant API -
      -
    • GraphicsOverlay
    • -
    • DictionaryRenderer
    • -
    • DictionarySymbolStyle
    • -
    +* GraphicsOverlay +* DictionaryRenderer +* DictionarySymbolStyle -

    Tags

    -

    Graphics, Symbology, 3D

    \ No newline at end of file +## Tags + +Graphics, Symbology, 3D diff --git a/symbology/picture-marker-symbol/README.md b/symbology/picture-marker-symbol/README.md index f1c6e5520b..8870ed09cf 100644 --- a/symbology/picture-marker-symbol/README.md +++ b/symbology/picture-marker-symbol/README.md @@ -1,38 +1,32 @@ -

    Picture Marker Symbol

    +# Picture Marker Symbol -

    Use pictures for markers.

    +Use pictures for markers. -

    +![](PictureMarkerSymbol.png) -

    How to use the sample

    +## How to use the sample -

    The picture marker symbols that you see in the app are all constructed from different types of resources - - campsite, constructed from a URL - - blue pin with a star, stored in the resource folder that comes with the application - - orange pin, created from a file path on disk (which is written to disk when the app starts and cleaned up when the app closes)

    +The picture marker symbols that you see in the app are all constructed from different types of resources: + - campsite, constructed from a URL + - blue pin with a star, stored in the resource folder that comes with the application + - orange pin, created from a file path on disk (which is written to disk when the app starts and cleaned up when the app closes) -

    How it works

    +## How it works -

    To display a PictureMarkerSymbol:

    +To display a `PictureMarkerSymbol`: -
      -
    1. Create the ArcGISMap's with Basemap.
    2. -
    3. Create the GraphicsOverlay and add it to the MapView using MapView.getGraphicsOverlays().add().
    4. -
    5. Add the map to the view, MapView.setMap().
    6. -
    7. Use the constructor PictureMarkerSymbol(String uri) to create a symbol from a specified URI (URL, a web page, or from an absolute path to a file that is stored locally).
    8. -
    9. Use the constructor PictureMarkerSymbol(Image) to create a symbol from a local image.
    10. -
    11. Lastly once a symbol is created it will need to be added to a Graphic. Set the graphic to the graphics overlay using the GraphicsOverlay.getGraphics().add() method indicating the location Point.
    12. -
    - -

    Relevant API

    - -
      -
    • ArcGISMap
    • -
    • Graphic
    • -
    • GraphicsOverlay
    • -
    • MapView
    • -
    • PictureMarkerSymbol
    • -
    • Point
    • -
    +1. Create the `ArcGISMap`'s with `Basemap`. +2. Create the `GraphicsOverlay` and add it to the `MapView` using `MapView.getGraphicsOverlays().add()`. +3. Add the map to the view, `MapView.setMap()`. +4. Use the constructor `PictureMarkerSymbol(String uri)` to create a symbol from a specified URI (URL, a web page, or from an absolute path to a file that is stored locally). +5. Use the constructor `PictureMarkerSymbol(Image)` to create a symbol from a local image. +6. Lastly once a symbol is created it will need to be added to a `Graphic`. Set the graphic to the graphics overlay using the `GraphicsOverlay.getGraphics().add()` method indicating the location `Point`. +## Relevant API +* ArcGISMap +* Graphic +* GraphicsOverlay +* MapView +* PictureMarkerSymbol +* Point diff --git a/symbology/simple-fill-symbol/README.md b/symbology/simple-fill-symbol/README.md index 6e67e9c630..ec9aee97c0 100644 --- a/symbology/simple-fill-symbol/README.md +++ b/symbology/simple-fill-symbol/README.md @@ -1,48 +1,37 @@ -

    Simple Fill Symbol

    +# Simple Fill Symbol -

    Change a graphic's fill color, outline, and style properties.

    +Change a graphic's fill color, outline, and style properties. -

    +![](SimpleFillSymbol.png) -

    How to use the sample

    +## How to use the sample -

    Change Fill color: - - change the color that makes up the area of the polygon

    +Change Fill color: - change the color that makes up the area of the polygon +Change Outline Color: - adds a border color to the polygon +Change Fill Style: - changes the pattern that makes up the area of the polygon -

    Change Outline Color: - - adds a border color to the polygon

    +## How it works -

    Change Fill Style: - - changes the pattern that makes up the area of the polygon

    +To create a `SimpleFillSymbol`: -

    How it works

    - -

    To create a SimpleFillSymbol:

    - -
      -
    1. Create the ArcGISMap's with Basemap.
    2. -
    3. Create the GraphicsOverlay and add it to the MapView, MapView.getGraphicsOverlays().add().
    4. -
    5. Add the map to the MapView, MapView.setMap().
    6. -
    7. Create a Polygon using a PointCollection to indicate the boundaries of the Graphic.
    8. -
    9. Create a SimpleFillSymbol(SimpleMarkerSymbol.Style, color, outline). -
      • style, pattern that makes up the area of the geometry
      • -
      • color, color the symbol will be displayed
      • -
      • outline, SimpleLineSymbol that make up the border of the symbol
    10. -
    11. Lately, create a Graphic(Geometry, Symbol) and add it to the graphics overlay.
    12. -
    - -

    Relevant API

    - -
      -
    • ArcGISMap
    • -
    • Graphic
    • -
    • GraphicsOverlay
    • -
    • MapView
    • -
    • Polygon
    • -
    • PointCollection
    • -
    • SimpleFillSymbol
    • -
    • SimpleFillSymbol.Style
    • -
    • SimpleLineSymbol
    • -
    +1. Create the `ArcGISMap`'s with `Basemap`. +2. Create the `GraphicsOverlay` and add it to the `MapView`, `MapView.getGraphicsOverlays().add()`. +3. Add the map to the `MapView`, `MapView.setMap()`. +4. Create a `Polygon` using a `PointCollection` to indicate the boundaries of the `Graphic`. +5. Create a `SimpleFillSymbol(SimpleMarkerSymbol.Style, color, outline)`. + * style, pattern that makes up the area of the geometry + * color, color the symbol will be displayed + * outline, `SimpleLineSymbol` that make up the border of the symbol +6. Lately, create a `Graphic(Geometry, Symbol)` and add it to the graphics overlay. +## Relevant API +* ArcGISMap +* Graphic +* GraphicsOverlay +* MapView +* Polygon +* PointCollection +* SimpleFillSymbol +* SimpleFillSymbol.Style +* SimpleLineSymbol diff --git a/symbology/simple-line-symbol/README.md b/symbology/simple-line-symbol/README.md index 2b335622e5..7e03ab0db1 100644 --- a/symbology/simple-line-symbol/README.md +++ b/symbology/simple-line-symbol/README.md @@ -1,45 +1,36 @@ -

    Simple Line Symbol

    +# Simple Line Symbol -

    Change a line graphic's color and style.

    +Change a line graphic's color and style. -

    +![](SimpleLineSymbol.png) -

    How to use the sample

    +## How to use the sample -

    Change Line Color: - - changes the color of the line symbol

    +Change Line Color: - changes the color of the line symbol +Change Line Width: - change the width of the line symbol +Change Line Style: - changes the pattern of the line symbol -

    Change Line Width: - - change the width of the line symbol

    +## How it works -

    Change Line Style: - - changes the pattern of the line symbol

    +To display a `SimpleLineSymbol`: -

    How it works

    +1. Create a `ArcGISMap`'s with `Basemap`. +2. Create a `GraphicsOverlay` and add it to the `MapView`, `MapView.getGraphicsOverlays().add()`. +3. Add the map to the view, `MapView.setMap()`. +4. Create a `Polyline` using a `PointCollection` to indicate the boundaries of the `Graphic`. +5. Create a `SimpleLineSymbol(SimpleLineSymbol.Style, color, width)`. + * style, pattern that makes up this symbol + * color, color to display this symbol as + * width, size of this symbol +6. Lately, create a `Graphic(Geometry, Symbol)` and add it to the graphics overlay. -

    To display a SimpleLineSymbol:

    +## Relevant API -
      -
    1. Create a ArcGISMap's with Basemap.
    2. -
    3. Create a GraphicsOverlay and add it to the MapView, MapView.getGraphicsOverlays().add().
    4. -
    5. Add the map to the view, MapView.setMap().
    6. -
    7. Create a Polyline using a PointCollection to indicate the boundaries of the Graphic.
    8. -
    9. Create a SimpleLineSymbol(SimpleLineSymbol.Style, color, width). -
      • style, pattern that makes up this symbol
      • -
      • color, color to display this symbol as
      • -
      • width, size of this symbol
    10. -
    11. Lately, create a Graphic(Geometry, Symbol) and add it to the graphics overlay.
    12. -
    - -

    Relevant API

    - -
      -
    • ArcGISMap
    • -
    • Graphic
    • -
    • GraphicsOverlay
    • -
    • MapView
    • -
    • Polyline
    • -
    • PointCollection
    • -
    • SimpleLineSymbol
    • -
    • SimpleLineSymbol.Style
    • -
    +* ArcGISMap +* Graphic +* GraphicsOverlay +* MapView +* Polyline +* PointCollection +* SimpleLineSymbol +* SimpleLineSymbol.Style diff --git a/symbology/simple-marker-symbol/README.md b/symbology/simple-marker-symbol/README.md index b80bf618a0..88e81c24b8 100644 --- a/symbology/simple-marker-symbol/README.md +++ b/symbology/simple-marker-symbol/README.md @@ -1,39 +1,32 @@ -

    Simple Marker Symbol

    +# Simple Marker Symbol -

    Show simple markers.

    +Show simple markers. -

    +![](SimpleMarkerSymbol.png) -

    How to use the sample

    +## How to use the sample -

    For simplicity, the sample starts with a predefined SimpleMarkerSymbol set as a red circle.

    +For simplicity, the sample starts with a predefined SimpleMarkerSymbol set as a red circle. -

    How it works

    +## How it works -

    To display a SimpleMarkerSymbol:

    - -
      -
    1. Create a ArcGISMap's with Basemap.
    2. -
    3. Create a GraphicsOverlay and add it to the MapView,MapView.getGraphicsOverlays().add().
    4. -
    5. Add the map to the view, MapView.setMap().
    6. -
    7. Create a SimpleMarkerSymbol(SimpleMarkerSymbol.Style, color, size). -
      • style, how the symbol will be displayed (circle, square, etc.)
      • -
      • color, color that the symbol will be displayed
      • -
      • size, size of the symbol
    8. -
    9. Lately, create a Graphic(Geometry, Symbol) method and add it to the graphics overlay.
    10. -
    - -

    Relevant API

    - -
      -
    • ArcGISMap
    • -
    • Graphic
    • -
    • GraphicsOverlay
    • -
    • MapView
    • -
    • Point
    • -
    • SimpleMarkerSymbol
    • -
    • SimpleMarkerSymbol.Style
    • -
    +To display a `SimpleMarkerSymbol`: +1. Create a `ArcGISMap`'s with `Basemap`. +2. Create a `GraphicsOverlay` and add it to the `MapView`,`MapView.getGraphicsOverlays().add()`. +3. Add the map to the view, `MapView.setMap()`. +4. Create a `SimpleMarkerSymbol(SimpleMarkerSymbol.Style, color, size)`. + * style, how the symbol will be displayed (circle, square, etc.) + * color, color that the symbol will be displayed + * size, size of the symbol +5. Lately, create a `Graphic(Geometry, Symbol)` method and add it to the graphics overlay. +## Relevant API +* ArcGISMap +* Graphic +* GraphicsOverlay +* MapView +* Point +* SimpleMarkerSymbol +* SimpleMarkerSymbol.Style diff --git a/symbology/simple-renderer/README.md b/symbology/simple-renderer/README.md index 8feb1ac65e..dfd3c77d7d 100644 --- a/symbology/simple-renderer/README.md +++ b/symbology/simple-renderer/README.md @@ -1,39 +1,33 @@ -

    Simple Renderer

    +# Simple Renderer -

    Set default symbols for all graphics in an overlay.

    +Set default symbols for all graphics in an overlay. -

    Renderers are used to display graphics that don't already have a symbol set. A renderer will not override a symbol -that is manually set to a graphic.

    +Renderers are used to display graphics that don't already have a symbol set. A renderer will not override a symbol +that is manually set to a graphic. -

    +![](SimpleRenderer.png) -

    How to use the sample

    +## How to use the sample -

    Starts with a predefined SimpleRenderer that sets a cross SimpleMarkerSymbol as a default symbol for graphics.

    +Starts with a predefined SimpleRenderer that sets a cross SimpleMarkerSymbol as a default symbol for graphics. -

    How it works

    +## How it works -

    How to set a default symbol using a SimpleRenderer:

    +How to set a default symbol using a `SimpleRenderer`: -
      -
    1. Create a ArcGISMap's with Basemap.
    2. -
    3. Create a GraphicsOverlay and add it to the MapView, MapView.getGraphicsOverlays().add().
    4. -
    5. Add the map to the view, MapView.setMap().
    6. -
    7. Create a simple renderer using a SimpleMarkerSymbol, SimpleRenderer(Symbol).
    8. -
    9. Lately, set the renderer to graphics overlay using GraphicsOverlay.setRenderer(Renderer).
    10. -
    - -

    Relevant API

    - -
      -
    • ArcGISMap
    • -
    • Graphic
    • -
    • GraphicsOverlay
    • -
    • MapView
    • -
    • Point
    • -
    • SimpleMarkerSymbol
    • -
    • SimpleMarkerSymbol.Style
    • -
    • SimpleRenderer
    • -
    +1. Create a `ArcGISMap`'s with `Basemap`. +2. Create a `GraphicsOverlay` and add it to the `MapView`, `MapView.getGraphicsOverlays().add()`. +3. Add the map to the view, `MapView.setMap()`. +4. Create a simple renderer using a `SimpleMarkerSymbol`, `SimpleRenderer(Symbol)`. +5. Lately, set the renderer to graphics overlay using `GraphicsOverlay.setRenderer(Renderer)`. +## Relevant API +* ArcGISMap +* Graphic +* GraphicsOverlay +* MapView +* Point +* SimpleMarkerSymbol +* SimpleMarkerSymbol.Style +* SimpleRenderer diff --git a/symbology/symbol-dictionary/README.md b/symbology/symbol-dictionary/README.md index f97d9540f1..e079811d82 100644 --- a/symbology/symbol-dictionary/README.md +++ b/symbology/symbol-dictionary/README.md @@ -1,43 +1,37 @@ -

    Symbol Dictionary

    +# Symbol Dictionary -

    Find symbols within the mil2525d specification that match a keyword.

    - -

    +Find symbols within the mil2525. specification that match a keyword. -

    Use case

    +![](SymbolDictionary.png) -

    You can use support for military symbology to allow users to report changes in the field using the correct military symbols.

    +## Use case -

    How to use the sample

    +You can use support for military symbology to allow users to report changes in the field using the correct military symbols. -

    By default, leaving the fields blank and searching will return all symbols.

    +## How to use the sample -

    To filter symbols, enter text into one or multiple seach boxes and click the Search for Symbols button.

    +By default, leaving the fields blank and searching will return all symbols. -

    Click the Clear button to clear previous search results.

    +To filter symbols, enter text into one or multiple seach boxes and click the Search for Symbols button. -

    How it works

    +Click the Clear button to clear previous search results. -
      -
    1. Create a symbol dictionary with the mil2525d specification by passing the string "mil2525d" to the - SymbolDictionary constructor.
    2. -
    3. Create StyleSymbolSearchParameters.
    4. -
    5. Add members to the names, tags, symbolClasses, categories, and keys list fields of the search parameters.
    6. -
    7. Search for symbols using the parameters with symbolDictionary.searchSymbolsAsync(styleSymbolSearchParameters).
    8. -
    9. Get the Symbol from the list of returned StyleSymbolSearchResult.
    10. -
    +## How it works -

    Relevant API

    +1. Create a symbol dictionary with the mil2525. specification by passing the string "mil2525d" to the `SymbolDictionary` constructor. +2. Create `StyleSymbolSearchParameters`. +3. Add members to the names, tags, symbolClasses, categories, and keys list fields of the search parameters. +4. Search for symbols using the parameters with `symbolDictionary.searchSymbolsAsync(styleSymbolSearchParameters)`. +5. Get the `Symbol` from the list of returned `StyleSymbolSearchResult`. -
      -
    • StyleSymbolSearchParameters
    • -
    • StyleSymbolSearchResult
    • -
    • Symbol
    • -
    • SymbolDictionary
    • -
    +## Relevant API -

    Tags

    +* StyleSymbolSearchParameters +* StyleSymbolSearchResult +* Symbol +* SymbolDictionary -

    CIM, MIL-STD-2525B, MIL-STD-2525C, MIL-STD-2525D, defense, look up, mil2525b, mil2525c, mil2525d, military, military - symbology, symbology

    +## Tags +CIM, MIL-STD-2525B, MIL-STD-2525C, MIL-STD-2525D, defense, look up, mil2525b, mil2525c, mil2525d, military, military + symbology, symbology diff --git a/symbology/symbolize-shapefile/README.md b/symbology/symbolize-shapefile/README.md index 820cb84245..1f089f03e1 100644 --- a/symbology/symbolize-shapefile/README.md +++ b/symbology/symbolize-shapefile/README.md @@ -1,35 +1,28 @@ -

    Symbolize Shapefile

    +# Symbolize Shapefile -

    Override the default rendering of a shapefile.

    - -

    +Override the default rendering of a shapefile. -

    How to use the sample

    +![](SymbolizeShapefile.png) -

    Press the toggle button to switch between red and yellow symbols and the default renderer.

    +## How to use the sample -

    How it works

    +Press the toggle button to switch between red and yellow symbols and the default renderer. -

    To change the renderer of a shapefile feature layer:

    +## How it works -
      -
    1. Create a ShapefileFeatureTable passing in the URL of a shapefile.
    2. -
    3. Create a FeatureLayer using the ShapefileFeatureTable.
    4. -
    5. Create a SimpleLineSymbol and SimpleFillSymbol (uses the line symbol).
    6. -
    7. Make a SimpleRenderer with the SimpleFillSymbol.
    8. -
    9. To apply the renderer, use featureLayer.setRenderer(renderer).
    10. -
    11. To go back to the default renderer, use featureLayer.resetRenderer().
    12. -
    - -

    Relevant API

    - -
      -
    • FeatureLayer
    • -
    • ShapefileFeatureTable
    • -
    • SimpleFillSymbol
    • -
    • SimpleLineSymbol
    • -
    • SimpleRenderer
    • -
    +To change the renderer of a shapefile feature layer: +1. Create a `ShapefileFeatureTable` passing in the URL of a shapefile. +2. Create a `FeatureLayer` using the `ShapefileFeatureTable`. +3. Create a `SimpleLineSymbol` and `SimpleFillSymbol` (uses the line symbol). +4. Make a `SimpleRenderer` with the `SimpleFillSymbol`. +5. To apply the renderer, use `featureLayer.setRenderer(renderer)`. +6. To go back to the default renderer, use `featureLayer.resetRenderer()`. +## Relevant API +* FeatureLayer +* ShapefileFeatureTable +* SimpleFillSymbol +* SimpleLineSymbol +* SimpleRenderer diff --git a/symbology/unique-value-renderer/README.md b/symbology/unique-value-renderer/README.md index 610c1e344a..a877e99e96 100644 --- a/symbology/unique-value-renderer/README.md +++ b/symbology/unique-value-renderer/README.md @@ -1,58 +1,54 @@ -

    Unique Value Renderer

    +# Unique Value Renderer -

    Symbolize features based on their unique attribute value.

    +Symbolize features based on their unique attribute value. -

    Demonstrates how to use an UniqueValueRenderer to display Features from a FeatureLayer using different symbols. An unique value renderer sets an attribute to look for any matches within it's unique values. If there is a match then the symbol assign to that unique value is use to display that feature with the same value.

    +Demonstrates how to use an UniqueValueRenderer to display Features from a FeatureLayer using different symbols. An unique value renderer sets an attribute to look for any matches within it's unique values. If there is a match then the symbol assign to that unique value is use to display that feature with the same value. -

    +![](UniqueValueRenderer.png) -

    In this sample the unique value renderer is looking for the "STATE_ABBR" attribute within each feature of the feature layer. For example we will have a unique value renderer that has a unique value set to the abbreviation for California.

    -
    SimpleFillSymbol californiaFillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID, RED,
    +In this sample the unique value renderer is looking for the "STATE_ABBR" attribute within each feature of the feature layer. For example we will have a unique value renderer that has a unique value set to the abbreviation for California.
    +
    +```java
    +SimpleFillSymbol californiaFillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID, RED,
     new SimpleLineSymbol(SimpleLineSymbol.Style.SOLID, RED, 2));
     
     List<Object> californiaValue = new ArrayList<>();
     californiaValue.add("CA");
     uniqueValueRenderer.getUniqueValues().add(new UniqueValue(State of California", "California",
     californiaFillSymbol, californiaValue));
    -
    - -

    When this unique value renderer comes across the feature whos key "STATE_ABBR" is value "CA" it will assign the symbol from the unique value above to this feature.

    - -

    How to use the sample

    - -

    Sample starts with a predefined UniqueValues for some US states which are set to the UniqueValueRenderer and applied to the FeatureLayer.

    - -

    How it works

    - -

    To display different Symbol for different Graphics:

    - -
      -
    1. Create a ArcGISMap's with Basemap.
    2. -
    3. Create a FeatureLayer and add it to the map, ArcGISMap.getOperationalLayers().add().
    4. -
    5. Add the map to the view, MapView.setMap().
    6. -
    7. Create a UniqueValueRenderer. -
      • specify default feature attribute to look for, UniqueValueRenderer.getFieldNames().add()
      • -
      • set default symbol for renderer, UniqueValueRenderer.setDefaultSymbol()
      • -
      • set renderer to feature layer, FeatureLayer.setRenderer(Renderer)
    8. -
    9. Create a set of UniqueValue(Description, Name, Symbol, Value). -
      • description, description for this unique value
      • -
      • name, name for this unique value
      • -
      • symbol, symbol to be displayed for the values listed here
      • -
      • value, list of values that will use the symbol set here (Example: List of state name abbreviations "CA")
    10. -
    11. Add unique values to renderer, UniqueValueRenderer.getUniqueValues().add(UniqueValue).
    12. -
    - -

    Relevant API

    - -
      -
    • ArcGISMap
    • -
    • FeatureLayer
    • -
    • MapView
    • -
    • ServiceFeatureTable
    • -
    • SimpleFillSymbol
    • -
    • SimpleLineSymbol
    • -
    • UniqueValues
    • -
    • UniqueValueRenderer
    • -
    - - +``` + +When this unique value renderer comes across the feature whos key "STATE_ABBR" is value "CA" it will assign the symbol from the unique value above to this feature. + +## How to use the sample + +Sample starts with a predefined UniqueValues for some US states which are set to the UniqueValueRenderer and applied to the FeatureLayer. + +## How it works + +To display different `Symbol` for different `Graphic`s: + +1. Create a `ArcGISMap`'s with `Basemap`. +2. Create a `FeatureLayer` and add it to the map, `ArcGISMap.getOperationalLayers().add()`. +3. Add the map to the view, `MapView.setMap()`. +4. Create a `UniqueValueRenderer`. + * specify default feature attribute to look for, `UniqueValueRenderer.getFieldNames().add()` + * set default symbol for renderer, `UniqueValueRenderer.setDefaultSymbol()` + * set renderer to feature layer, `FeatureLayer.setRenderer(Renderer)` +5. Create a set of `UniqueValue(Description, Name, Symbol, Value)`. + * description, description for this unique value + * name, name for this unique value + * symbol, symbol to be displayed for the values listed here + * value, list of values that will use the symbol set here (Example: List of state name abbreviations "CA") +6. Add unique values to renderer, `UniqueValueRenderer.getUniqueValues().add(UniqueValue)`. + +## Relevant API + +* ArcGISMap +* FeatureLayer +* MapView +* ServiceFeatureTable +* SimpleFillSymbol +* SimpleLineSymbol +* UniqueValues +* UniqueValueRenderer diff --git a/tiled_layers/export-tiles/README.md b/tiled_layers/export-tiles/README.md index 3b48746131..c95a39b40b 100644 --- a/tiled_layers/export-tiles/README.md +++ b/tiled_layers/export-tiles/README.md @@ -1,31 +1,26 @@ -

    Export Tiles

    +# Export Tiles -

    Export tiles from an online tile service.

    +Export tiles from an online tile service. -

    +![](ExportTiles.png) -

    How it works

    +## How it works -

    To export tiles from an ArcGISTiledLayer:

    -
      -
    1. Create an ExportTileCacheTask, passing in the URI of the tiled layer
    2. -
    3. Create default ExportTileCacheParameters with task.createDefaultExportTileCacheParametersAsync - (extent, minScale, maxScale)
    4. -
    5. Call task.exportTileCacheAsync(defaultParams, downloadFile) to create the - ExportTileCacheJob
    6. -
    7. Call job.start() to start the job
    8. -
    9. When the job is done, use job.getResult() to get the resulting TileCache
    10. -
    +To export tiles from an `ArcGISTiledLayer`: -

    Relevant API

    +1. Create an `ExportTileCacheTask`, passing in the URI of the tiled layer +2. Create default `ExportTileCacheParameters` with `task.createDefaultExportTileCacheParametersAsync(extent, minScale, maxScale)` +3. Call `task.exportTileCacheAsync(defaultParams, downloadFile)` to create the `ExportTileCacheJob` +4. Call `job.start()` to start the job +5. When the job is done, use `job.getResult()` to get the resulting `TileCache` -
      -
    • ArcGISMap
    • -
    • ArcGISTiledLayer
    • -
    • Basemap
    • -
    • ExportTileCacheJob
    • -
    • ExportTileCacheParamters
    • -
    • ExportTileCacheTask
    • -
    • MapView
    • -
    • TileCache
    • -
    +## Relevant API + +* ArcGISMap +* ArcGISTiledLayer +* Basemap +* ExportTileCacheJob +* ExportTileCacheParamters +* ExportTileCacheTask +* MapView +* TileCache diff --git a/tiled_layers/export-vector-tiles/README.md b/tiled_layers/export-vector-tiles/README.md index 6f6962cf33..27e0019f56 100644 --- a/tiled_layers/export-vector-tiles/README.md +++ b/tiled_layers/export-vector-tiles/README.md @@ -1,43 +1,33 @@ -

    Export Vector Tiles

    - -

    Export tiles from an online vector tile service.

    - -

    - -

    How to use the sample

    - -

    First, a dialog will appear prompting for authentication credentials to arcgis.com. When the vector tiled layer -loads, zoom in to the extent you want to export. The red box shows the extent that will be exported. Click the -"Export Vector Tiles" button to start the job. A progress indicator will show. The larger the extent, the longer it -will take to export. An error will show if the extent is larger than the maximum limit allowed. When finished, a -dialog will show the exported result in a new map view.

    - -

    How it works

    - -

    To export tiles from an ArcGISVectorTiledLayer:

    -
      -
    1. Create an ExportVectorTilesTask, passing in the PortalItem for the vector tiled layer. - Since vector tiled layers are premium content, you must first authenticate with the Portal.
    2. -
    3. Create default ExportTilesParameters with task.createDefaultExportTilesParametersAsync(extent, maxScale).
    4. -
    5. Call task.exportVectorTilesAsync(defaultParams, vtpkPath, resourcePath) to create the - ExportVectorTilesJob. The resource path is required if you want to export the tiles with the style.
    6. -
    7. Call job.start() to start the export job.
    8. -
    9. When the job is done, use job.getResult() to get the resulting - ExportVectorTilesResult.
    10. -
    11. You can load the result as a ArcGISVectorTiledLayer with new ArcGISVectorTiledLayer(result.getVectorTileCache(), result.getItemResourceCache()).
    12. -
    - -

    Relevant API

    - -
      -
    • ArcGISVectorTiledLayer
    • -
    • ExportVectorTilesJob
    • -
    • ExportVectorTilesParamters
    • -
    • ExportVectorTilesResult
    • -
    • ExportVectorTilesTask
    • -
    • ItemResourceCache
    • -
    • Portal
    • -
    • PortalItem
    • -
    • UserCredential
    • -
    • VectorTileCache
    • -
    +# Export Vector Tiles + +Export tiles from an online vector tile service. + +![](ExportVectorTiles.png) + +## How to use the sample + +First, a dialog will appear prompting for authentication credentials to arcgis.com. When the vector tiled layer loads, zoom in to the extent you want to export. The red box shows the extent that will be exported. Click the "Export Vector Tiles" button to start the job. A progress indicator will show. The larger the extent, the longer it will take to export. An error will show if the extent is larger than the maximum limit allowed. When finished, a dialog will show the exported result in a new map view. + +## How it works + +To export tiles from an `ArcGISVectorTiledLayer`: + +1. Create an `ExportVectorTilesTask`, passing in the `PortalItem` for the vector tiled layer. Since vector tiled layers are premium content, you must first authenticate with the Portal. +2. Create default `ExportTilesParameters` with `task.createDefaultExportTilesParametersAsync(extent, maxScale)`. +3. Call `task.exportVectorTilesAsync(defaultParams, vtpkPath, resourcePath)` to create the `ExportVectorTilesJob`. The resource path is required if you want to export the tiles with the style. +4. Call `job.start()` to start the export job. +5. When the job is done, use `job.getResult()` to get the resulting `ExportVectorTilesResult`. +6. You can load the result as a `ArcGISVectorTiledLayer` with `new ArcGISVectorTiledLayer(result.getVectorTileCache(), result.getItemResourceCache())`. + +## Relevant API + +* ArcGISVectorTiledLayer +* ExportVectorTilesJob +* ExportVectorTilesParamters +* ExportVectorTilesResult +* ExportVectorTilesTask +* ItemResourceCache +* Portal +* PortalItem +* UserCredential +* VectorTileCache diff --git a/tiled_layers/tile-cache/README.md b/tiled_layers/tile-cache/README.md index 4f4213bb0a..cd9fc01b0e 100644 --- a/tiled_layers/tile-cache/README.md +++ b/tiled_layers/tile-cache/README.md @@ -1,34 +1,30 @@ -

    Tile cache

    +# Tile cache -

    Create a basemap from a local tile cache.

    +Create a basemap from a local tile cache. -

    +![](TileCache.png) -

    Use case

    +## Use case -

    An ArcGISTiledLayer consumes raster tiles provided by an ArcGIS service or a tile package (.tpk & .tpkx). Dividing a raster into tiles allows the map to provide relevant tiles and level of detail to the user when panning and zooming.

    +An `ArcGISTiledLayer` consumes raster tiles provided by an ArcGIS service or a tile package (.tpk & .tpkx). Dividing a raster into tiles allows the map to provide relevant tiles and level of detail to the user when panning and zooming. -

    How it works

    +## How it works -
      -
    1. Create a TileCache, specifying the path to the local tile package.
    2. -
    3. Create a ArcGISTiledLayer with the tile cache.
    4. -
    5. Create a Basemap with the tiled layer.
    6. -
    7. Create a ArcGISMap with the basemap and set it to a MapView.
    8. -
    +1. Create a `TileCache`, specifying the path to the local tile package. +2. Create a `ArcGISTiledLayer` with the tile cache. +3. Create a `Basemap` with the tiled layer. +4. Create a `ArcGISMap` with the basemap and set it to a `MapView`. -

    Relevant API

    +## Relevant API -
      -
    • ArcGISMap
    • -
    • ArcGISTiledLayer
    • -
    • TileCache
    • -
    +* ArcGISMap +* ArcGISTiledLayer +* TileCache -

    Additional information

    +## Additional information -

    ArcGISTiledLayer supports both .tpk and .tpkx file formats.

    +`ArcGISTiledLayer` supports both .tpk and .tpkx file formats. -

    Tags

    +## Tags -

    layers, tile, TileCache, ArcGISTiledLayer

    +layers, tile, TileCache, ArcGISTiledLayer diff --git a/tiled_layers/tiled-layer/README.md b/tiled_layers/tiled-layer/README.md index bec612e9f6..fd58f214fc 100644 --- a/tiled_layers/tiled-layer/README.md +++ b/tiled_layers/tiled-layer/README.md @@ -1,33 +1,29 @@ -

    Tiled layer

    +# Tiled layer -

    Display tiles from an ArcGIS tile service.

    +Display tiles from an ArcGIS tile service. -

    Use case

    +## Use case -

    An `ArcGISTiledLayer` consumes raster tiles provided by an ArcGIS service or a tile package (.tpk & .tpkx). Dividing a raster into tiles allows the map to provide relevant tiles and level of detail to the user when panning and zooming, allowing for rapid map visualization and navigation. The service in this sample pre-generates images based on a tiling scheme.

    +An `ArcGISTiledLayer` consumes raster tiles provided by an ArcGIS service or a tile package (.tpk & .tpkx). Dividing a raster into tiles allows the map to provide relevant tiles and level of detail to the user when panning and zooming, allowing for rapid map visualization and navigation. The service in this sample pre-generates images based on a tiling scheme. -

    +![](TiledLayer.png) -

    How it works

    +## How it works -
      -
    1. Create an ArcGISTiledLayer object from a URL.
    2. -
    3. Pass the tiled layer in to a new Basemap.
    4. -
    5. Set the basemap to an ArcGISMap.
    6. -
    +1. Create an `ArcGISTiledLayer` object from a URL. +2. Pass the tiled layer in to a new `Basemap`. +3. Set the basemap to an `ArcGISMap`. -

    Relevant API

    +## Relevant API -
      -
    • ArcGISMap
    • -
    • ArcGISTiledLayer
    • -
    • MapView
    • -
    +* ArcGISMap +* ArcGISTiledLayer +* MapView -

    Additional information

    +## Additional information -

    An ArcGISTiledLayer can also be added to the ArcGISMap as a layer, but it's best practice to use as a basemap since its purpose is to provide geographical context. Tiled Layer supports both .tpk and .tpkx file formats.

    +An `ArcGISTiledLayer` can also be added to the ArcGISMap as a layer, but it's best practice to use as a basemap since its purpose is to provide geographical context. Tiled Layer supports both .tpk and .tpkx file formats. -

    Tags

    +## Tags -

    layers, tile, ArcGISTiledLayer

    \ No newline at end of file +layers, tile, ArcGISTiledLayer diff --git a/tiled_layers/vector-tiled-layer-url/README.md b/tiled_layers/vector-tiled-layer-url/README.md index 7fc766ea3c..6df8a295a6 100644 --- a/tiled_layers/vector-tiled-layer-url/README.md +++ b/tiled_layers/vector-tiled-layer-url/README.md @@ -1,24 +1,20 @@ -

    Vector Tiled Layer URL

    +# Vector Tiled Layer URL -

    Display tiles from an ArcGIS vector tile service.

    +Display tiles from an ArcGIS vector tile service. -

    +![](VectorTiledLayerURL.png) -

    How it works

    +## How it works -

    To add an ArcGISTiledLayer as a Basemap to an ArcGISMap:

    +To add an `ArcGISTiledLayer` as a `Basemap` to an `ArcGISMap`: -
      -
    1. Create an ArcGISVectorTiledLayer from a URL with new ArcGISVectorTiledLayer(url).
    2. -
    3. Create a basemap passing in the vector tiled layer.
    4. -
    5. Set the basemap to the map with map.setBasemap(basemap).
    6. -
    +1. Create an ArcGISVectorTiledLayer from a URL with `new ArcGISVectorTiledLayer(url)`. +2. Create a basemap passing in the vector tiled layer. +3. Set the basemap to the map with `map.setBasemap(basemap)`. -

    Relevant API

    +## Relevant API -
      -
    • ArcGISMap
    • -
    • ArcGISVectorTiledLayer
    • -
    • Basemap
    • -
    • MapView
    • -
    +* ArcGISMap +* ArcGISVectorTiledLayer +* Basemap +* MapView diff --git a/tiled_layers/web-tiled-layer/README.md b/tiled_layers/web-tiled-layer/README.md index 6e372b4339..69cd80bb0a 100644 --- a/tiled_layers/web-tiled-layer/README.md +++ b/tiled_layers/web-tiled-layer/README.md @@ -1,28 +1,24 @@ -

    Web Tiled Layer

    +# Web Tiled Layer -

    Display map tiles from any custom (non-ArcGIS) service.

    +Display map tiles from any custom (non-ArcGIS) service. -

    WebTiledLayer provides a simple way to integrate non-ArcGIS Services as a layer in a map. In this case, map tiles +WebTiledLayer provides a simple way to integrate non-ArcGIS Services as a layer in a map. In this case, map tiles from Stamen are added to the map. The template URI is specified by setting the subDomains, level, column, and row -attributes. Additionally, copyright information is added to the layer so that the layer can be properly attributed.

    +attributes. Additionally, copyright information is added to the layer so that the layer can be properly attributed. -

    +![](WebTiledLayer.png) -

    How it works

    +## How it works -

    To create and display a WebTiledLayer with custom attribution:

    +To create and display a `WebTiledLayer` with custom attribution: -
      -
    1. Create a WebTiledLayer specifying the list of subdomains and a template URI.
    2. -
    3. After loading the layer, use webTiledLayer.setAttribution(attributionText) to set custom - attribution.
    4. -
    +1. Create a `WebTiledLayer` specifying the list of subdomains and a template URI. +2. After loading the layer, use `webTiledLayer.setAttribution(attributionText)` to set custom + attribution. -

    Relevant API

    +## Relevant API -
      -
    • ArcGISMap
    • -
    • Basemap
    • -
    • MapView
    • -
    • WebTiledLayer
    • -
    +* ArcGISMap +* Basemap +* MapView +* WebTiledLayer