Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Map Bubble unable to change size

$
0
0
I also tried adding a label to the bubble the same way I would to a regular shape, but for some reason it always puts it behind the bubble.  I have to change the opacity to less than 0.5 to be able to see the label.
shapeCreated: function (e) {
                //alert('shape created '+e.shape.Value);
                var shape = e.shape;
                shape.fill("#88f");
                shape.opacity(0.5);
                 
                // Calculate shape bounding box
                var bbox = e.shape.bbox();
                var center = bbox.center();
 
                // Create the label
                var labelText = "Label";//e.shape.dataItem.properties.abbrev;
                var label = new kendo.drawing.Text(labelText);
                var labelCenter = label.bbox().center();
 
                // Position the label
                label.position([
                  center.x - labelCenter.x,
                  center.y - labelCenter.y
                ]);
 
                // Render the label on the layer surface
                e.layer.surface.draw(label);
            }

 

On another note about Bubbles: In shapeCreated how can I get the attributes of the object being passed to the map's bubble layer's datasource?  

 


Viewing all articles
Browse latest Browse all 94857

Latest Images

Trending Articles



Latest Images