Hello everyone, Long time no see :)
I want to add a "save" button to my editingToolbar (which was customized) in order to manually save changes. I am using the following code:
//overload the EditingToolbar initialize function:OpenLayers.Control.EditingToolbar.prototype.initialize = function(layer, options){ OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
this.addControls(
[ new OpenLayers.Control.Navigation() ]
);
var controls = [
new OpenLayers.Control.DrawFeature(layer,
OpenLayers.Handler.Point, {'displayClass': 'olControlDrawFeaturePoint'}),
new OpenLayers.Control.Button({ title: "Save changes",
trigger: function() {
saveStrategy.save();
},
displayClass:
"olControlSaveFeatures"
})
];
this.addControls(controls);
};
editingToolbar = new OpenLayers.Control.EditingToolbar(
editableLayer ) ;
map.addControl( editingToolbar );
Everything works as expected, but there is only one problem. In the
toolbar I get instead of the "save_features_off.png" icon the "move"
icon. Playing with firebug I can see that the active CSS for the
toolbar (.olControlEditingToolbar) overrides
".olControlSaveFeaturesItemInactive" and overrides the image. If I
disable the background-image statement from .olControlEditingToolbar I
can see the save icon. Most likely the move icon is on top of the save
icon...
Any ideas on how to fix this - even as a hack? Thanks. I attached some small screenshots to illustrate this. Regards, Adrian
<<attachment: 2010-07-05_15-24-56_160x47.png>>
<<attachment: 2010-07-05_15-25-16_495x214.png>>
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
