Accessing Shapes

3 posts, 0 answers
  1. Mike
    Mike avatar
    4 posts
    Member since:
    Mar 2014

    Posted 07 Jul 2014 Link to this post

    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. T. Tsonev
    Admin
    T. Tsonev avatar
    2771 posts

    Posted 10 Jul 2014 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Mike
    Mike avatar
    4 posts
    Member since:
    Mar 2014

    Posted 10 Jul 2014 Link to this post

    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
Back to Top