Closed GoogleCodeExporter closed 9 years ago
I cannot reproduce the first case (see att.), this is what was recently fixed,
maybe not in 1.0.1 but I cannot reproduce on
http://lib.heron-mc.org/heron/latest/examples/vectorstyler/ in Chrome Mac OSX.
Is it in all browsers?
The second case is as intended: when changing a style, all selected objects are
restyled and that style becomes the new style, as is also clear in the Legend
but now I see it is not entirely as in the original wording:
User actions
There will be two possible workflows to let the user do this.
- User draws features and needs to select them to change the style of them.
- User sets style, then any features drawn thereafter become that colour (like a paint program).
Of course they can later change the style using the other method.
Original comment by jus...@gmail.com
on 11 Mar 2014 at 3:29
Attachments:
Using Heron latest from earlier today, this happens on all web-browsers tried.
Looking at the online example, I see that it has a different style editor
dialog - I only have one rule (default) where you have three. See attached.
My configuration for the drawing tools is the attached js file; maybe it's a
config issue?
Original comment by jonathan...@warwickshire.gov.uk
on 11 Mar 2014 at 5:46
Attachments:
Hi Just,
Any thoughts on this? We can't use the tools until this issue is resolved.
Cheers,
Jonathan
Original comment by jonathan...@warwickshire.gov.uk
on 18 Mar 2014 at 1:29
Well, first, do both issues, especially the first, you mention occur in the
example?
http://lib.heron-mc.org/heron/latest/examples/vectorstyler
If not then there is something different in your app setup. Possibly your
configuration but more likely that there is a difference in one of the JS
resources, possibly GXP as the behaviour was there before I solved it.
..<looking into configs>....Aha, I think I know what is the case now, your
drawinglayer possibly does not have customStyling: true. This happens when you
have OLE create that Layer.
So in my case:
/* Vector layers for Drawing and Upload */
Ext.namespace("Heron.options.worklayers");
Heron.options.worklayers = {
editor: new OpenLayers.Layer.Vector('DrawingLayer', {
displayInLayerSwitcher: true, visibility: false, customStyling: true}),
scratch: new OpenLayers.Layer.Vector('UploadLayer', {
displayInLayerSwitcher: true, visibility: false})
};
and then in editor config:
{type: "oleditor", options: {
pressed: true,
// Options for OLEditor
olEditorOptions: {
editLayer: Heron.options.worklayers.editor,
activeControls: ['StyleFeature', 'UploadFeature', 'DownloadFeature', 'Separator', 'Navigation', 'SnappingSettings', 'CADTools', 'Separator', 'DeleteAllFeatures', 'DeleteFeature', 'DragFeature', 'SelectFeature', 'Separator', 'DrawHole', 'ModifyFeature', 'Separator'],
// activeControls: ['UploadFeature', 'DownloadFeature', 'Separator', 'Navigation', 'DeleteAllFeatures', 'DeleteFeature', 'DragFeature', 'SelectFeature', 'Separator', 'ModifyFeature', 'Separator'],
featureTypes: ['text', 'polygon', 'path', 'point'],
language: 'en',
options: {
StyleFeature: {
pageX: 200,
pageY: 100
}},
.
.
Since the Editor is so specific in its styling demands I saw no other way than
to mark it as special via 'customStyling'. This conditionally executes code
w.r.t. vector object types and selection. I am now sure that that is the matter.
Original comment by jus...@gmail.com
on 18 Mar 2014 at 1:56
Thanks for the information. I didn't actually have either of the worklayers
defined as separate OpenLayers anywhere in my app but it was working fine.
However creating them and adding the customStyling:true line fixed the issue.
Original comment by jonathan...@warwickshire.gov.uk
on 19 Mar 2014 at 11:39
Original issue reported on code.google.com by
jonathan...@warwickshire.gov.uk
on 11 Mar 2014 at 2:17