Map Customization

4 posts, 0 answers
  1. Moin
    Moin avatar
    2 posts
    Member since:
    Mar 2011

    Posted 17 Mar 2011 Link to this post

    Hi,

    I want to customize world map and need to display combination of 2 continents as a one region which will be highlighted with different colors. These combinations will include 6 continents except Antarctica.  

    Please suggest the approach which can be use to accomplish this task.

    Thanks in Advance.

    Moin

  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 21 Mar 2011 Link to this post

    Hello Moin,

    You can use ESRI shapefiles to show continents. You can find example here:

    http://demos.telerik.com/silverlight/#Map/Shapefile/WorldContinents

    Greetings,
    Andrey Murzov
    the Telerik team
  3. DevCraft banner
  4. Moin
    Moin avatar
    2 posts
    Member since:
    Mar 2011

    Posted 22 Mar 2011 Link to this post

    Hi Andrey,

    First of all thanks for the reply.

    I have seen the sample link, but what I want is to dispaly 2 conitients with similar color. For example Asia and Australia in Red, South America and North America in Gray etc when map loads and I also want to show some information on top of every area(combination of continents) which will be clickable.

    Please let me know the approch for this.


    Regards
    Moin
  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 24 Mar 2011 Link to this post

    Hello Moin,

    The map shape objects which represent items from the shape file have properties which can be used to change their appearance. The set of the appearance properties is the same as standard Silverlight Shape object has. You can use MapShapeReader.PreviewReadCompleted event to loop through the map shapes and set appearance depends on the continent name. For example:

    <telerik:RadMap x:Name="radMap">
        <telerik:RadMap.Provider>
            <telerik:EmptyProvider />
        </telerik:RadMap.Provider>
        <telerik:InformationLayer x:Name="uxFloorPlanLayer">
            <telerik:InformationLayer.Reader>
                <telerik:MapShapeReader Source="/LoadShapeFile;component/Data/world_continents.shp"
                        PreviewReadCompleted="ShapeFilePreviewReadCompleted"/>
            </telerik:InformationLayer.Reader>
        </telerik:InformationLayer>
    </telerik:RadMap>



    You can put any FrameworkElement over the map and catch events on it. You can find samples here:

    http://demos.telerik.com/silverlight/#Map/DataBinding
    http://demos.telerik.com/silverlight/#Map/HotSpot

    Greetings,
    Andrey Murzov
    the Telerik team
Back to Top