Colorizer for DynamicLayer added in code behind

4 posts, 0 answers
  1. Sumith Jayasuriya
    Sumith Jayasuriya avatar
    25 posts
    Member since:
    Jan 2010

    Posted 22 Feb 2011 Link to this post

    I have an application using RadMap that shows zip code or carrier route boundaries (MapPoygons) in a DynamicLayer.  I have ExtendedData properties for each MapShape.  I want to use the Colorizer.  Can you show me how to intialize the colorizer when the DynamicLayer is added in code behind?

    Right now when I find the DynamicLayer using RadMap.FindName the colorizer evaluates to Nothing.  So I am unable to set the Colorizer.ExtendedPropertyName or call Colorizer.Prepare().

    Thanks
    Sumith
  2. Sumith Jayasuriya
    Sumith Jayasuriya avatar
    25 posts
    Member since:
    Jan 2010

    Posted 22 Feb 2011 Link to this post

    I created a New ColorMeasureScale with the required properties and set DynamicLayer.Colorizer = ColorMeasureScale and everything is working alright when I set the Min and Max values manually.

    Since the MapShapes are created in the DyanmicSource what is the appropriate time (event) to call the Colorizer.Prepare method to set the Min and Max values?

    Thanks
    Sumith   

  3. DevCraft banner
  4. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 25 Feb 2011 Link to this post

    Hello Sumith Jayasuriya,

    The DynamicLayer gets items by request so you never know whether all items have been read or not. So you can't use automatic methods to calculate Min and Max values with DynamicLayer, because it will provide different results depends on the number of items that have been read already. The only way is set MinValue and MaxValue properties manualy. For example, if you get data to show from the SQL server then you can execute 2 requests to calculate Min and Max values before the actual data reading.

    Best wishes,
    Andrey Murzov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  5. Dipti
    Dipti avatar
    37 posts
    Member since:
    Dec 2011

    Posted 29 Dec 2011 Link to this post

    Hi Sumith,

    I need to do something very similar, if possible can you please share you code.

    Thanks.
    ~Dipti
Back to Top