none
Suppressing information using customMapStyle RRS feed

  • Question

  • I have been using Bing maps to display historical data from the 19th century (http://www.scottishherringhistory.uk/statistics/Creeks.html) . Ideally I would prefer a map only showing geographical features, as I am only interested in showing specific fishing ports, but I accept that this does not appear to be possible.

    In order to get by as well as possible with the present-day UK map, I have set transportation to false in my customMapStyle, and have encountered a problem - the names of roads and motorways continue to be shown up in green or blue respectively. I would expect them to be suppressed.  

    Wednesday, July 3, 2019 11:22 AM

Answers

All replies

  • I suggest you take a look at the Map Stylesheet editor application available in the Windows store here:

    https://www.microsoft.com/en-us/p/map-style-sheet-editor/9nbhtcjt72ft

    It will allow you to interactively edit the map style, turning on or off features and seeing the result in the UWP map control, the HTML control and static map as well as providing code samples for each.

    Wednesday, July 3, 2019 4:34 PM
    Moderator
  • Thank you for your help. I have now managed to suppress everything from the aerial view using the following:

    const myStyle = {
    "elements": {
    "mapElement": {"visible": false},
    "water": {"fillColor": "#a1e0ff"},
    "waterPoint": {"iconColor": "#a1e0ff"},
    "area": {
    "labelVisible": false,
    "visible": false
    },
    "transportation": {
    "labelVisible": false,
    "visible": false
    },
    "political": {
    "labelVisible": false,
    "visible": false
    },
    "point": {
    "labelVisible": false,
    "visible": false
    },
    "structure": {
    "labelVisible": false,
    "visible": false
    }
    },
    "version": "1.0"
    };

    Saturday, December 7, 2019 3:02 PM