smoothrivers

Unable to get point data

Discussion created by smoothrivers on May 21, 2012
Latest reply on Jan 30, 2013 by sandeeppolaris
Newbie trying to convert old MapPoint appication to ComponentOne Esri Map control in VS 2010 WPF application, using Visual Basic, so forgive me it this is crazy stupid.

I have a main window with a tab control.  I have a Data source connected to 2 views in the data source. Vw_svc_Mapper2 and vwCurrentVehLocations4
The data sources are wired up and connect, as I can see the data in two data grids on the form.

Both views have lat/long data in them.

I have 2 CollectionViewSources
 <Window.Resources>
        <my:UtilitiesDataSet x:Key="UtilitiesDataSet" />
        <CollectionViewSource x:Key="Vw_svc_mapper2ViewSource" Source="{Binding Path=vw_svc_mapper2, Source={StaticResource UtilitiesDataSet}}" />
        <CollectionViewSource x:Key="VwCurrentVehLoc4ViewSource" Source="{Binding Path=vwCurrentVehLoc4, Source={StaticResource UtilitiesDataSet}}" />


I can sucessfully set the bindings in the Properites window to the correct datasources, but no markers show up on map.

<esri:Map Name="_esriMap" Margin="4,4,174,20" Extent="-100, 18, -90, 70"  WrapAround="True" Width="879">

                        <!-- background tiles -->
                        <esri:ArcGISTiledMapServiceLayer
                    Url="http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" />

                        <!-- USA retail spending potential (free ESRI data at http://www.esri.com/data/free-data/index.html) -->
                    <esri:ArcGISTiledMapServiceLayer
                    ID="_retailSpendingPotential"
                    Opacity="0.5"
                    Visible="False"
                    Url="http://services.arcgisonline.com:80/ArcGIS/rest/services/Demographics/USA_Retail_Spending_Potential/MapServer" />

                        <!-- layer to show connections -->
                        <esri:GraphicsLayer x:Name="_lyrConnections" ID="_lyrConnections" />

                        <!-- layer to show landmarks -->
                        <esri:GraphicsLayer x:Name="_lyrLandmarks" ID="_lyrLandmarks" >

                            <!-- data source -->
                            <esri:GraphicsLayer.GraphicsSource>
                                <esri:PointDataSource
                                    ItemsSource="{Binding Path=vwCurrentVehLoc4, Source={StaticResource UtilitiesDataSet}}" 
                                    XCoordinateBinding="{Binding Path=Longitude, Source={StaticResource VwCurrentVehLoc4ViewSource}}" 
                                    YCoordinateBinding="{Binding Path=Longitude, Source={StaticResource VwCurrentVehLoc4ViewSource}}">
                                </esri:PointDataSource>
                                
                            </esri:GraphicsLayer.GraphicsSource>
                            
                            


                            <!-- renderer -->
                            <esri:GraphicsLayer.Renderer>
                                <esri:SimpleRenderer Symbol="{StaticResource _esriMarker}" />
                            </esri:GraphicsLayer.Renderer>


                            <!-- clusterer-->
                <esri:GraphicsLayer.Clusterer>
                    <esri:FlareClusterer />
                </esri:GraphicsLayer.Clusterer>
                            <!-- tooltip -->
                            <esri:GraphicsLayer.MapTip>
                                <Border BorderBrush="DarkGray" CornerRadius="13" BorderThickness="1" Margin="0,0,15,15" Background="#FF003200">
                                    <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="10">
                                        <TextBlock Text="{Binding [DataContext][1]}" Foreground="White" />
                                        <TextBlock Text="{Binding [DataContext][2]}" Foreground="White" />
                                        <TextBlock Text="{Binding [DataContext][3]}" Foreground="White" />
                                    </StackPanel>


                                </Border>
                            </esri:GraphicsLayer.MapTip>
                        </esri:GraphicsLayer>


                        <!-- layer to show connections -->
                        <esri:GraphicsLayer x:Name="_lyrConnections2" ID="_lyrConnections2" />

                        <!-- layer to show landmarks -->
                        <esri:GraphicsLayer x:Name="_lyrLandmarks2" ID="_lyrLandmarks2" >

                            <!-- data source -->
                            <esri:GraphicsLayer.GraphicsSource>
                                <esri:PointDataSource 
                                                      ItemsSource="{Binding Source={StaticResource VwCurrentVehLoc4ViewSource}}" 
                                                      XCoordinateBinding="{Binding Source={StaticResource Vw_svc_mapper2ViewSource}, Path=longitude}" 
                                                      YCoordinateBinding="{Binding Source={StaticResource Vw_svc_mapper2ViewSource}, Path=latitude}">
                                </esri:PointDataSource>

                            </esri:GraphicsLayer.GraphicsSource>




                            <!-- renderer -->
                            <esri:GraphicsLayer.Renderer>
                                <esri:SimpleRenderer Symbol="{StaticResource _esriMarker2}" />
                            </esri:GraphicsLayer.Renderer>


                            <!-- clusterer
                            <esri:GraphicsLayer.Clusterer>
                                <esri:FlareClusterer />
                            </esri:GraphicsLayer.Clusterer>
                                                        -->
                            
                            <!-- tooltip -->
                            <esri:GraphicsLayer.MapTip>
                                <Border BorderBrush="DarkGray" CornerRadius="13" BorderThickness="1" Margin="0,0,15,15" Background="#FF003200">
                                    <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="10">
                                        <TextBlock Text="{Binding [DataContext][1]}" Foreground="White" />
                                        <TextBlock Text="{Binding [DataContext][2]}" Foreground="White" />
                                        <TextBlock Text="{Binding [DataContext][3]}" Foreground="White" />
                                    </StackPanel>


                                </Border>
                            </esri:GraphicsLayer.MapTip>
                        </esri:GraphicsLayer>
 </esri:Map>


What am I missing?  Thanks, any help is appreciated.

Outcomes