none
UWP Windows 10 Default MapIcon style RRS feed

  • Question

  • Greetings,

    I am developing an App on Bing Map for Windows 10 with the latest build 16299. Since its release, the default MapIcon style displayed on the Map control was a white circle with an arrow pointing to the location. The length of the arrow is related to the Altitude property value of the Location object. This type of Icon is very appropriate to my application. My problem is that the default MapIcon has changed weeks ago.

    Question. Is it possible I retrieve the previous default MapIcon described above, and displayed it instead of the new? Can someone help me on this? Thanks in advance.

    Regards,

    Patrick M.

    Sunday, March 18, 2018 8:26 PM

Answers

  • From time to time, the map style will be updated including things like default icon colors as the design team works to improve things like map readability and contrast. The default icon was recently updated from white with an orange border to orange with a white border.

    If you have a shape you prefer for your application, you can specify it explicitly with the Image property of MapIcon - see the documentation here:

    https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Xaml.Controls.Maps.MapIcon

    As well as the UWP map sample.

    If you want to control the behavior of the icon stem (the little post that lifts the icon off the ground a bit), Starting with the upcoming windows release, that can be controlled with the styling API documented here:

    https://docs.microsoft.com/en-us/windows/uwp/maps-and-location/elements-of-map-style-sheet

    • Marked as answer by Pmambo Tuesday, March 20, 2018 12:18 AM
    Monday, March 19, 2018 4:27 PM
    Moderator

All replies

  • From time to time, the map style will be updated including things like default icon colors as the design team works to improve things like map readability and contrast. The default icon was recently updated from white with an orange border to orange with a white border.

    If you have a shape you prefer for your application, you can specify it explicitly with the Image property of MapIcon - see the documentation here:

    https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Xaml.Controls.Maps.MapIcon

    As well as the UWP map sample.

    If you want to control the behavior of the icon stem (the little post that lifts the icon off the ground a bit), Starting with the upcoming windows release, that can be controlled with the styling API documented here:

    https://docs.microsoft.com/en-us/windows/uwp/maps-and-location/elements-of-map-style-sheet

    • Marked as answer by Pmambo Tuesday, March 20, 2018 12:18 AM
    Monday, March 19, 2018 4:27 PM
    Moderator
  • Hello Duncan,

    Thanks so much for your quick reply. I'll try your recommendation and let you know. Thanks.

    Regards,

    Patrick M.

    Monday, March 19, 2018 4:31 PM
  • Hi Duncan,

    I went through the MapStyleSheet examples and did some tests on my application. It is exactly what I was looking for. However, I found that the styles work only when the Mapcontrol mode is set to Road. It is not working when set to 3D. Am I missing something?

    Regards,

    Patrick M.


    • Edited by Pmambo Monday, March 19, 2018 11:27 PM
    Monday, March 19, 2018 11:26 PM
  • Styles will work in any mode, but if you change the map by setting the .Style property, that will reset your stylesheet. You'll have to re-apply any changes. The best way to work with custom styles is to start from one of the base templates in the MapStyleSheet static methods as shown here:

    https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.maps.mapstylesheet

    Tuesday, March 20, 2018 8:25 PM
    Moderator