Skip to content

Commit

Permalink
Un-break viewer API drawing example
Browse files Browse the repository at this point in the history
Fixes #1412
  • Loading branch information
jumpinjackie committed Apr 21, 2023
1 parent 44386d7 commit 1870f1f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions viewer/examples/taskpane/drawing.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,9 @@
// Set the vector layer style with a custom marker icon
var ptStyle = viewer.getDefaultPointIconStyle();
ptStyle.src = "examples/taskpane/marker2.png";
var defaultVectorStyle = {
point: ptStyle,
line: viewer.getDefaultLineStyle(),
polygon: viewer.getDefaultPolygonStyle()
};
var layerInfo = layerMgr.addLayer(LAYER_NAME, layer);
// Dispatch mapLayerAdded to notify components like the external layer manager
viewer.dispatch(parent.parent.MapGuide.Actions.Map.mapLayerAdded(viewer.getMapName(), layerInfo, defaultVectorStyle));
viewer.dispatch(parent.parent.MapGuide.Actions.Map.mapLayerAdded(viewer.getMapName(), layerInfo));
alert("Layer (" + LAYER_NAME + ") added");
layerAdded = true;
document.getElementById("btnAddLayer").disabled = true;
Expand Down

0 comments on commit 1870f1f

Please sign in to comment.