项目作者: conterra

项目描述 :
The Enhanced Selection Bundle allows you to select features in enhanced ways.
高级语言: JavaScript
项目地址: git://github.com/conterra/mapapps-enhanced-selection.git
创建时间: 2015-10-21T08:26:02Z
项目社区:https://github.com/conterra/mapapps-enhanced-selection

开源协议:Other

下载


Enhanced Selection

The Enhanced Selection Bundle allows you to select features in enhanced ways. There are these six special types of selection:

  • Area Selection
  • Freehand Polygon
  • Polygon
  • Existing Graphic
  • Current Extent
  • Distance
  • Travel Time
  • Search Selection

freehand polygon selection

distance selection

Installation Guide

Configurable Components:

BaseWidget:

Enable Bundle in app.json

  1. "load" : {
  2. // ...
  3. "allowedBundles": [
  4. "dn_enhancedselection",
  5. // ...
  6. ]
  7. }

Then check if you can choose it in Live Configuration / Extended Configuration.

To add the layer to one of the toolbars open Up

Live Configuration / Extended Configuration / Toolset (toolset) / Components / ToolsetManager

and add dn_enhancedselectionToggleTool to any tools array (depending on where you want to place the button)

Basic Settings

  1. "BaseWidget": {
  2. "enableContains": true
  3. }
BaseWidgetController:

Basic Settings

  1. "BaseWidgetController": {
  2. "clearGraphics": true
  3. }
SrWidgetFactory:

Define selectable stores

  1. "SrWidgetFactory": {
  2. "storeIds": [
  3. "%STORE_ID1%",
  4. "%STORE_ID2%",
  5. ...
  6. ]
  7. }
SelectFeatureFromLayerController:

Define selectable stores

  1. "SelectFeatureFromLayerController": {
  2. "widgetEnabled": true,
  3. "storeIds": [
  4. "%STORE_ID1%",
  5. "%STORE_ID2%",
  6. ...
  7. ]
  8. }
FreehandPolygonController
  1. "FreehandPolygonController": {
  2. "widgetEnabled": true
  3. }
PolygonController
  1. "PolygonController": {
  2. "widgetEnabled": true
  3. }
ExistingGraphicController
  1. "ExistingGraphicController": {
  2. "widgetEnabled": true
  3. }
CurrentExtentController
  1. "CurrentExtentController": {
  2. "widgetEnabled": true
  3. }
DistanceCircleController:
  1. "DistanceCircleController": {
  2. "widgetEnabled": true,
  3. "distance": {
  4. "minimum": 0,
  5. "maximum": 1000,
  6. "defaultStart": 0,
  7. "defaultEnd": 500,
  8. "interval": 50,
  9. "unit": "KILOMETERS"
  10. }
  11. }
DriveTimeController
  1. "DriveTimeController": {
  2. "widgetEnabled": true,
  3. "geoprocessorUrl": "http://logistics.arcgis.com/arcgis/rest/services/World/ServiceAreas/GPServer/GenerateServiceAreas",
  4. "drivetime": {
  5. "minimum": 0,
  6. "maximum": 30,
  7. "interval": 1
  8. }
  9. }
SearchSelection
  1. "SearchSelectionController": {
  2. "widgetEnabled": true
  3. },

You can activate or deactivate all widgets by setting “widgetEnabled” to true or false.

To change the order of selection types you can change the Service-Ranking:

  1. "SelectFeatureFromLayerWidget": {
  2. "Service-Ranking": -1
  3. },
  4. "FreehandPolygonWidget": {
  5. "Service-Ranking": -2
  6. },
  7. "PolygonWidget": {
  8. "Service-Ranking": -3
  9. },
  10. "ExistingGraphicWidget": {
  11. "Service-Ranking": -4
  12. },
  13. "CurrentExtentWidget": {
  14. "Service-Ranking": -5
  15. },
  16. "DistanceCircleWidget": {
  17. "Service-Ranking": -6
  18. },
  19. "DriveTimeWidget": {
  20. "Service-Ranking": -7
  21. }

Development Guide

Define the mapapps remote base

Before you can run the project you have to define the mapapps.remote.base property in the pom.xml-file:
<mapapps.remote.base>http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%</mapapps.remote.base>

Other methods to to define the mapapps.remote.base property.
  1. Goal parameters
    mvn install -Dmapapps.remote.base=http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%

  2. Build properties
    Change the mapapps.remote.base in the build.properties file and run:
    mvn install -Denv=dev -Dlocal.configfile=%ABSOLUTEPATHTOPROJECTROOT%/build.properties