1 Reply Latest reply: Jul 15, 2014 2:31 PM by Renan Barbalho RSS

    Apply a hover style over a layer cluster using V2 API

    2648058

      We are looking to apply a hover style that would highlight the [radius/extent/polygon] that contains the features that fall under a cluster. We are using V2 API. Any ideas !!!

        • 1. Re: Apply a hover style over a layer cluster using V2 API
          Renan Barbalho

          Hi,

          Did you try this?

           

          See my VectorLayer of Customers

           

          // define and use the Customers theme
                  vectorLayer = new OM.layer.VectorLayer("vectorlayer2",
                  {
                      def:{
                          type:OM.layer.VectorLayer.TYPE_PREDEFINED,
                          dataSource:"mvdemo", theme:"customers",
                          url: baseURL,
                          loadOnDemand: true
                      }
                  });
                  var variableMarker = new OM.style.VariableMarker(
                  {
                    classification:"logarithmic",
                    marker:new OM.style.Marker({ vectorDef: [
                                  {
                                      shape: {type: "circle", cx: 5, cy: 5, width: 10, height: 10},
                                      style: {fill: "#ff00ff", stroke: "#000000"}
                                  }]}),
                    startSize:20,
                    increment:5,
                    numClasses:10
                  });
                  vectorLayer.enableClustering(true,{clusterStyle:variableMarker,minPointCount:5, maxClusteringLevel:8, threshold:40});
                    vectorLayer.setHoverStyle(new OM.style.Color({strokeThickness:8})); //MY HOVER STYLE DEFINITION
          

           

          Regards,

           

          Renan