Change OpenLayers3 vector to edit via button - openlayers-3

I have two vector polygons layers (ol3.2) and want users to switch between drawing and interacting with them via a button. I’d like the select and modify methods to work only for the active polygon layer. The documentation implies that the 'layers' option can be used to limit which layers can be selected, but I am not quite clear of the syntax. With task.myvector1 as the name of an ol.layer.Vector, I currently have:
select = new ol.interaction.Select({
layers: [ task.myvector1 ]
});
modify = new ol.interaction.Modify({
features: select.getFeatures()
});
But that does not successfully allow a selection, whereas when the option is removed select-and-modify works well, albeit for all layers.
Assuming this is just a syntax glitch, is there then a way to update the layers option in 'select', after a button click event, to switch the selectable layer to, for example, task.myvector2?

Related

Is it possible to place a port on a layer so that it is invisible when the layer.visible is set to false?

Is it possible to place a port on a layer so that it is invisible when the layer is not visible?
I could not find an answer in GOJS documentation. I tested with this link template and it did not work.
myDiagram.linkTemplate =
$(CustomLink, // defined below
{ layerName: "blue",...
You can only put Parts in Layers -- either Nodes or Links or Adornments. In other words, you cannot split up a Node so that a piece of it appears in one layer and another piece of the same Node appears in a different layer.
The normal thing to do is to show or hide pieces such as ports, either by changing their visible property or their opacity property. The former causes the node's panels to be remeasured and rearranged; the latter does not. Several samples demonstrate this, including the Flow Chart sample.

treemap highcharts group by

I have designed a treemap using highcharts with custom algorithm.It has a drilldown to 1 level. There is a drop down for my chart and it has two options for selection. treemap is displayed on the basis of dropdown selection which has a group by feature implemented using underscore.js library. The feature is working fine. But the problem is, all the tiles which are grouped together, are placed next to each other. My requirement is : i want all those tiles to be packed in one big tile with one label. something like header title in D3(exactly the same). Please let me know how to go about it. Is it something like treemap within a treemap? Also i wanted to know if its feasible to have different labels and tooltips for parent and children in the same treemap. any leads would be helpful.
actual image

Modify interaction - How to get the segment which has been hovered

I am using openlayers-3 modify interaction to edit vector layers. When a polygon/polyline is being edited, if mouse is close to a line segment, a small circle is drawn and dragging it creates a new vertex or moves an existing vertex, depending on where on the segment I was hovering.
Now, sometimes this is very difficult to understand if I am hovering on an existing vertex, or on middle of a segment. I have thought about two solutions to the problem:
Highlight the segment I am hovering with a different style so that I
can see its edges.
When hovering on an vertex, style the small
circle with a different style.
Is there a way to achieve any of the two?
It can be done changing the interaction condition like:
var selectPointerMove_Highlight = new ol.interaction.Select({
condition: ol.events.condition.pointerMove
});
map.addInteraction(selectPointerMove_Highlight);
I have an online example.

Getting Polygons to display multiple variables using a stripped color scheme in ArcMap

I am creating a map in which i want a polygon to display two separate variables within it. Therefore I want a stripped polygon relating to both the keys from the separate factors however I have no idea on how to do this. I messed around with multiple attributes on the properties section and could get the two variables up however could see no way of making the polygon display them both.
Thank you, any help would be appreciated
This is partially manual, but you are going to have to make a separate category within one of the fields that identifies the multivariate features. You could also create a new layer that is a selection of these features. Once you have that, go to the layer properties and display the features as 'Categories - Unique values, many fields' and hit the 'Add All Values' button. Once the categories are populated select the one you are interested in and pick a hatched symbol such as 'Radiation Overlay'. Then go to the Symbol Property Editor (double-click the symbol) and modify the two layers that make up the hatched symbol. You need to adjust the color, line thickness, offset, etc. until you get it to look the way you want. Probably not as auto as you wanted, but it will satisfy display purposes.

How can I easily print multiple layers on multiple pages in Visio

We've created a flow chart using Visio that has multiple layers. (The background is that each layer represents variations on a basic process.)
Now we want to be able to print each layer individually. Currently this involves lots of clicking to select the correct layer and and then press print - then repeating this for each of the 10 layers.
Is there a simpler way? E.g. define each layer once and use a "print each layer" tool / macro?
This is fairly easy through VBA. I tested it using the page export to jpeg, but the print should work as well. It just loops through all the layers in the active page, hiding every layer first, then unhiding the current looped layer, and prints.
Sub PrintLayers()
Dim CurrShowLayer As Visio.Layer, CurrLayer As Visio.Layer
For Each CurrShowLayer In ActivePage.Layers
For Each CurrLayer In ActivePage.Layers
CurrLayer.CellsC(visLayerVisible).Formula = "0"
Next CurrLayer
CurrShowLayer.CellsC(visLayerVisible).Formula = "1"
ActivePage.Print
Next CurrShowLayer
For Each CurrLayer In ActivePage.Layers
CurrLayer.CellsC(visLayerVisible).Formula = "1"
Next CurrLayer
End Sub

Resources