Bing Maps C# GPX Route Viewer won't compile: cannot convert from LocationCollection to LocationRect

The Bing Windows Store sample app "Bing Maps C# GPX Route Viewer" won't compile.

On this line of code:

LocationRect bestRouteView = new LocationRect(gpxRoutePoints);

...I get these two err msgs:

The best overloaded method match for 'Bing.Maps.LocationRect.LocationRect(Bing.Maps.LocationRect)' has some invalid arguments

Argument 1: cannot convert from 'Bing.Maps.LocationCollection' to 'Bing.Maps.LocationRect'

(gpxRoutePoints is a LocationCollection)

Upvotes: 0

Views: 448

Answers (1)

Jim O'Neil
Jim O'Neil

Reputation: 23774

The sample you're using was recently updated to the RTM version of the Bing Maps SDK, and the constructor it's complaining about was introduced there. Install the SDK update and you should be fine.

Upvotes: 1

Related Questions