Bing Maps for Windows UWP apps


Speed in Calculating Coordinates


My Windows Store App (Win 8.1, VS2013) uses a Bing Map. My server provides me with hundreds (even thousands at times) locations that need to be displayed on the map.
My data server only provides me with a centerpoint in Lat/Lng, and a radius (distance and units) for each location. Thanks to a response from a previous post (thanks Ricky), I was able to accurately draw these circles using a MapPolyline to connect 1 degree
arcs of the circle (the geometric equations were easy to find on the web). Because I'm using MapPolyline, the drawn circles scale when the user zooms the Bing Map. Great stuff.
The problem is that when I get into thousands of these, the time needed for the calculations is pretty noticeable to the user. I wondered if I could speed things up by calculating my circle on the Video Card GPU, rather than the CPU as I'm doing now in a
Model object.
So, has anyone coded the creation of large numbers of MapPolylines as an IValueConverter?Does an IValueConverter execute on the GPU (not CPU)?Is there another approach to using the GPU that I'm missing?
The application is targeted for a tablet or small laptop. Think something like a Surface 2 or a fliptop laptop.
Thanks,
Randy
A couple of ideas. The first is to calculate the coordinates on a background thread. You will need to create a class to use in place of the Location class which isn't a DependencyObject. A simple class or struct the had a latitude and longitude coordinate
would work fine. You will be able to use this class in a background thread with your calculations and will just need to convert them to Location objects (by creating new Location objects on the UI thread) on the UI thread which should be a light weight
operation.
Another thought is to pre-calculate all the circles ahead of time is possible and store them in your database. If the data is stored as Well Known Text (a standard for representing spatial objects as text) it can be easily overlaid on the map using
this library: http://mapstoolbox.codeplex.com/http://rbrundritt.wordpress.com
A couple of ideas. The first is to calculate the coordinates on a background thread. You will need to create a class to use in place of the Location class which isn't a DependencyObject. A simple class or struct the had a latitude and longitude coordinate
would work fine. You will be able to use this class in a background thread with your calculations and will just need to convert them to Location objects (by creating new Location objects on the UI thread) on the UI thread which should be a light weight
operation.
Another thought is to pre-calculate all the circles ahead of time is possible and store them in your database. If the data is stored as Well Known Text (a standard for representing spatial objects as text) it can be easily overlaid on the map using
this library: http://mapstoolbox.codeplex.com/http://rbrundritt.wordpress.com
I'm going with option 1.
Option 2 would be viable if any number of circles had the same predictable radius. Unfortunately, every one I get is different.
I'm guessing that any GPU usage is behind the scenes to a C#/XAML programmer. It probably helps a lot when coding lots of <Ellipses ... /> in XAML code. I cannot use that for the scaling reasons mentioned above.
Thanks again for the help!Randy

Related Links

Best way to extend Bing Maps for Metro functionality
How to check Permission for Location Tracking?
MapManager - extends Bing Maps for Metro with tappable annotations (pushpins) and callouts
Is it possible to remove copyright names at bottom of map?
How to use the responsed xml information into my app?
Resetting or Removing some or all MapUIElementCollection elements from Map.
How to lock navigation on Bing Maps Metro Style?
Tile X,Y position vs quadkey
Calulate Distances with Bing ???
Set transparence for a polygon?
Best way to scroll the map by a given amount
Draw image on map?
Any examples of using Bing REST services in a C# Metro App?
[Bingmaps] [Javascript\HTML] How to disable infinite horizontal scrolling?
How to overlay a polygon on Bing basemap ?
Map Children Image size very large?

Categories

MSDN
Windows Phone Dev Center
Visual Studio Design a...
HealthVault
Smart Device Development
Windows Forms
Orchard
Bing
Visio 2010
Exchange Server
Archived Forums #
Archived Forums M
Archived Forums SN-SZ
Archived Forums V
Archived Forums W
Archived Forums X-Z
Maps In Windows
Where is the Forum For…?
Visual C#
Visual Basic
Visual C++
Test Tools in Visual S...
Visual Studio Tools fo...
Tools for Apache Cordova
Submitting and Publish...
Network Monitor
Windows Desktop Sideba...
Windows Desktop Search...
Windows Desktop Web Se...
Hardware Development B...
SharePoint 2013 - Deve...
SharePoint 2013 - Usin...
SharePoint 2013 - Search
SharePoint 2010 - Setu...
Azure Mobile Apps
Microsoft Azure Site R...
Azure HDInsight
Azure CDN
Azure Log Analytics
Azure Mobile Engagement
Azure Disk Encryption
Team Foundation Server...
Visual FoxPro General
Commerce Server 2009
Microsoft Robotics - S...
Microsoft Device Emulator
Windows Mobile Develop...
SQL Server Integration...
SQL Server Setup & Upg...
SQL Server Notificatio...
SQL Server Spatial
SQL Server Migration
Standard 2009: Tools
SQL Server 2012 Setup ...
SQL Server 2012 High A...
Windows Live Messenger...
Orchard –Discussions
Script Junkie Discussion
Speech Service for Dev...
WebsitePanel - Support
WebsitePanel - Develop...
Developing for the Mob...
Microsoft Automatic Gr...
Project Server General...
Project Customization ...
Bing Ads API: Development
Microsoft Lync Client ...
Silverlight Installati...
Programming Silverligh...
Managed Extensibility ...
Performance Profiling ...
Expression Studio with...
Connected Services Fra...
Search Server: Install...
Microsoft Security Dev...
Retired SharePoint Bus...
Retired SharePoint Wor...
.NET Framework Network...
Announcements about pr...
Axum Incubation Project
Azure Troubleshooting,...
App Producer (archived)
Game Technologies: Dir...
HD DVD Interactivity A...
Popfly Game Creator
Server Core Developers
SyncFx - Microsoft Syn...
SQL Azure Labs Support
SQL Server in Azure VMs
SQL Server 2014 SQL To...
Tools for Windows Phon...
Visual Basic 2008 (Pre...
Visual Basic Interop a...
Visual Studio Async CTP
Visual Studio Code Ana...
Visual Studio Tools fo...
Visual Studio WPF/SL D...
WCF Data Services (Pre...
Windows Workflow Found...
Mango Update (Archived)
OneDrive Development (...
Azure N-Series Virtual...
Windows IoT
Maps In Windows - APIs
Windows Containers

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile