2 Replies Latest reply: May 22, 2013 1:05 PM by 916271 RSS

    Edit Feature

    916271
      Hi!

      I want edit feature of a predefined vector layer like the D20 tutorial example, but how can I change the selected feature default styles (marker and line) that appears when I click on the geometry? I am trying use the setSelectedStyle function but it doesn't work!
      I'm using Oracle Maps v2.

      Thanks!

      Edited by: fe.mag on 19/04/2013 06:17
        • 1. Re: Edit Feature
          jsharma
          use setSelectStyle to modify the rendering style for the feature to be edited. The vertices however will still show up the same way.

          Will look into if, and how, that can be set.

          So from the D20 example using (adding) layer.setSelectStyle(selectStyle) call will change the style for the feature selected for editing. The vertices however will be rendered as before.

          function edit()
          {
          var colorStyle = new OM.style.Color({fill:"#a7a7a7",fillOpacity:0.2,strokeThickness:1,stroke:"#392ab3"});

          var selectStyle = new OM.style.Color({fill:"#ff0000",fillOpacity:0.3,strokeThickness:1,stroke:"#00ff00"});
          layer.setRenderingStyle(colorStyle);
          layer.setSelectStyle(selectStyle);
          layer.enableFeatureEditing(true);
          • 2. Re: Edit Feature
            916271
            Ok!
            Thanks Jayant!