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

InformationLayer ItemTemplate

1 Answer 96 Views
Map
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jonas Hero
Top achievements
Rank 1
Jonas Hero asked on 23 Jun 2010, 12:35 PM
Hi,

I have a map with an information layer above and I add some items to its collection. The default item template (red pin point) has a nice appearance and works fine.

Now I'm going to add another information layer to the map, and I want to change the pin points color on that layer.

Is there an easy way to do this without defining a complete new item template? Or can i get the default item template xaml code from anywhere?

Note: I'm using VS2010, only. No Expression Blend.

Thanks a lot for your help!

1 Answer, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 23 Jun 2010, 06:14 PM
Hello Jonas Hero,

You should specify a complete new item template to change the pin points color. The template you can use as a base is the following:
<maps:InformationLayer Name="informationLayer">
    <maps:InformationLayer.ItemTemplate>
        <DataTemplate>
            <Border>
                <maps:MapLayer.HotSpot>
                    <maps:HotSpot X="0.5" Y="40" XUnits="Fraction" YUnits="InsetPixels" />
                </maps:MapLayer.HotSpot>
                <Path Stretch="Fill" 
                  StrokeThickness="6" 
                  Data="M12,26.083 L16,26.083 13.916667,32.083 z M14,3 C20.075132,3 25,7.9248676 25,14 25,20.075132 20.075132,25 14,25 7.9248677,25 3,20.075132 3,14 3,7.9248676 7.9248677,3 14,3 z"
                  Fill="Brown">
                    <Path.Stroke>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" MappingMode="RelativeToBoundingBox">
                            <GradientStop Color="White"/>
                            <GradientStop Color="Black" Offset="0.853"/>
                        </LinearGradientBrush>
                    </Path.Stroke>
                    <Path.Effect>
                        <DropShadowEffect BlurRadius="7" ShadowDepth="1" />
                    </Path.Effect>
                </Path>
            </Border>
        </DataTemplate>
    </maps:InformationLayer.ItemTemplate>
</maps:InformationLayer>

Kind regards,
Andrey Murzov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Map
Asked by
Jonas Hero
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or