如果缩小,WP7 上的 Bing 地图 MapPolyline 中的渲染错误?

发布于 2024-10-14 05:28:52 字数 21291 浏览 3 评论 0原文

我在使用 MapPolyline 时遇到了一些问题。如果缩小,它会以某种方式错误地呈现 GPS 轨迹。

在较低的mapControl.ZoomLevel(例如9)下,仍然会绘制一些线条/边缘,但它们不应该绘制。以下是一些屏幕截图,展示了奇怪的行为。

http://img403.imageshack.us/g/capture4jz.png/

图像描述:

  1. 第一张图像被缩小(ZoomLevel = 9)(注意蓝色的MapPolyline)
  2. 第二张图像被放大了一点(MapPolyline仍然相同->不正确)
  3. 第三张图像是再次进一步放大(但是 MapPolyline 看起来仍然非常相似)
  4. 最后一张图片:这就是实际的 GPS 轨迹的样子。

因此,如果地图缩小,MapPolyline 将错误地绘制 GPS 轨迹。似乎它在某个时刻停止缩放并在较低的 ZoomLevels 下保持不变(9 - 15 == 缩小)

也许我做错了什么?有人可以告诉我如何解决这个问题吗?一些解决方法?

这是一个简单的测试应用程序,用于演示这种奇怪的行为(此行为在设备和模拟器上是相同的):

MainPage.xaml

    <!--ContentPanel - place additional content here-->
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" >
        <my:Map x:Name="mapControl" Margin="8" CredentialsProvider="{Binding CredentialsProvider}">
            <my:MapLayer>
                <my:MapPolyline x:Name="mapPolyline" 
                                Stroke="#FF2C76B7"
           Opacity="0.85"
        StrokeThickness="6" />
            </my:MapLayer>
        </my:Map>
        <Button Content="+" HorizontalAlignment="Left"  Height="86" VerticalAlignment="Bottom" Margin="108,0,0,51" Width="95" Name="zoomInButton"  Click="zoomInButton_Click" />
        <Button Content="-" HorizontalAlignment="Right" Height="86" VerticalAlignment="Bottom" Margin="0,0,101,51" Width="98" Name="zoomOutButton" Click="zoomOutButton_Click" />
    </Grid>

MainPage.xaml.cs

    // Constructor
    public MainPage()
    {
        InitializeComponent();

        this.DataContext = this;

        // load an actual trace
        var loadedTrace = LoadCarDrive();

        var locations = new LocationCollection();
        foreach (var item in loadedTrace)
        {
            locations.Add(item.Location);
        }

        mapPolyline.Locations = locations;

        // zoom to center
        mapControl.SetView(LocationRect.CreateLocationRect(locations));
        mapControl.ZoomLevel = 9;
    }

    private void zoomInButton_Click(object sender, RoutedEventArgs e)
    {
        mapControl.ZoomLevel += 1;
        Debug.WriteLine(mapControl.ZoomLevel);
    }

    private void zoomOutButton_Click(object sender, RoutedEventArgs e)
    {
        mapControl.ZoomLevel -= 1;
        Debug.WriteLine(mapControl.ZoomLevel);
    }

    #region Car Drive Trace
    public List<GeoPosition<GeoCoordinate>> LoadCarDrive()
    {
        return new List<GeoPosition<GeoCoordinate>>() {
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405647110000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24879119, 14.30983157, 264.5, 7, 8, 0, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405667080000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24881212, 14.30975438, 266.25, 9, 8, 3.08515646975006, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405686990000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2488539, 14.30977517, 264.450002034505, 9, 8, 2.7708502915673, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405707010000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24888582, 14.30973458, 264.833329942491, 7, 6, 2.622272942855, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405727010000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24890673, 14.30970928, 264.027773256655, 7, 6, 2.09121417243467, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405747020000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2489299, 14.30967342, 263.053696997372, 7, 6, 1.89013767966395, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405767030000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24893927, 14.30963082, 262.293819348999, 7, 6, 1.66950420129036, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405787040000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2489513, 14.30961666, 260.815840816629, 7, 6, 1.45526477188896, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405807090000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897547, 14.30958534, 260.136549319532, 7, 6, 1.42904734840548, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405827120000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2490056, 14.30956493, 259.084125976376, 7, 4, 1.48926924922331, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405847120000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24901793, 14.30954465, 258.240225098636, 7, 4, 1.8838781127322, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405927280000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24901616, 14.30950247, 257.208112955994, 7, 6, 1.42209719840891, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405947300000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24902166, 14.30943419, 256.616110650371, 9, 6, 1.37894394353935, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405967320000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24902592, 14.30939502, 256.30807656996, 12, 6, 1.19195039763596, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405987320000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24906708, 14.30934571, 256.508064441282, 7, 6, 2.04223380763222, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406007340000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24907986, 14.30932245, 256.405378302576, 7, 6, 2.21050803017023, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406027360000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24908171, 14.30927428, 256.371151650296, 9, 6, 2.11644554209566, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406067370000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24906849, 14.30929253, 256.325514053301, 7, 6, 1.30317650495332, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406107390000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24908503, 14.3092208, 255.065555234533, 9, 8, 1.03139622772203, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406147410000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24912105, 14.30913114, 253.697027164955, 17, 12, 1.28256512364723, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406167450000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24913691, 14.30915501, 253.087527466496, 17, 12, 1.48256704150828, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406207450000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24910669, 14.30913564, 252.394849509312, 26, 12, 1.45368860226716, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406227460000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24905554, 14.30905891, 252.427454922925, 14, 12, 1.70982854209585, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406247480000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24904891, 14.30902087, 252.407432776241, 14, 12, 2.32817436513961, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406267490000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24903438, 14.30895531, 252.511633302066, 9, 8, 2.40899029224891, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406307520000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2490193, 14.30891254, 254.10635332493, 9, 8, 1.92159113286849, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406327520000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24899752, 14.30886584, 255.33932684116, 9, 8, 1.38514001477141, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406347530000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24899835, 14.30883893, 256.148560055363, 12, 8, 1.2548486272039, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406387570000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24895525, 14.30878854, 257.595958229831, 9, 6, 1.33167435077218, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406407570000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24894308, 14.30881919, 257.748172761731, 7, 6, 1.3437967879493, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406427590000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24894424, 14.30879602, 258.148045698359, 7, 6, 1.40506752120999, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406447590000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897013, 14.3087708, 258.73206875102, 7, 6, 1.32722909233662, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406507630000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24899411, 14.30871161, 258.393367414116, 7, 6, 1.19050981731556, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406527630000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24900568, 14.30880985, 259.441816124056, 7, 6, 1.60071978622932, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406587660000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24901868, 14.30875422, 258.645063213896, 7, 6, 1.42179922641885, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406607680000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2490225, 14.3087142, 258.128955710307, 9, 8, 1.6648361142989, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406627690000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24899202, 14.30876327, 258.258006308068, 7, 6, 1.63091850786356, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406647700000, TimeSpan.FromHours(1)), new GeoCoordinate(48.248999, 14.30873814, 256.795654006125, 7, 6, 1.69687386722371, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406747760000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24898286, 14.30874518, 254.117882702387, 7, 6, 1.19924244305006, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406787770000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24900199, 14.30874282, 252.40450816716, 7, 8, 0, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406807800000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24901148, 14.30871393, 250.174130289849, 7, 12, 0.562022727939566, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406847810000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24902338, 14.30869189, 247.292875416659, 12, 12, 0.674589842740374, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406867820000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24902707, 14.30871843, 246.122333200998, 9, 12, 0.873256080158558, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406907840000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2490188, 14.30875003, 245.538406941563, 9, 12, 0.82098105319536, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406967870000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24903988, 14.30876066, 246.520244679682, 14, 12, 0.75138387232891, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406987880000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24901843, 14.30869998, 247.552885908253, 14, 12, 1.28196277976357, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407007890000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24901495, 14.30869837, 247.82437482814, 12, 12, 1.07140934525889, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407067930000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24893342, 14.30866289, 245.792420245464, 9, 8, 1.48298498088654, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407087940000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24894735, 14.30866824, 243.872265024535, 9, 8, 0.870070550784878, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407107950000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24895537, 14.3086449, 241.021559722161, 9, 12, 1.11347094540375, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407147970000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24895027, 14.30862412, 238.031278984576, 12, 8, 0.773571842819805, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407167980000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24894213, 14.30857577, 235.850946235579, 14, 12, 1.12116766217648, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407188000000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24895591, 14.30851958, 233.260739705546, 19, 12, 1.27163333307808, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407208000000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24895305, 14.30858254, 230.737230681547, 12, 8, 1.90409780733048, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407228010000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24896214, 14.3085505, 228.832656795698, 14, 8, 1.72105403937988, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407248030000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24891651, 14.30852579, 227.723297860253, 12, 12, 2.15635087285783, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407268030000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24888497, 14.30851276, 226.018651551984, 14, 12, 1.91486801065635, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407308050000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24889868, 14.3084777, 224.780651838584, 17, 12, 1.7239841715139, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407328060000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2489161, 14.3084672, 223.699763727846, 19, 12, 1.19438627085672, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407348070000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24892424, 14.30845455, 222.860140556649, 14, 8, 0.846422498991796, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407388110000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897215, 14.30844792, 223.319966060326, 14, 8, 1.20716161411786, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407428130000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897508, 14.30842744, 224.160031469981, 19, 12, 0.932657766636434, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407448150000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24899233, 14.30847249, 225.093328441092, 14, 12, 1.13484005811991, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407488210000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2489731, 14.30852733, 226.251119970358, 14, 12, 1.0108183931221, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407508180000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24895873, 14.3085864, 226.881478734806, 12, 8, 1.4631129974199, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407528190000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897776, 14.30857073, 227.710866235055, 12, 8, 1.83969601940619, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407548210000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24895268, 14.30856623, 228.097452392297, 14, 8, 1.80248844193688, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407568210000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24899134, 14.30857573, 228.902770841279, 9, 8, 1.87871250563877, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407588220000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24896963, 14.30857888, 229.666741077859, 12, 8, 1.57348661211614, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407608230000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897652, 14.30861496, 230.789833237369, 14, 8, 1.44588983852298, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407648250000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24896462, 14.30855057, 232.685526806248, 12, 12, 1.62641254715026, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407668260000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897762, 14.30855976, 233.658453347872, 14, 12, 1.30362718600298, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407708280000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897772, 14.30853848, 235.647995419212, 7, 8, 1.09568972753188, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407908300000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897772, 14.30853848, 235.647995419212, 7, 8, 0, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412290810000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24900281, 14.30853533, 238.398661578303, 7, 6, 0, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412330830000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24916174, 14.30887975, 240.382221033677, 9, 8, 2.0845116247323, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412370850000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24932241, 14.30944236, 242.993631606337, 9, 8, 5.21982023106023, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412390860000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24939839, 14.30973055, 244.458617546671, 7, 6, 8.64711029733088, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412410870000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24949181, 14.31003057, 246.884087120013, 7, 8, 10.8538398691813, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412430880000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24959673, 14.31033509, 248.180905624572, 9, 8, 11.8312, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412450890000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24965238, 14.31066123, 249.088334983872, 7, 8, 12.6028, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412470900000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24978463, 14.3109267, 249.723078168309, 9, 8, 12.5685068628947, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412490910000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24994331, 14.3111727, 249.970473085232, 9, 8, 12.4484800654093, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412510920000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25010288, 14.3112952, 249.897850417847, 9, 6, 11.608293464152, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412550940000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2504877, 14.31153935, 251.089439133188, 7, 6, 10.8881333333333, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412570950000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25063711, 14.31161383, 251.629094482507, 7, 6, 9.91077352956136, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412590960000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25077697, 14.31164086, 251.939513239737, 9, 8, 9.08773349685669, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412610970000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25089215, 14.31165132, 251.956198505071, 12, 8, 7.79596221612368, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412630980000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25094566, 14.31162197, 252.531907983946, 7, 6, 5.73086814976673, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412650990000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25097386, 14.31163463, 252.696037530844, 7, 6, 3.77117962934291, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412671000000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2510034, 14.31162491, 253.075981838263, 9, 6, 2.64702266191533, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412691010000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25102581, 14.31159456, 252.590673123036, 9, 6, 1.97770819383125, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412731030000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25103794, 14.31161438, 252.78888905611, 9, 6, 1.61398873787711, 0)),
     };
    }
    #endregion

I'm having some trouble with MapPolyline. It somehow renders a gps trace incorrectly if zoomed out.

At a low mapControl.ZoomLevel (eg 9) some lines/edges are still drawn but they shouldn't. Here are some screenshots to demonstrate the odd behavior.

http://img403.imageshack.us/g/capture4jz.png/

Image Description:

  1. The first image is zoomed out (ZoomLevel = 9) (pay attention to the blue MapPolyline)
  2. Second image is zoomed in a little (the MapPolyline is still the same same -> incorrect)
  3. Third image is again zoomed in further (however the MapPolyline looks still very similar)
  4. Last Image: This is what the actual gps trace looks like.

So the MapPolyline is drawing the gps trace incorrectly if map is zoomed out. It seems that it stops scaling at some point and stays all the same at lower ZoomLevels (9 - 15 == zooming out)

Maybe I did something wrong? Can someone tell me how to fix this? Some workaround?

Here is a simple test app to demonstrate this odd behavior (this behavior is the same on the device and simulator):

MainPage.xaml

    <!--ContentPanel - place additional content here-->
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" >
        <my:Map x:Name="mapControl" Margin="8" CredentialsProvider="{Binding CredentialsProvider}">
            <my:MapLayer>
                <my:MapPolyline x:Name="mapPolyline" 
                                Stroke="#FF2C76B7"
           Opacity="0.85"
        StrokeThickness="6" />
            </my:MapLayer>
        </my:Map>
        <Button Content="+" HorizontalAlignment="Left"  Height="86" VerticalAlignment="Bottom" Margin="108,0,0,51" Width="95" Name="zoomInButton"  Click="zoomInButton_Click" />
        <Button Content="-" HorizontalAlignment="Right" Height="86" VerticalAlignment="Bottom" Margin="0,0,101,51" Width="98" Name="zoomOutButton" Click="zoomOutButton_Click" />
    </Grid>

MainPage.xaml.cs

    // Constructor
    public MainPage()
    {
        InitializeComponent();

        this.DataContext = this;

        // load an actual trace
        var loadedTrace = LoadCarDrive();

        var locations = new LocationCollection();
        foreach (var item in loadedTrace)
        {
            locations.Add(item.Location);
        }

        mapPolyline.Locations = locations;

        // zoom to center
        mapControl.SetView(LocationRect.CreateLocationRect(locations));
        mapControl.ZoomLevel = 9;
    }

    private void zoomInButton_Click(object sender, RoutedEventArgs e)
    {
        mapControl.ZoomLevel += 1;
        Debug.WriteLine(mapControl.ZoomLevel);
    }

    private void zoomOutButton_Click(object sender, RoutedEventArgs e)
    {
        mapControl.ZoomLevel -= 1;
        Debug.WriteLine(mapControl.ZoomLevel);
    }

    #region Car Drive Trace
    public List<GeoPosition<GeoCoordinate>> LoadCarDrive()
    {
        return new List<GeoPosition<GeoCoordinate>>() {
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405647110000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24879119, 14.30983157, 264.5, 7, 8, 0, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405667080000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24881212, 14.30975438, 266.25, 9, 8, 3.08515646975006, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405686990000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2488539, 14.30977517, 264.450002034505, 9, 8, 2.7708502915673, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405707010000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24888582, 14.30973458, 264.833329942491, 7, 6, 2.622272942855, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405727010000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24890673, 14.30970928, 264.027773256655, 7, 6, 2.09121417243467, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405747020000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2489299, 14.30967342, 263.053696997372, 7, 6, 1.89013767966395, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405767030000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24893927, 14.30963082, 262.293819348999, 7, 6, 1.66950420129036, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405787040000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2489513, 14.30961666, 260.815840816629, 7, 6, 1.45526477188896, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405807090000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897547, 14.30958534, 260.136549319532, 7, 6, 1.42904734840548, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405827120000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2490056, 14.30956493, 259.084125976376, 7, 4, 1.48926924922331, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405847120000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24901793, 14.30954465, 258.240225098636, 7, 4, 1.8838781127322, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405927280000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24901616, 14.30950247, 257.208112955994, 7, 6, 1.42209719840891, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405947300000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24902166, 14.30943419, 256.616110650371, 9, 6, 1.37894394353935, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405967320000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24902592, 14.30939502, 256.30807656996, 12, 6, 1.19195039763596, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315405987320000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24906708, 14.30934571, 256.508064441282, 7, 6, 2.04223380763222, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406007340000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24907986, 14.30932245, 256.405378302576, 7, 6, 2.21050803017023, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406027360000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24908171, 14.30927428, 256.371151650296, 9, 6, 2.11644554209566, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406067370000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24906849, 14.30929253, 256.325514053301, 7, 6, 1.30317650495332, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406107390000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24908503, 14.3092208, 255.065555234533, 9, 8, 1.03139622772203, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406147410000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24912105, 14.30913114, 253.697027164955, 17, 12, 1.28256512364723, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406167450000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24913691, 14.30915501, 253.087527466496, 17, 12, 1.48256704150828, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406207450000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24910669, 14.30913564, 252.394849509312, 26, 12, 1.45368860226716, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406227460000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24905554, 14.30905891, 252.427454922925, 14, 12, 1.70982854209585, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406247480000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24904891, 14.30902087, 252.407432776241, 14, 12, 2.32817436513961, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406267490000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24903438, 14.30895531, 252.511633302066, 9, 8, 2.40899029224891, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406307520000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2490193, 14.30891254, 254.10635332493, 9, 8, 1.92159113286849, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406327520000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24899752, 14.30886584, 255.33932684116, 9, 8, 1.38514001477141, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406347530000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24899835, 14.30883893, 256.148560055363, 12, 8, 1.2548486272039, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406387570000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24895525, 14.30878854, 257.595958229831, 9, 6, 1.33167435077218, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406407570000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24894308, 14.30881919, 257.748172761731, 7, 6, 1.3437967879493, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406427590000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24894424, 14.30879602, 258.148045698359, 7, 6, 1.40506752120999, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406447590000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897013, 14.3087708, 258.73206875102, 7, 6, 1.32722909233662, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406507630000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24899411, 14.30871161, 258.393367414116, 7, 6, 1.19050981731556, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406527630000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24900568, 14.30880985, 259.441816124056, 7, 6, 1.60071978622932, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406587660000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24901868, 14.30875422, 258.645063213896, 7, 6, 1.42179922641885, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406607680000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2490225, 14.3087142, 258.128955710307, 9, 8, 1.6648361142989, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406627690000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24899202, 14.30876327, 258.258006308068, 7, 6, 1.63091850786356, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406647700000, TimeSpan.FromHours(1)), new GeoCoordinate(48.248999, 14.30873814, 256.795654006125, 7, 6, 1.69687386722371, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406747760000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24898286, 14.30874518, 254.117882702387, 7, 6, 1.19924244305006, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406787770000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24900199, 14.30874282, 252.40450816716, 7, 8, 0, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406807800000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24901148, 14.30871393, 250.174130289849, 7, 12, 0.562022727939566, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406847810000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24902338, 14.30869189, 247.292875416659, 12, 12, 0.674589842740374, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406867820000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24902707, 14.30871843, 246.122333200998, 9, 12, 0.873256080158558, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406907840000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2490188, 14.30875003, 245.538406941563, 9, 12, 0.82098105319536, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406967870000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24903988, 14.30876066, 246.520244679682, 14, 12, 0.75138387232891, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315406987880000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24901843, 14.30869998, 247.552885908253, 14, 12, 1.28196277976357, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407007890000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24901495, 14.30869837, 247.82437482814, 12, 12, 1.07140934525889, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407067930000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24893342, 14.30866289, 245.792420245464, 9, 8, 1.48298498088654, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407087940000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24894735, 14.30866824, 243.872265024535, 9, 8, 0.870070550784878, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407107950000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24895537, 14.3086449, 241.021559722161, 9, 12, 1.11347094540375, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407147970000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24895027, 14.30862412, 238.031278984576, 12, 8, 0.773571842819805, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407167980000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24894213, 14.30857577, 235.850946235579, 14, 12, 1.12116766217648, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407188000000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24895591, 14.30851958, 233.260739705546, 19, 12, 1.27163333307808, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407208000000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24895305, 14.30858254, 230.737230681547, 12, 8, 1.90409780733048, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407228010000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24896214, 14.3085505, 228.832656795698, 14, 8, 1.72105403937988, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407248030000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24891651, 14.30852579, 227.723297860253, 12, 12, 2.15635087285783, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407268030000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24888497, 14.30851276, 226.018651551984, 14, 12, 1.91486801065635, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407308050000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24889868, 14.3084777, 224.780651838584, 17, 12, 1.7239841715139, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407328060000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2489161, 14.3084672, 223.699763727846, 19, 12, 1.19438627085672, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407348070000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24892424, 14.30845455, 222.860140556649, 14, 8, 0.846422498991796, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407388110000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897215, 14.30844792, 223.319966060326, 14, 8, 1.20716161411786, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407428130000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897508, 14.30842744, 224.160031469981, 19, 12, 0.932657766636434, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407448150000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24899233, 14.30847249, 225.093328441092, 14, 12, 1.13484005811991, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407488210000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2489731, 14.30852733, 226.251119970358, 14, 12, 1.0108183931221, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407508180000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24895873, 14.3085864, 226.881478734806, 12, 8, 1.4631129974199, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407528190000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897776, 14.30857073, 227.710866235055, 12, 8, 1.83969601940619, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407548210000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24895268, 14.30856623, 228.097452392297, 14, 8, 1.80248844193688, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407568210000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24899134, 14.30857573, 228.902770841279, 9, 8, 1.87871250563877, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407588220000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24896963, 14.30857888, 229.666741077859, 12, 8, 1.57348661211614, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407608230000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897652, 14.30861496, 230.789833237369, 14, 8, 1.44588983852298, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407648250000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24896462, 14.30855057, 232.685526806248, 12, 12, 1.62641254715026, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407668260000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897762, 14.30855976, 233.658453347872, 14, 12, 1.30362718600298, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407708280000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897772, 14.30853848, 235.647995419212, 7, 8, 1.09568972753188, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315407908300000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24897772, 14.30853848, 235.647995419212, 7, 8, 0, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412290810000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24900281, 14.30853533, 238.398661578303, 7, 6, 0, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412330830000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24916174, 14.30887975, 240.382221033677, 9, 8, 2.0845116247323, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412370850000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24932241, 14.30944236, 242.993631606337, 9, 8, 5.21982023106023, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412390860000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24939839, 14.30973055, 244.458617546671, 7, 6, 8.64711029733088, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412410870000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24949181, 14.31003057, 246.884087120013, 7, 8, 10.8538398691813, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412430880000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24959673, 14.31033509, 248.180905624572, 9, 8, 11.8312, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412450890000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24965238, 14.31066123, 249.088334983872, 7, 8, 12.6028, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412470900000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24978463, 14.3109267, 249.723078168309, 9, 8, 12.5685068628947, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412490910000, TimeSpan.FromHours(1)), new GeoCoordinate(48.24994331, 14.3111727, 249.970473085232, 9, 8, 12.4484800654093, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412510920000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25010288, 14.3112952, 249.897850417847, 9, 6, 11.608293464152, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412550940000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2504877, 14.31153935, 251.089439133188, 7, 6, 10.8881333333333, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412570950000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25063711, 14.31161383, 251.629094482507, 7, 6, 9.91077352956136, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412590960000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25077697, 14.31164086, 251.939513239737, 9, 8, 9.08773349685669, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412610970000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25089215, 14.31165132, 251.956198505071, 12, 8, 7.79596221612368, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412630980000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25094566, 14.31162197, 252.531907983946, 7, 6, 5.73086814976673, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412650990000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25097386, 14.31163463, 252.696037530844, 7, 6, 3.77117962934291, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412671000000, TimeSpan.FromHours(1)), new GeoCoordinate(48.2510034, 14.31162491, 253.075981838263, 9, 6, 2.64702266191533, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412691010000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25102581, 14.31159456, 252.590673123036, 9, 6, 1.97770819383125, 0)),
         new GeoPosition<GeoCoordinate>(new DateTimeOffset(634315412731030000, TimeSpan.FromHours(1)), new GeoCoordinate(48.25103794, 14.31161438, 252.78888905611, 9, 6, 1.61398873787711, 0)),
     };
    }
    #endregion

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

花落人断肠 2024-10-21 05:28:52

我不认为你做错了什么,问题是(我相信)在一个小范围内有大量数据。这意味着许多锐角具有相当高的 StrokeThickness,这一切都融合成一团。

使这个稍微更令人愉悦的解决方法是根据缩放级别更改 StrokeThickness(缩小得越多,StrokeThickness 越低),如下所示:

private void mapControl_ViewChangeEnd(object sender, MapEventArgs e)
    {
        if (mapControl.ZoomLevel > 17)
            mapPolyline.StrokeThickness = 6.00;
        else
            mapPolyline.StrokeThickness = 2.00;
    }

我确实相信这是需要研究的内容。

I do not think you have done anything wrong, the issue is (I believe) there is a great deal of data in a small vicinity. This means lots of sharp angles which with a quite high StrokeThickness this all melds into one blob.

A workaround which makes this slightly more eye pleasing is to change the StrokeThickness based on the zoom level (the more zoomed out the lower the StrokeThickness) something like the following :

private void mapControl_ViewChangeEnd(object sender, MapEventArgs e)
    {
        if (mapControl.ZoomLevel > 17)
            mapPolyline.StrokeThickness = 6.00;
        else
            mapPolyline.StrokeThickness = 2.00;
    }

I do believe this is something that needs to be looked into though.

忘你却要生生世世 2024-10-21 05:28:52

事实上,我认为问题不在于微软,而在于工具的不当使用。随着缩小数据范围,对数据进行细化是一种正常的专业实践。例如,我公司基于网络的车队跟踪产品可以显示车辆的行为。

对于 48 小时的旅程,如果缩小到全国范围,您将看到大约一万个位置样本。发送给客户端的数据量非常大,特别是因为这些点将相互模糊十到一个像素。

因此,我们将它们聚类,其邻近阈值是地图比例的函数。这为我们提供了大约十个像素间隔的合理数字,并具有额外的噪声消除功能。请记住使用时间和空间上的邻近性进行聚类,否则您可能会在往返路线中得到不适当的分组。

Actually I rather think the problem lies not with Microsoft but with inappropriate use of the tools. It is normal professional practice to thin the data as one zooms out. For example, my company's web based fleet tracking product can show the doings of a vehicle.

For a journey of 48 hours, if you zoom out to a national level you will bring around ten thousand position samples into view. This is a ridiculous amount of data to send to the client, especially since the points will blur into each other ten to a pixel.

So we cluster them, with a proximity threshold that is a function of map scale. This gives us points about ten pixels apart in sensible numbers, with bonus noise elimination. Remember to cluster using proximity in time as well as in space, otherwise you might get inappropriate grouping in there-and-back routes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文