MapPolylines and Linestrings

2 posts, 0 answers
  1. Kiran Nair
    Kiran Nair avatar
    5 posts
    Member since:
    May 2011

    Posted 07 Sep 2011 Link to this post

    Hey guys,

    I'm currently populating a SqlGeospatialDataReader with a series of Linestrings from my SQL 2008 database. Everything is rendering as expected. Per our design requirements, my users need to interact with the lines using mouseclick and mouseover events.

    I read through this post and found it very helpful...

    However, I have thousands of geography type linestrings (e.g. Linestring (-97.52087 27.84346, -97.51234 27.84047, -97.49072 27.82658)), rather than individual points.

    Is there an effecient way to use my existing linestring data, or do I need to parse the linestring points in C# or via SQL point functions etc?

    Thanks in advance!


  2. Vladimir Milev
    Vladimir Milev avatar
    1061 posts

    Posted 12 Sep 2011 Link to this post

    Hello Steven,
    You can handle the "ReadCompleted" event of the shape reader and iterate through all the items in the InformationLayer. Once you have access to those items you can set up mouse events and perform your interaction there. For more info you can check this example:

    Best wishes,
    Vladimir Milev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top