|
DOC
|
@KARIMLABIDI OK now I understand your issue. You can follow the directions in the downloads readMe.txt to set the initial state of the button to be toggled on
... View more
02-09-2022
07:58 AM
|
0
|
0
|
9251
|
|
DOC
|
@JohnSasso2 Strange you should have been notified that I do not have private messaging enabled.
... View more
02-08-2022
08:05 AM
|
0
|
0
|
10322
|
|
DOC
|
@JohnSasso2 So the Edit widget gives the ability to export to GeoJSON? If so then I could use code from there to make this happen quicker.
... View more
02-08-2022
05:52 AM
|
0
|
0
|
10345
|
|
POST
|
@RyanBohan Then the Code for that: <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<title>Tab title</title>
<style>
html,
body,
#heading {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
background-color: #0098db;
}
.header {
text-align: left;
background: #1abc9c;
color: rgb(255, 255, 255);
height: 44px;
display: flex;
align-items: center;
font-weight: bolder;
font-size: 24pt;
}
.header img {
height: 40px;
margin: 0 8px 0 8px;
}
#viewDiv {
padding: 0;
margin: 0;
height: calc(100% - 44px);
width: 100%;
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.21/esri/themes/light/main.css" />
<script src="https://js.arcgis.com/4.21/"></script>
<script>
require(["esri/views/MapView", "esri/WebMap"], (MapView, WebMap) => {
const webmap = new WebMap({
portalItem: {
id: "f2e9b762544945f390ca4ac3671cfa72",
portal: {
url: "https://www.arcgis.com/" //AGO
}
}
});
const view = new MapView({
map: webmap,
container: "viewDiv",
popup: {
dockEnabled: true,
dockOptions: {
buttonEnabled: true,
breakpoint: false,
position: "top-right"
}
}
});
view.ui.move(["zoom"], {
position: "top-left",
index: 3
});
});
</script>
</head>
<div class="header"><img src="https://d29fhpw069ctt2.cloudfront.net/icon/image/39024/preview.png" />Heading title</div>
<body>
<div id="viewDiv">
</div>
</body>
</html> It best practice to do your styling with css in the style tag or a separate css file.
... View more
02-08-2022
05:48 AM
|
1
|
0
|
3234
|
|
DOC
|
@JohnSasso The ability to export drawings and re-import then to an app is definitely on the todo list. I will have to consider the KML export option.
... View more
02-08-2022
05:20 AM
|
0
|
0
|
10354
|
|
DOC
|
@KARIMLABIDI You control the initial layer visibility state in your web map that WAB is using. The widget does not control that.
... View more
02-08-2022
05:16 AM
|
0
|
0
|
9266
|
|
DOC
|
Note: This is an EB 1.9 Widget (not backward compatible). Live Preview Site Changes in 1.9 Updated for EB 1.9 Older Changes in 1.7.1: Auto Close Popup now works. Added "Coordinate precision in popup results" setting that controls the number of digits to the right of the decimal for coordinates listed in the pop-up. Setting the "WKID for coordinates displayed in popup" now controls the only displayed coordinates in the popup (no longer does it display the map WKID or the set WKID and Lat and Lon coordinates). If this value is not set then coordinates will be displayed as the maps WKID. Fixed some widget settings getting entered in the config as strings instead of numbers as expected. Features: Locate an address (like the search widget, but gives you the ability to limit the address search to the maps current extent). Locate coordinates using user defined spatial reference coordinates (i.e. DMS, State Plane, Etc). Reverse Geocode capability called Address Inspection. Address Inspection is clicking on the map and getting the address of the map click point. To install this widget extract the contents of the zip file to your EB\client\your-extensions\widgets. So once you extract the whole path would look like: \client\your-extensions\widgets\eLocate. Refresh your client and server windows (easiest way is to close both and 'npm start' them like you normally do to start EB). Now the draw widget will appear in your apps widget menu. Add the widget to your app. Now use the widgets settings panel to configure the widget. Enjoy, Robert
... View more
02-07-2022
01:13 PM
|
10
|
28
|
16647
|
|
POST
|
https://developers.arcgis.com/web-appbuilder/guide/xt-deploy-app.htm
... View more
02-03-2022
09:48 AM
|
0
|
1
|
2718
|
|
POST
|
@elitesniper as @Katie_Clark has already mentioned there is no option that allows using custom widgets with AGOL. You will have to get ArcGIS Enterprise or use WAB Developer edition to add custom widgets to a WAB application and then deploy this WAB Apps to your own web server or a hosting service. If you have an existing WAB app that you are working with on AGOL that app can be imported to WAB Developer edition to be further customized and then deployed. In case you ask, customized apps from WAB Dev can not be imported to AGOL.
... View more
02-03-2022
05:31 AM
|
1
|
3
|
2729
|
|
DOC
|
@FannyFortin-Delmar1 That is the correct code location for the red X in the chart. To replace that with a bike in the chart you would have to get SVG code for a bike symbol and replace that section. markerSymbol: 'm -6 -6, l 12 12, m 0 -12, l -12 12', // RED X // For the red X on the map it is this line that would have to be changed: var chartLocationSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_X, 13, outline, red); You could change the SimpleMarkerSymbol to a PictureMarkerSymbol. The second half of your request is quite complicated and will not be possible for someone who is a beginner in development.
... View more
02-01-2022
08:14 AM
|
0
|
0
|
14744
|
|
DOC
|
@JonathanKressin The undo redo works when you are updating the geometry of a drawn graphic. So you draw a graphic and then un-toggle whichever button you had selected and then click the draw graphic on the map to edit it and then any edits (scale, rotation, position, etc) will be added to undo redo stack.
... View more
01-31-2022
11:03 AM
|
0
|
0
|
10409
|
|
DOC
|
Note: This is an EB 1.7 Widget (not backward compatible). Live Preview Site Details: The widget allows you to draw in a 2D map view. You can edit graphics that you have drawn (symbology and geometry). You can draw points, lines, polygons, text To install this widget extract the contents of the zip file to your EB\client\your-extensions\widgets. So once you extract the whole path would look like: \client\your-extensions\widgets\draw. Refresh your client and server windows (easiest way is to close both and 'npm start' them like you normally do to start EB). Now the draw widget will appear in your apps widget menu. Add the widget to your app. Now use the widgets settings panel to configure the widget. This widget requires an edit to the client\types\arcgis-js-api.d.ts file. You must add: ....
interface SketchViewModel extends Accessor, Evented {
....
canUndo(): boolean;
canRedo(): boolean;
... So the complete portion of the changed file will look like this: interface SketchViewModel extends Accessor, Evented {
/**
* The [SimpleFillSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html) displayed when actively creating a new `polygon` graphic using the [`polygon`](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#activeTool) tool.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#activeFillSymbol)
*/
activeFillSymbol: SimpleFillSymbol;
/**
* When creating new graphics (for example after [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#create) has been called), this property reflects the create tool being used.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#activeTool)
*/
readonly activeTool:
| "point"
| "multipoint"
| "polyline"
| "polygon"
| "circle"
| "rectangle"
| "move"
| "transform"
| "reshape";
/**
* The graphic that is being created.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#createGraphic)
*/
readonly createGraphic: Graphic;
/**
* Default create options set for the SketchViewModel.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultCreateOptions)
*/
defaultCreateOptions: SketchViewModelDefaultCreateOptions;
/**
* Default update options set for the SketchViewModel.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions)
*/
defaultUpdateOptions: SketchViewModelDefaultUpdateOptions;
/**
* The [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) associated with the SketchViewModel.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#layer)
*/
layer: GraphicsLayer;
/**
* A [SimpleMarkerSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html), [PointSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PointSymbol3D.html), [TextSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html), [CIMSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-CIMSymbol.html), or [WebStyleSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-WebStyleSymbol.html) used for representing the point geometry that is being drawn.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#pointSymbol)
*/
pointSymbol: SimpleMarkerSymbol | PointSymbol3D | TextSymbol | CIMSymbol | WebStyleSymbol;
/**
* A [SimpleFillSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html), [PolygonSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PolygonSymbol3D.html), or [CIMSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-CIMSymbol.html) used for representing the polygon geometry that is being drawn.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#polygonSymbol)
*/
polygonSymbol: SimpleFillSymbol | PolygonSymbol3D | CIMSymbol;
/**
* A [SimpleLineSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html), [LineSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LineSymbol3D.html), or [CIMSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-CIMSymbol.html) used for representing the polyline geometry that is being drawn.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#polylineSymbol)
*/
polylineSymbol: SimpleLineSymbol | LineSymbol3D | CIMSymbol;
/**
* The [SnappingOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html) for sketching.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#snappingOptions)
*/
snappingOptions: SnappingOptions;
/**
* The sketch view model's state.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#state)
*/
readonly state: "ready" | "disabled" | "active";
/**
* An array of graphics that are being updated by the SketchViewModel.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#updateGraphics)
*/
readonly updateGraphics: Collection<Graphic>;
/**
* Indicates if a graphic can be selected to be updated.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#updateOnGraphicClick)
*/
updateOnGraphicClick: boolean;
/**
* The view in which geometries will be sketched by the user.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#view)
*/
view: MapView | SceneView;
/**
* Cancels the active operation and fires the [create](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event-create) or [update](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event-update) event If called in the middle of a create operation, `cancel()` discards the partially created graphic.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#cancel)
*/
cancel(): void;
/**
* Completes the active operation and fires the [create](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event-create) or [update](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event-update) event and changes the event's state to `complete`.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#complete)
*/
complete(): void;
canUndo(): boolean;
canRedo(): boolean;
/**
* Create a graphic with the geometry specified in the `tool` parameter.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#create)
*/
create(
tool: "point" | "multipoint" | "polyline" | "polygon" | "rectangle" | "circle",
createOptions?: SketchViewModelCreateCreateOptions
😞 void;
/**
* Deletes the selected graphics used in the update workflow.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#delete)
*/
delete(): void;
/**
* Destroys the view model instance.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#destroy)
*/
destroy(): void;
/**
* Incrementally redo actions recorded in the stack.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#redo)
*/
redo(): void;
/**
* Incrementally undo actions recorded in the stack.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#undo)
*/
undo(): void;
/**
* Initializes an update operation for the specified graphic(s) and fires [update](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event-update) event.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update)
*/
update(graphics: Graphic | Graphic[], updateOptions?: SketchViewModelUpdateUpdateOptions): Promise<void>;
on(name: "delete", eventHandler: SketchViewModelDeleteEventHandler): IHandle;
on(name: "create", eventHandler: SketchViewModelCreateEventHandler): IHandle;
on(name: "update", eventHandler: SketchViewModelUpdateEventHandler): IHandle;
on(name: "redo", eventHandler: SketchViewModelRedoEventHandler): IHandle;
on(name: "undo", eventHandler: SketchViewModelUndoEventHandler): IHandle;
} Lines 108 and 109 added. Enjoy, Robert
... View more
01-28-2022
10:58 AM
|
9
|
25
|
10476
|
|
POST
|
@BrianLeroux I am not really sure about that part either. I assume that it is dealing with those situations when that app fails to upgrade due to a custom widget issue.
... View more
01-26-2022
09:49 AM
|
0
|
1
|
1641
|
|
POST
|
@BrianLeroux What that text is actually telling you is that WAB will use the version of the JS API that it is designed to use for that release of WAB so if the custom widget is developed to use something that is no longer available in that API version then it could not function or not function properly. For the majority of cases this is never an issue though.
... View more
01-26-2022
09:29 AM
|
0
|
3
|
1652
|
|
POST
|
@IfThenTim Without seeing your code it is a little hard to speculate. The view.popup has a features property that is an array of graphics. You could use this then: view.popup.open({
features: view.popup.features, // array of graphics
fetchFeatures: true //fetch the content of this feature and display it
});
... View more
01-26-2022
05:33 AM
|
1
|
0
|
2109
|
| Title | Kudos | Posted |
|---|---|---|
| 16 | 05-17-2021 01:51 PM | |
| 1 | 07-06-2020 05:32 AM | |
| 1 | 07-10-2018 05:49 AM | |
| 9 | 01-28-2022 10:58 AM | |
| 1 | 03-28-2022 06:20 AM |
| Online Status |
Online
|
| Date Last Visited |
yesterday
|