SqlGeospatialDataReader multigeometry grouping

4 posts, 0 answers
  1. Keith
    Keith avatar
    88 posts
    Member since:
    May 2007

    Posted 27 Mar 2014 Link to this post


    I've been looking at your "Map of World Continents" example whereby you can highlight Europe and all geographies within Europe are highlighted together. I can see that you are loading this information via a shapefile. I am trying to do exactly the same but using the SqlGeospatialDataReader - a single row for each continent containing a geometry field returned as STAsBinary. I have managed to get the shapes to be displayed however when I go to highlight Europe, RadMap only highlights the part of Europe which the cursor is over.

    Is the functionality I require only available for Shapefiles or am I missing something obvious?

    Code snippet showing how the Reader is assigned:
    var sqlReader = new telerikMap.SqlGeospatialDataReader()
                        Source = e.Result,
                        GeospatialPropertyName = "ShapeDataByteArray",
                        ToolTipFormat = "GeographyName",
    informationLayer.Reader = sqlReader;

  2. Keith
    Keith avatar
    88 posts
    Member since:
    May 2007

    Posted 04 Apr 2014 in reply to Keith Link to this post

    Really disappointed that there's been no update yet. I'm surprised as previously, responses have usually been provided very quickly.
  3. Petar Mladenov
    Petar Mladenov avatar
    2991 posts

    Posted 04 Apr 2014 Link to this post

    Hello Keith,

    Please excuse us for the inconvenience caused. We have posted an answer but it seems there was a problem with our internal systems and this answer has not been published. We will investigate this case precisely.

    Here is our answer from Andrey Murzov:

    There are 2 visualization engines in the RadMap package. 
    The old implementation of the map objects' (points and shapes) visualization consists of 3 layers:InformationLayer, DynamicLayer and VirtualizationLayer. This visualization engine, however, lacks certain features and has a few performance issues.
    In the Q2 2013 release we've introduced a new visualization engine in the RadMap. It has been designed from scratch to have better performance. The new visualization engine replaces all 3 layers with the newVisualizationLayer. The major goals of the new engine are:
    1. Improve the performance of the data visualization.
    2. Allow reading map shapes from different sources (KML, ESRI, and SQL Geospatial) in the background thread.
    3. Integrating clustering and items virtualization into the core. This simplifies the usage of both features.
    4. Ability to attach/detach almost any input event available for the FrameworkElement to the map shape visualization.
    5. Support of items selection in the engine core.

    So, first I would recommend using the new engine (and its VisualizationLayer) instead of old one (or theInformationLayer).

    The ESRI shape-file contains a single geometry type only. Also a single record can contain multiple shapes. So, Europe in the shape-file in example contains a few of polygons in a single record which are grouped, because it is a single shape type.
    In fact the Polygon feature of WKT/WKB geometry also can contain multiple polygons. In this case they will be grouped like the polygons from the shape-file. But when your rows contain the GeometryCollection then the polygons will not grouped automatically.
    I think you can use the Items Selection feature to highlight the shapes you need.
    I have attached a sample solution. It uses the Name property of the data row to select all shapes from the one record.

    Petar Mladenov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  4. Keith
    Keith avatar
    88 posts
    Member since:
    May 2007

    Posted 08 Apr 2014 in reply to Petar Mladenov Link to this post

    Hi Peter

    Thanks for the reply and explanation. I have already switched the code over to use the VisualizationLayer to get the performance gains. I implemented my own drawing mechanism which merges the shapes on the fly which seems to work. I'll take a further look at your example project as it may be useful when we come to use the various selection features we require.

Back to Top