This is a migrated thread and some comments may be shown as answers.

Accessing Shapes

2 Answers 98 Views
Map
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 08 Jul 2014, 03:22 AM
Hi,

Is there a way to access multiple shapes on the mouse over event? Using the demo below, I'd like to highlight Alaska and the continental US when hovering over one of them.

http://demos.telerik.com/kendo-ui/map/geojson

Thanks,
Mike

2 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 10 Jul 2014, 07:03 AM
Hi,

The existing shapes are accessible through the shape layer drawing surface (e.g. map.layers[0].surface).
I'll provide an alternative for the moment, as this part of the API is still unofficial and subject to change. It will be made public for the next release.

My suggestion is to store a reference to the desired shapes in the shapeCreated event. Those are live objects that will respond to changes in fill, stroke, etc.
Does this make sense?

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Mike
Top achievements
Rank 1
answered on 10 Jul 2014, 01:29 PM
Yes, that worked. I was able to create an array of shapes in the shapeCreated event and reference that array in the shapeMouseEnter and shapeMouseLeave events to create the effect we needed.

Thanks,
Mike
Tags
Map
Asked by
Mike
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Mike
Top achievements
Rank 1
Share this question
or