This is a migrated thread and some comments may be shown as answers.

Map Customization

3 Answers 65 Views
Map
This is a migrated thread and some comments may be shown as answers.
Moin
Top achievements
Rank 1
Moin asked on 17 Mar 2011, 02:04 PM

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

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 21 Mar 2011, 07:06 PM
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
0
Moin
Top achievements
Rank 1
answered on 22 Mar 2011, 08:55 AM
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
0
Andrey
Telerik team
answered on 24 Mar 2011, 11:18 AM
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
Tags
Map
Asked by
Moin
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Moin
Top achievements
Rank 1
Share this question
or