Map style sheet reference

Microsoft mapping technologies use map style sheets to define the appearance of maps. A map style sheet is defined using JavaScript Object Notation (JSON) and can be used in various ways including in a Windows Store application's MapControl through the MapStyleSheet.ParseFromJson method.

Style sheets can be created interactively using the Map Style Sheet Editor application.

The following JSON can be used to make water areas appear in red, water labels appear in green, and land areas appear in blue:

    {"version":"1.*",
        "settings":{"landColor":"#0000FF"},
        "elements":{"water":{"fillColor":"#FF0000","labelColor":"#00FF00"}}
    }

This JSON can be used to remove all labels and points from a map.


    {"version":"1.*", "elements":{"mapElement":{"labelVisible":false},"point":{"visible":false}}}

Sometimes the value of a property is transformed to produce the final result. For example, vegetation fillColor has slightly different shades depending on type of the entity being displayed. This behavior can be turned off, thereby using the precise provided value, by using the ignoreTransform property.

    {"version":"1.*",
        "settings":{"shadedReliefVisible":false},
        "elements":{"vegetation":{"fillColor":{"value":"#999999","ignoreTransform":true}}}
    }

This topic shows the JSON entries and properties that you can use to customize the look and feel of your maps. These properties can also be applied to user map elements through the MapStyleSheetEntry property.

Entries

This table uses ">" characters to represent levels in the entry hierarchy. It also shows which versions of Windows support each entry and which ignore it.

Version Windows Release Name
1703 Creators Update
1709 Fall Creators Update
1803 April 2018 Update
1809 October 2018 Update
Name Property Group 1703 1709 1803 1809 Description
version Version The style sheet version that you want to use.
settings Settings The settings that apply to the whole style sheet.
mapElement MapElement The parent entry to all map entries.
> baseMapElement MapElement The parent entry to all non-user entries.
>> area MapElement Areas describing land use. These should not to be confused with the physical buildings which are under the structure entry.
>>> airport MapElement Areas that encompass airports.
>>> areaOfInterest MapElement Areas in which there are a high concentration of businesses or interesting points.
>>> cemetery MapElement Areas that encompass cemeteries.
>>> continent MapElement Continent area labels.
>>> education MapElement Areas that encompass schools and other educational facilities.
>>> indigenousPeoplesReserve MapElement Areas that encompass indigenous peoples reserves.
>>> industrial MapElement Areas that are used for industrial purposes.
>>> island MapElement Island area labels.
>>> medical MapElement Areas that are used for medical purposes (For example: a hospital campus).
>>> military MapElement Areas that encompass military bases or have military uses.
>>> nautical MapElement Areas that are used for nautical related purposes.
>>> neighborhood MapElement Neighborhood area labels.
>>> runway MapElement Areas that is used as an airplane runway.
>>> sand MapElement Sandy areas like beaches.
>>> shoppingCenter MapElement Areas of ground allocated for malls or other shopping centers.
>>> stadium MapElement Areas that encompass stadiums.
>>> underground MapElement Underground areas (For example: a metro station footprint).
>>> vegetation MapElement Forests, grassy areas, etc.
>>>> forest MapElement Areas of forest land.
>>>> golfCourse MapElement Areas that encompass golf courses.
>>>> park MapElement Areas that encompass parks.
>>>> playingField MapElement Extracted pitches such as a baseball field or tennis court.
>>>> reserve MapElement Areas that encompass nature reserves.
>> point PointStyle All point features that are drawn with an icon of some sort.
>>> address PointStyle Address numbers labels.
>>> naturalPoint PointStyle Icons that represent natural features.
>>>> peak PointStyle Icons that represent mountain peaks.
>>>>> volcanicPeak PointStyle Icons that represent volcano peaks.
>>>> waterPoint PointStyle Icons that represent water feature locations such as a waterfall.
>>> pointOfInterest PointStyle Icons that represent any interesting location.
>>>> business PointStyle Icons that represent any business location.
>>>>> attractionPoint PointStyle Icons that represent tourist attractions such as museums, zoos, etc.
>>>>> communityPoint PointStyle Icons that represent locations of general use to the community.
>>>>> educationPoint PointStyle Icons that represent schools and other education related locations.
>>>>> entertainmentPoint PointStyle Icons that represent entertainment venues such as theaters, cinemas, etc.
>>>>> essentialServicePoint PointStyle Icons that represent essential services such as parking, banks, gas, etc.
>>>>> foodPoint PointStyle Icons that represent restaurants, cafés, etc.
>>>>> lodgingPoint PointStyle Icons that represent hotels and other lodging businesses.
>>>>> realEstatePoint PointStyle Icons that represent real estate businesses.
>>>>> shoppingPoint PointStyle Icons that represent hotels and other lodging businesses.
>>> populatedPlace PointStyle Icons that represent the size of populated place (For example: a city or town).
>>>> capital PointStyle Icons that represent the capital of a populated place.
>>>>> adminDistrictCapital PointStyle Icons that represent the capital of a state or province.
>>>>> countryRegionCapital PointStyle Icons that represent the capital of a country or region.
>>> roadShield PointStyle Signs that represent the compact name for a road. (For example: I-5). Use only palette values if you set the ImageFamily property of the settings entry to a value of Palette
>>> roadExit PointStyle Icons that represent exits, typically from a controlled access highway.
>>> transit PointStyle Icons that represent bus stops, train stops, airports, etc.
>> political BorderedMapElement Political regions such as countries, regions and states.
>>> countryRegion BorderedMapElement Country region borders and labels.
>>> adminDistrict BorderedMapElement Admin1, states, provinces, etc., borders and labels.
>>> district BorderedMapElement Admin2, counties, etc., borders and labels.
>> structure MapElement Buildings and other building-like structures.
>>> building MapElement Buildings.
>>>> educationBuilding MapElement Buildings used for education.
>>>> medicalBuilding MapElement Buildings used for medical purposes such as hospitals.
>>>> transitBuilding MapElement Buildings used for transit such as airports.
>> transportation MapElement Lines that are part of the transportation network (For example: roads, trains, and ferries).
>>> road MapElement Lines that represent all roads.
>>>> controlledAccessHighway MapElement Lines that represent large, controlled access highways.
>>>>> highSpeedRamp MapElement Lines that represent high speed ramps that typically connect to controlled access highways.
>>>> highway MapElement Lines that represent highways.
>>>> majorRoad MapElement Lines that represent major roads.
>>>> arterialRoad MapElement Lines that represent arterial roads.
>>>> street MapElement Lines that represent streets.
>>>>> ramp MapElement Lines that represent ramps that typically connect to highways.
>>>>> unpavedStreet MapElement Lines that represent unpaved streets.
>>>> tollRoad MapElement Lines that represent roads that cost money to use.
>>> railway MapElement Railway lines.
>>> trail MapElement Walking trails through parks or hiking trails.
>>> walkway MapElement Elevated walkway.
>>> waterRoute MapElement Ferry route lines.
>> water MapElement Anything that looks like water. This includes oceans and streams.
>>> river MapElement Rivers, streams, or other water passages. Note that this may be a line or polygon and might connect to non-river water bodies.
> routeMapElement MapElement All routing related entries.
>> routeLine MapElement Route line related entries.
>>> drivingRoute MapElement Lines that represent driving routes.
>>> scenicRoute MapElement Lines that represent scenic driving routes.
>>> walkingRoute MapElement Lines that represent walking routes.
> userMapElement MapElement All user entries.
>> userBillboard MapElement The styling for default MapBillboard instances.
>> userLine MapElement The styling for default MapPolyline instances.
>> userModel3D MapElement3D The styling for default MapModel3D instances. This is primarily for setting renderAsSurface.
>> userPoint PointStyle The styling for default MapIcon instances.

Properties

This section describes the properties that you can use for each entry.

Version properties

Property Type Description
version String Targeted style sheet version. Used for applicability. "1.0" for default, "1.*" for additional minor features updates.

Settings properties

Property Type 1703 1709 1803 1809 Description
atmosphereVisible Bool A flag that indicates whether the atmosphere appears in the 3D control.
buildingTexturesVisible Bool A flag that indicates whether or not to show textures on symbolic 3D buildings that have textures.
fogColor Color The ARGB color value of the distance fog that appears in the 3D control.
glowColor Color The ARGB color value that might be applied to label glow and icon glow.
imageFamily String The name of image set to use for this style. Set this value to Default for signs that use fixed colors that are based on the real-world sign. Set this value to Palette for signs that use palette configurable colors.
landColor Color The ARGB color value of the land before anything is drawn on that land.
logosVisible Bool A flag that indicates whether items that have an Organization property should draw the appropriate Logos or use a generic icon.
officialColorVisible Bool A flag that indicates whether items that have an official color property (such as transit lines in China) should draw that color. For example, turn this value off for a black and white map.
rasterRegionsVisible Bool A flag that indicates whether or not to draw raster regions where they have a better representation than vectors (Japan and Korea).
shadedReliefVisible Bool A flag that indicates whether or not to draw elevation shading on the map.
shadedReliefDarkColor Color The color of the dark-side of shaded relief. Alpha channel represents the maximum alpha value.
shadedReliefLightColor Color The color of the light-side of shaded relief. Alpha channel represents the maximum alpha value.
shadowColor Color The color of the shadow behind icons that use shadows.
spaceColor Color The ARGB color value for area around the map.
useDefaultImageColors Bool A flag that indicates whether the original colors in the SVG should be used rather than looking up the palette entry for colors in an image.

MapElement properties

Property Type 1703 1709 1803 1809 Description
backgroundScale Float Amount by which the background element of an icon should be scaled. For example, use 1 for default and 2 for twice as large.
fillColor Color The color that is used for filling polygons, the background of point icons, and for the center of lines if they have split.
fontFamily String
iconColor Color The color of the glyph shown in the middle of a point icon.
iconScale Float Amount by which the glyph of an icon should be scaled. For example, use 1 for default and 2 for twice as large.
labelColor Color
labelOutlineColor Color
labelScale Float The amount by which default label sizes are scaled. For example, use 1 for default and 2 for twice as large.
labelVisible Bool
overwriteColor Bool Makes The alpha value of the FillColor overwrite the StrokeColor rather than blend with it.
scale Float The amount by which the whole point's size is scaled. For example, use 1 for default and 2 for twice as large.
strokeColor Color The color to use for the outline around polygons, the outline around point icons, and the color of lines.
strokeWidthScale Float The amount by which the stroke of lines are scaled. For example, use 1 for default and 2 for twice as large.
visible Bool

BorderedMapElement

This property group inherits from the MapElement property group.

Property Type 1703 1709 1803 1809 Description
borderOutlineColor Color The secondary or casing line color of the border of a filled polygon.
borderStrokeColor Color The primary line color of the border of a filled polygon.
borderVisible Bool
borderWidthScale Float The amount by which the stroke of borders are scaled. For example, use 1 for default and 2 for twice as large.

PointStyle properties

This property group inherits from the MapElement property group.

Property Type 1703 1709 1803 1809 Description
shape-Background Float Shape to use as the background of the icon--replacing any shape that exists there.
stemAnchorRadiusScale Float Amount by which the anchor point of an icon stem should be scaled. For example, use 1 for default and 2 for twice as large.
stemColor Color The color of the stem coming out of the bottom of the icon in 3D mode.
stemHeightScale Float Amount by which the length of the stem of an icon should be scaled. For example, use 1 for default and 2 for twice as long.
stemOutlineColor Color The color of the outline around the stem coming out of the bottom of the icon in 3D mode.
stemWidthScale Float Amount by which the width of the stem of an icon should be scaled. For example, use 1 for default and 2 for twice as long.

MapElement3D

This property group inherits from the MapElement property group.

Property Type 1703 1709 1803 1809 Description
renderAsSurface Bool A flag that indicates that a 3D model should be rendered like a building--without depth fading against the ground.