Generating Heatmap with dynamically generated data

2 posts, 0 answers
  1. Brendon
    Brendon avatar
    1 posts
    Member since:
    Aug 2011

    Posted 18 Aug 2011 Link to this post

    Hey all, I am attempting to generate a heatmap from data I am pulling from a database. Basically, I am pulling a list of how many visitors we have had at our properties by customer zipcode. In the class I wrote to handle the data retrieval, I also have a method for Geocoding the zipcodes into Latitude and Longitude. The problem I am having is partly due to a poor understanding of WPF, and partly due to never having used a Telerik control before now. My current XAML is as follows:
    <Window x:Class="HeatMap.MainWindow"
                    Title="MainWindow" Height="552" Width="497" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen">
            <telerik:RadMap Height="auto" HorizontalAlignment="Stretch" Name="radMap1" VerticalAlignment="Stretch" Width="auto"  >
                    <telerik:BingMapProvider ApplicationId="API_KEY" Mode="Aerial" />
                <telerik:BingGeocodeProvider ApplicationId="API_KEY" GeocodeCompleted="BingGeocodeProvider_GeocodeCompleted" x:Name="Bing">
                        <telerik:RadMap Visibility="Hidden" CommandBarVisibility="Hidden">
                                <telerik:SpatialReference AngularUnitOfMeasurement="0" Authority="{x:Null}" CentralMeridian="0" Datum="{x:Null}" DatumAuthority="{x:Null}" FalseEasting="0" FalseNorthing="0" GeoGcs="{x:Null}" LatitudeOfOrigin="0" MaxLatitude="0" MaxLongitude="0" MinLatitude="0" MinLongitude="0" OffsetX="0" OffsetY="0" Primem="0" PrimemAuthority="{x:Null}" ProjectionAuthority="{x:Null}" ScaleX="0" ScaleY="0" SpheroidAuthority="{x:Null}" SpheroidFlattening="0" SpheroidRadius="0" StandardParallel="0" UnitAuthority="{x:Null}" />
                <telerik:InformationLayer Name="dataLayer" >

    I have seen the code samples from the telerik demos, but most likely due to my lack of experience with WPF they haven't helped me much. What I would like to be able to do would be for every zip code create a point on the map in a color representing the number of visitors, and upon mouse hover (or even mouse click) I would like to show a tooltip showing the number of visitors and the zipcode.

    Would anyone know of a good tutorial to help fill in the gaps in my knowledge so I can more easily accomplish my goal, or have any input to send me in the right direction? Thanks for the help all!
  2. Andrey
    Andrey avatar
    1681 posts

    Posted 23 Aug 2011 Link to this post

    Hello Brendon,

    You can't use BingGeocodeProvider from XAML. You should use it from code-behind.
    I would recommend you to take a look into the following articles in our online documentation:

    as well as the following samples in our demo application:

    Kind regards,
    Andrey Murzov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top