We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

LabelSource not binding at runtime

Thread ID:

Created:

Updated:

Platform:

Replies:

103483 May 5,2012 06:10 PM May 16,2012 09:10 AM WPF 1
loading
Tags: Maps
John
Asked On May 5, 2012 06:10 PM

I am using the following XAML in my application based on your Databinding demo code.

<syncfusion:MapControl ShowLatLonPoints="False" ShapeFill="#F5F1EE" ShapeStroke="#B5B3B1" Name="Map" LayeredContent="{Binding ElementName=shapeLayer}"  >
                        <syncfusion:MapControl.Layers>
                            <syncfusion:Layers>
                                <syncfusion:ShapeFileLayer  LabelSource="{Binding CountryCount}" Uri="Application.Assets.world.shp" x:Name="shapeLayer"/>
                            </syncfusion:Layers>
                        </syncfusion:MapControl.Layers>
                    </syncfusion:MapControl>

When the map loads none of the labels are showing up.  The only difference I can see is that in your sample you use the source as a StaticResource instead of databinding to a ViewModel.  Can you provide some guidance? 

The LabelSource object I am binding too is an exact copy of your ObservableCollection<MapsLabel>. 

Rajkumar [Syncfusion]
Replied On May 16, 2012 09:10 AM

Hi John,

Sorry for the delayed response.

We have analyzed the reported issue and this issue occurs when the “ShapeFileLayer” is placed inside the Layers collection. However this can be achieved by placing ShapeFileLayer inside “LayeredContent” as in below code snippet, the labels will display in Map.

Code Snippet:
[Xaml]

<syncfusion:MapControl  LatitudeLongitudeType="Decimal" ShapeFill="#FFB67373" ShapeStroke="#B5B3B1" Name="Map"  ShapeStrokeThickness="1.5" EnableHoverEffects="True" ShapeHoverFill="#3FB67373" ShowNavigationControl="False" ShowLatLonPoints="False"  >
<syncfusion:MapControl.LayeredContent>
<syncfusion:ShapeFileLayer Margin="100"    LabelSource="{Binding Labels}" Uri="DataBindingDemo.ShapeFiles.states.shp" x:Name="shapeLayer"/>
</syncfusion:MapControl.LayeredContent>
</syncfusion:MapControl>

We are analyzing the problem while using inside "ShapeFileLayer" in source level and we will update you the status.

Please let us know if you have any concerns.

Regards,
Rajkumar B R


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;