HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<!DOCTYPE html>
<html>
<head>
<title>Symbol Layer Options - Azure Maps Web SDK Samples</title>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=Edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="This sample shows how the different options of the symbol layer affect rendering." />
<meta name="keywords" content="map, gis, API, SDK, symbols, markers, pins, pushpins, layer" />
<meta name="author" content="Microsoft Azure Maps" />
<!-- Add references to the Azure Maps Map control JavaScript and CSS files. -->
<link rel="stylesheet" href="https://atlas.microsoft.com/sdk/javascript/mapcontrol/2/atlas.min.css" type="text/css" />
<script src="https://atlas.microsoft.com/sdk/javascript/mapcontrol/2/atlas.min.js"></script>
<script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/1717245/clipboard.min.js"></script>
<script type='text/javascript'>
var map, datasource, symbolLayer, testDataSize = 100, defaultOptions, removeDefaults;
function GetMap() {
//Initialize a map instance.
map = new atlas.Map('myMap', {
view: 'Auto',
//Add your Azure Maps subscription client ID to the map SDK. Get an Azure Maps client ID at https://azure.com/maps
authOptions: {
authType: "anonymous",
clientId: "04ec075f-3827-4aed-9975-d56301a2d663", //Your Azure Active Directory client id for accessing your Azure Maps account
getToken: function (resolve, reject, map) {
//URL to your authentication service that retrieves an Azure Active Directory Token.
var tokenServiceUrl = "https://azuremapscodesamples.azurewebsites.net/Common/TokenService.ashx";
fetch(tokenServiceUrl).then(r => r.text()).then(token => resolve(token));
}
}
});
//Wait until the map resources are ready.
map.events.add('ready', function () {
//Create a style control and add it to the map.
map.controls.add(new atlas.control.StyleControl({
style: 'dark'
}), {
position: 'top-right'
});
//Create a data source and add it to the map.
datasource = new atlas.source.DataSource();
map.sources.add(datasource);
//Add random point features to data source.
datasource.add(generateRandomPoints(testDataSize));
//Create a layer to render the point data.
symbolLayer = new atlas.layer.SymbolLayer(datasource);
map.layers.add(symbolLayer);
defaultOptions = symbolLayer.getOptions();
//Update the symbol layer with the options in the input fields.
updateSymbolLayer();
});
new ClipboardJS('.copyBtn');
}
function updateSymbolLayer() {
var options = getInputOptions();
//Update all the options in the symbol layer.
symbolLayer.setOptions(options);
document.getElementById('CodeOutput').value = JSON.stringify(options, null, '\t').replace(/\"([^(\")"]+)\":/g, "$1:");
}
function getInputOptions() {
removeDefaults = document.getElementById('RemoveDefaults').checked;
return {
iconOptions: {
image: getPropertyValue('iconOptions.image', getSelectValue('Icon')),
size: getPropertyValue('iconOptions.size', parseFloat(document.getElementById('IconSize').value)),
anchor: getPropertyValue('iconOptions.anchor', getSelectValue('IconAnchor')),
offset: getPropertyValue('iconOptions.offset', [
parseFloat(document.getElementById('IconOffsetX').value),
parseFloat(document.getElementById('IconOffsetY').value)
]),
rotation: getPropertyValue('iconOptions.rotation', parseFloat(document.getElementById('IconRotation').value)),
rotationAlignment: getPropertyValue('iconOptions.rotationAlignment', getSelectValue('IconRotationAlignment')),
opacity: getPropertyValue('iconOptions.opacity', parseFloat(document.getElementById('IconOpacity').value)),
allowOverlap: getPropertyValue('iconOptions.allowOverlap', document.getElementById('IconAllowOverlap').checked),
ignorePlacement: getPropertyValue('iconOptions.ignorePlacement', document.getElementById('IgnoreIconPlacement').checked),
optional: getPropertyValue('iconOptions.optional', document.getElementById('IconOptional').checked),
pitchAlignment: getPropertyValue('iconOptions.pitchAlignment', document.getElementById('IconPitchAlignment').value)
},
textOptions: {
allowOverlap: getPropertyValue('textOptions.allowOverlap', document.getElementById('TextAllowOverlap').checked),
anchor: getPropertyValue('textOptions.anchor', getSelectValue('TextAnchor')),
color: getPropertyValue('textOptions.color', document.getElementById('FontColor').value),
font: getPropertyValue('textOptions.font', [getSelectValue('TextFont')]),
ignorePlacement: getPropertyValue('textOptions.ignorePlacement', document.getElementById('IgnoreTextPlacement').checked),
haloBlur: getPropertyValue('textOptions.haloBlur', parseFloat(document.getElementById('HaloBlur').value)),
haloColor: getPropertyValue('textOptions.haloColor', document.getElementById('HaloColor').value),
haloWidth: getPropertyValue('textOptions.haloWidth', parseFloat(document.getElementById('HaloWidth').value)),
offset: getPropertyValue('textOptions.offset', [
parseFloat(document.getElementById('TextOffsetX').value),
parseFloat(document.getElementById('TextOffsetY').value)
]),
opacity: getPropertyValue('textOptions.opacity', parseFloat(document.getElementById('TextOpacity').value)),
optional: getPropertyValue('textOptions.optional', document.getElementById('TextOptional').checked),
size: getPropertyValue('textOptions.size', parseFloat(document.getElementById('FontSize').value)),
textField: ['get', 'title'],
pitchAlignment: getPropertyValue('iconOptions.pitchAlignment', document.getElementById('TextPitchAlignment').value),
rotation: getPropertyValue('iconOptions.rotation', parseFloat(document.getElementById('TextRotation').value)),
rotationAlignment: getPropertyValue('iconOptions.rotationAlignment', getSelectValue('TextRotationAlignment'))
},
minZoom: getPropertyValue('minZoom', parseFloat(document.getElementById('MinZoom').value)),
maxZoom: getPropertyValue('maxZoom', parseFloat(document.getElementById('MaxZoom').value)),
visible: getPropertyValue('visible', document.getElementById('Visible').checked)
};
}
function getPropertyValue(propertyName, value) {
if (removeDefaults) {
if (propertyName.indexOf('.') > -1) {
var p = propertyName.split('.');
var val = defaultOptions;
for (var i = 0; i < p.length; i++) {
val = val[p[i]];
}
if (val === value) {
return undefined;
}
} else if (defaultOptions[propertyName] === value) {
return undefined;
}
}
return value;
}
function generateRandomPoints(cnt) {
var layerData = [];
for (var i = 0; i < cnt; i++) {
layerData.push(new atlas.data.Feature(new atlas.data.Point([Math.random() * 360 - 180, Math.random() * 170 - 85]), {
title: 'Pin_' + i
}));
}
return layerData;
}
function getSelectValue(id) {
var elm = document.getElementById(id);
return elm.options[elm.selectedIndex].value;
}
function openTab(elm, tabName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "block";
elm.className += " active";
}
</script>
<style>
#myMap {
position: relative;
width: calc(100% - 375px);
min-width:290px;
height: 600px;
float: left;
}
.sidePanel {
width: 325px;
height: 580px;
float: left;
margin-right: 10px;
}
#CodeOutput {
width: 300px;
height: 390px;
overflow-y: auto;
}
.copyBtn {
float: right;
}
table td:nth-of-type(1) {
width: 120px;
}
table td:nth-of-type(2) {
width: 200px;
}
.tab {
overflow: hidden;
border: 1px solid #ccc;
background-color: #f1f1f1;
}
.tab button {
background-color: inherit;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 6px 8px;
transition: 0.3s;
font-size: 14px;
}
.tab button:hover {
background-color: #ddd;
}
.tab button.active {
background-color: #ccc;
}
.tabcontent {
display: none;
padding: 6px 12px;
border: 1px solid #ccc;
border-top: none;
height: 440px;
overflow-y: auto;
}
</style>
</head>
<body onload="GetMap()">
<fieldset class="sidePanel">
<legend>Symbol Layer Options</legend>
This sample shows how the different options of the symbol layer affect rendering.
<br /><br />
<div class="tab">
<button class="tablinks active" onclick="openTab(this, 'BaseStyles')">Base Options</button>
<button class="tablinks" onclick="openTab(this, 'IconOptions')">Icon Options</button>
<button class="tablinks" onclick="openTab(this, 'TextOptions')">Text Options</button>
<button class="tablinks" onclick="openTab(this, 'Code')">Code</button>
</div>
<div id="BaseStyles" class="tabcontent" style="display:block;">
<table>
<tr title="An integer specifying the minimum zoom level to render the layer at.">
<td>Min Zoom:</td>
<td>
<form oninput="minz.value=MinZoom.value">
<input type="range" id="MinZoom" value="0" min="0" max="24" step="1" oninput="updateSymbolLayer()" onchange="updateSymbolLayer()" />
<output name="minz" for="MinZoom">0</output>
</form>
</td>
</tr>
<tr title="An integer specifying the maximum zoom level to render the layer at.">
<td>Min Zoom:</td>
<td>
<form oninput="maxz.value=MaxZoom.value">
<input type="range" id="MaxZoom" value="24" min="0" max="24" step="1" oninput="updateSymbolLayer()" onchange="updateSymbolLayer()" />
<output name="maxz" for="MaxZoom">24</output>
</form>
</td>
</tr>
<tr title="Specifies if the layer is visible or not.">
<td>Visible:</td>
<td><input id="Visible" type="checkbox" onclick="updateSymbolLayer()" checked="checked" /></td>
</tr>
</table>
<p>
In addition to the options in this tool, the SymbolLayer also has options for;
<ul>
<li>sourceLayer - used with VectorTileSource.</li>
<li>lineSpacing - spacing when rendered along a line.</li>
<li>placement - defines if symbol placed on point or along a line.</li>
<li>filter - used to filter data in layer.</li>
</ul>
Many options in this layer also support Expressions which are not demonstrated in this sample.
</p>
</div>
<div id="IconOptions" class="tabcontent">
<table>
<tr title="The name of the image in the map's image sprite to use for drawing the icon.">
<td>Image:</td>
<td>
<select id="Icon" onchange="updateSymbolLayer()">
<option value="marker-black">marker-black</option>
<option value="marker-black-styled">marker-black-styled</option>
<option value="marker-blue" selected="selected">marker-blue</option>
<option value="marker-blue-styled">marker-blue-styled</option>
<option value="marker-darkblue">marker-darkblue</option>
<option value="marker-darkblue-styled">marker-darkblue-styled</option>
<option value="marker-red">marker-red</option>
<option value="marker-red-styled">marker-red-styled</option>
<option value="marker-yellow">marker-yellow</option>
<option value="marker-yellow-styled">marker-yellow-styled</option>
<option value="pin-darkblue">pin-darkblue</option>
<option value="pin-blue">pin-blue</option>
<option value="pin-red">pin-red</option>
<option value="pin-round-darkblue">pin-round-darkblue</option>
<option value="pin-round-blue">pin-round-blue</option>
<option value="pin-round-red">pin-round-red</option>
<option value="none">none</option>
</select>
</td>
</tr>
<tr title="Scales the original size of the icon by the provided factor.">
<td>Size:</td>
<td>
<form oninput="a.value=IconSize.value">
<input type="range" id="IconSize" value="1" min="0.1" max="2" step="0.1" oninput="updateSymbolLayer()" onchange="updateSymbolLayer()" />
<output name="a" for="IconSize">1</output>
</form>
</td>
</tr>
<tr title="Specifies which part of the icon is placed closest to the icons anchor position on the map.">
<td>Anchor:</td>
<td>
<select id="IconAnchor" onchange="updateSymbolLayer()">
<option value="bottom" selected="selected">bottom</option>
<option value="bottom-left">bottom-left</option>
<option value="bottom-right">bottom-right</option>
<option value="center">center</option>
<option value="left">left</option>
<option value="right">right</option>
<option value="top">top</option>
<option value="top-left">top-left</option>
<option value="top-right">top-right</option>
</select>
</td>
</tr>
<tr title="Specifies an offset distance of the icon from its anchor in pixels. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of size to obtain the final offset in pixels. When combined with rotation the offset will be as if the rotated direction was up.">
<td>Offset:</td>
<td></td>
</tr>
<tr title="Specifies an offset distance of the icon from its anchor in pixels. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of size to obtain the final offset in pixels. When combined with rotation the offset will be as if the rotated direction was up.">
<td align="right">x:</td>
<td>
<form oninput="x.value=IconOffsetX.value">
<input type="range" id="IconOffsetX" value="0" min="-50" max="50" step="1" oninput="updateSymbolLayer()" onchange="updateSymbolLayer()" />
<output name="x" for="IconOffsetX">0</output>
</form>
</td>
</tr>
<tr title="Specifies an offset distance of the icon from its anchor in pixels. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of size to obtain the final offset in pixels. When combined with rotation the offset will be as if the rotated direction was up.">
<td align="right">y:</td>
<td>
<form oninput="y.value=IconOffsetY.value">
<input type="range" id="IconOffsetY" value="0" min="-50" max="50" step="01" oninput="updateSymbolLayer()" onchange="updateSymbolLayer()" />
<output name="y" for="IconOffsetY">0</output>
</form>
</td>
</tr>
<tr title="The amount to rotate the icon image clockwise in degrees.">
<td>Rotation:</td>
<td>
<form oninput="r.value=IconRotation.value">
<input type="range" id="IconRotation" value="0" min="-360" max="360" step="1" oninput="updateSymbolLayer()" onchange="updateSymbolLayer()" />
<output name="r" for="IconRotation">0</output>
</form>
</td>
</tr>
<tr title="Specifies the orientation of the icon image when the map is rotated.">
<td>Rotation Alignment:</td>
<td>
<select id="IconRotationAlignment" onchange="updateSymbolLayer()">
<option value="auto" selected="selected">auto</option>
<option value="map">map</option>
<option value="viewport">viewport</option>
</select>
</td>
</tr>
<tr title="Specifies the orientation of the icon image when map is pitched.">
<td>Pitch Alignment:</td>
<td>
<select id="IconPitchAlignment" onchange="updateSymbolLayer()">
<option value="auto">auto</option>
<option value="map">map</option>
<option value="viewport" selected="selected">viewport</option>
</select>
</td>
</tr>
<tr title="A number between 0 and 1 that indicates the opacity at which the icon will be drawn.">
<td>Opacity:</td>
<td>
<form oninput="io.value=IconOpacity.value">
<input type="range" id="IconOpacity" value="1" min="0" max="1" step="0.1" oninput="updateSymbolLayer()" onchange="updateSymbolLayer()" />
<output name="io" for="IconOpacity">1</output>
</form>
</td>
</tr>
<tr title="Specifies if the symbol icon can overlay other symbols on the map. If `true` the icon will be visible even if it collides with other previously drawn symbols. Tip: Set this to true if animating an symbol to ensure smooth rendering.">
<td>Allow Overlap:</td>
<td><input id="IconAllowOverlap" type="checkbox" onclick="updateSymbolLayer()" /></td>
</tr>
<tr title="Specifies if other symbols can overlap this symbol. If true, other symbols can be visible even if they collide with the icon.">
<td>Ignore Placement:</td>
<td><input id="IgnoreIconPlacement" type="checkbox" onclick="updateSymbolLayer()" /></td>
</tr>
<tr title="Specifies if a symbols icon can be hidden but its text displayed if it is overlapped with another symbol. If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.">
<td>Optional:</td>
<td><input id="IconOptional" type="checkbox" onclick="updateSymbolLayer()" /></td>
</tr>
</table>
</div>
<div id="TextOptions" class="tabcontent">
<table>
<tr title="The font stack to use for displaying text.">
<td colspan="2">Font:</td>
</tr>
<tr title="The font stack to use for displaying text.">
<td colspan="2">
<select id="TextFont" onchange="updateSymbolLayer()">
<option value="SegoeFrutigerHelveticaMYingHei-Bold">SegoeFrutigerHelveticaMYingHei-Bold</option>
<option value="SegoeFrutigerHelveticaMYingHei-Medium">SegoeFrutigerHelveticaMYingHei-Medium</option>
<option value="SegoeFrutigerHelveticaMYingHei-Regular">SegoeFrutigerHelveticaMYingHei-Regular</option>
<option value="SegoeUi-Bold">SegoeUi-Bold</option>
<option value="SegoeUi-Light">SegoeUi-Light</option>
<option value="SegoeUi-Regular" selected="selected">SegoeUi-Regular</option>
<option value="SegoeUi-SemiBold">SegoeUi-SemiBold</option>
<option value="SegoeUi-SemiLight">SegoeUi-SemiLight</option>
<option value="SegoeUi-SymbolRegular">SegoeUi-SymbolRegular</option>
<option value="StandardCondensedSegoeUi-Black">StandardCondensedSegoeUi-Black</option>
<option value="StandardCondensedSegoeUi-Bold">StandardCondensedSegoeUi-Bold</option>
<option value="StandardCondensedSegoeUi-Light">StandardCondensedSegoeUi-Light</option>
<option value="StandardCondensedSegoeUi-Regular">StandardCondensedSegoeUi-Regular</option>
<option value="StandardFont-Black">StandardFont-Black</option>
<option value="StandardFont-Bold">StandardFont-Bold</option>
<option value="StandardFontCondensed-Black">StandardFontCondensed-Black</option>
<option value="StandardFontCondensed-Bold">StandardFontCondensed-Bold</option>
<option value="StandardFontCondensed-Light">StandardFontCondensed-Light</option>
<option value="StandardFontCondensed-Regular">StandardFontCondensed-Regular</option>
<option value="StandardFont-Light">StandardFont-Light</option>
<option value="StandardFont-Regular">StandardFont-Regular</option>
</select>
</td>
</tr>
<tr title="The color of the text.">
<td>Color:</td>
<td><input type="color" id="FontColor" onchange="updateSymbolLayer()" /></td>
</tr>
<tr title="A number between 0 and 1 that indicates the opacity at which the text will be drawn.">
<td>Opacity:</td>
<td>
<form oninput="to.value=TextOpacity.value">
<input type="range" id="TextOpacity" value="1" min="0" max="1" step="0.1" oninput="updateSymbolLayer()" onchange="updateSymbolLayer()" />
<output name="to" for="TextOpacity">1</output>
</form>
</td>
</tr>
<tr title="The size of the font in pixels.">
<td>Size:</td>
<td>
<form oninput="b.value=FontSize.value">
<input type="range" id="FontSize" value="16" min="8" max="25" step="1" oninput="updateSymbolLayer()" onchange="updateSymbolLayer()" />
<output name="b" for="FontSize">16</output>
</form>
</td>
</tr>
<tr title="Specifies which part of the icon is placed closest to the icons anchor position on the map.">
<td>Anchor:</td>
<td>
<select id="TextAnchor" onchange="updateSymbolLayer()">
<option value="bottom">bottom</option>
<option value="bottom-left">bottom-left</option>
<option value="bottom-right">bottom-right</option>
<option value="center" selected="selected">center</option>
<option value="left">left</option>
<option value="right">right</option>
<option value="top">top</option>
<option value="top-left">top-left</option>
<option value="top-right">top-right</option>
</select>
</td>
</tr>
<tr title="Specifies an offset distance of the icon from its anchor in ems. Positive values indicate right and down, while negative values indicate left and up.">
<td>Offset:</td>
<td></td>
</tr>
<tr title="Specifies an offset distance of the icon from its anchor in ems. Positive values indicate right and down, while negative values indicate left and up.">
<td align="right">x:</td>
<td>
<form oninput="x.value=TextOffsetX.value">
<input type="range" id="TextOffsetX" value="0" min="-5" max="5" step="0.1" oninput="updateSymbolLayer()" onchange="updateSymbolLayer()" />
<output name="x" for="TextOffsetX">0</output>
</form>
</td>
</tr>
<tr title="Specifies an offset distance of the icon from its anchor in ems. Positive values indicate right and down, while negative values indicate left and up.">
<td align="right">y:</td>
<td>
<form oninput="y.value=TextOffsetY.value">
<input type="range" id="TextOffsetY" value="0" min="-5" max="5" step="0.1" oninput="updateSymbolLayer()" onchange="updateSymbolLayer()" />
<output name="y" for="TextOffsetY">0</output>
</form>
</td>
</tr>
<tr title="The amount to rotate the text clockwise in degrees.">
<td>Rotation:</td>
<td>
<form oninput="r.value=TextRotation.value">
<input type="range" id="TextRotation" value="0" min="-360" max="360" step="1" oninput="updateSymbolLayer()" onchange="updateSymbolLayer()" />
<output name="r" for="TextRotation">0</output>
</form>
</td>
</tr>
<tr title="Specifies the orientation of the text when the map is rotated.">
<td>Rotation Alignment:</td>
<td>
<select id="TextRotationAlignment" onchange="updateSymbolLayer()">
<option value="auto" selected="selected">auto</option>
<option value="map">map</option>
<option value="viewport">viewport</option>
</select>
</td>
</tr>
<tr title="Specifies the orientation of the text when map is pitched.">
<td>Pitch Alignment:</td>
<td>
<select id="TextPitchAlignment" onchange="updateSymbolLayer()">
<option value="auto">auto</option>
<option value="map">map</option>
<option value="viewport" selected="selected">viewport</option>
</select>
</td>
</tr>
<tr title="The halo's fadeout distance towards the outside in pixels.">
<td>Halo Blur:</td>
<td>
<form oninput="b.value=HaloBlur.value">
<input type="range" id="HaloBlur" value="0" min="0" max="5" step="0.2" oninput="updateSymbolLayer()" onchange="updateSymbolLayer()" />
<output name="b" for="HaloBlur">0</output>
</form>
</td>
</tr>
<tr title="The color of the text's halo, which helps it stand out from backgrounds.">
<td>Halo Color:</td>
<td><input type="color" id="HaloColor" value="#000000" onchange="updateSymbolLayer()" /></td>
</tr>
<tr title="The distance of the halo to the font outline in pixels. The maximum text halo width is 1/4 of the font size.">
<td>Halo Width:</td>
<td>
<form oninput="b.value=HaloWidth.value">
<input type="range" id="HaloWidth" value="0" min="0" max="5" step="0.2" oninput="updateSymbolLayer()" onchange="updateSymbolLayer()" />
<output name="b" for="HaloWidth">0</output>
</form>
</td>
</tr>
<tr title="Specifies if the text will be visible if it collides with other symbols. If true, the text will be visible even if it collides with other previously drawn symbols.">
<td>Allow Overlap:</td>
<td><input id="TextAllowOverlap" type="checkbox" onclick="updateSymbolLayer()" /></td>
</tr>
<tr title="Specifies if the other symbols are allowed to collide with the text. If true, other symbols can be visible even if they collide with the text.">
<td>Ignore Placement:</td>
<td><input id="IgnoreTextPlacement" type="checkbox" onclick="updateSymbolLayer()" /></td>
</tr>
<tr title="Specifies if the text can be hidden if it is overlapped by another symbol. If true, icons will display without their corresponding text when the text collides wit other symbols and the icon does not.">
<td>Optional:</td>
<td><input id="TextOptional" type="checkbox" onclick="updateSymbolLayer()" /></td>
</tr>
</table>
</div>
<div id="Code" class="tabcontent">
<textarea id="CodeOutput"></textarea><br /><br />
<input id="RemoveDefaults" type="checkbox" onclick="updateSymbolLayer()" checked="checked" /> Remove defaults
<button class="copyBtn" data-clipboard-target="#CodeOutput">Copy to clipboard</button>
</div>
</fieldset>
<div id="myMap"></div>
</body>
</html>
Also see: Tab Triggers