0

I am using Chromium Embedded Framework and CEF to show bing map in a windows application. we do pass origin, destination to the map using the waypoints, but upon loading the map, the current location of where we reside shows up first before drawing a path between origin and destination in the map.

we are using Microsoft.Maps.Directions and Microsoft.Maps.Location for this purpose.

any setting I have to disable to prevent showing the current location of the user upon loading the map?

Mahsa
  • 115
  • 2
  • 11

1 Answers1

1

The map by default loads to the user location. To override this, simply set a center and zoom level of the map when loading the map. If you want to show a world view initially, set the center to 0,0 and the zoom to 1.

rbrundritt
  • 16,570
  • 2
  • 21
  • 46
  • Thanks. is there a way to not show anything initially but only the route drawn between the origin and destination ? – Mahsa Jul 26 '17 at 21:29
  • 1
    Not really. What you can do is calculate the bounding box of your waypoints before loading the map using Microsoft.Maps.LocationRect.romLocations([your locations]) and passing this in as the bounds option of the map. This will be really close to the map view that the directions manager will end up using for your route. – rbrundritt Jul 27 '17 at 15:52