-
Notifications
You must be signed in to change notification settings - Fork 132
Map Provider Gotchas
vicchi edited this page Jan 28, 2013
·
9 revisions
The ESRI ArcGIS mapping library supports four stylesheet themes; the default for Mapstraction is claro
but you can also use themes called tundra
, soria
or nihilo
.
Regardless of which theme you choose, you need to ensure that you ...
- Include the correct stylesheet
- Set the HTML body tag to use the CSS class that corresponds to the theme
- For
claro
includehttp://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/dojo/dijit/themes/claro/claro.css
. - For
tundra
includehttp://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/dojo/dijit/themes/tundra/tundra.css
. - For
soria
includehttp://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/dojo/dijit/themes/soria/soria.css
. - For
nihilo
includehttp://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/dojo/dijit/themes/nihilo/nihilo.css
.
Each theme also requires that your web page's body
uses a style that corresponds to your theme. You can hardcode this into your web page ...
<body class="claro">
.. you can inject this via Javascript ...
<script type="text/javascript">
window.onload = function() {
document.body.className = 'claro';
};
</script>
... or, if you're using jQuery ...
<script type="text/javascript">
$(document).ready(function() {
$(document.body).addClass('claro');
});
</script>