Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Map > Colorizer for DynamicLayer added in code behind

Not answered Colorizer for DynamicLayer added in code behind

Feed from this thread
  • Sumith Jayasuriya avatar

    Posted on Feb 22, 2011 (permalink)

    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

    Reply

  • Sumith Jayasuriya avatar

    Posted on Feb 22, 2011 (permalink)

    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   

    Reply

  • Andrey Andrey admin's avatar

    Posted on Feb 25, 2011 (permalink)

    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!

    Reply

  • Dipti avatar

    Posted on Dec 29, 2011 (permalink)

    Hi Sumith,

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

    Thanks.
    ~Dipti

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Map > Colorizer for DynamicLayer added in code behind