laptop and a wrench

Bogue

CSS style in JavaScript API 2.7 has some invalid settings.

Dernière publication: August 25, 2014 ArcGIS API for JavaScript
Numéro d’ID de bogue NIM079494
EnvoiMarch 29, 2012
Dernière modificationJune 5, 2024
S’applique àArcGIS API for JavaScript
Version trouvée2.7
StatutNon-Reproducible

Informations supplémentaires

No Public Explanation

Solution de contournement

Since the default position of scale bar is absolute, it is independent from the position of a map. However, it is possible to customize the location of a scale bar. After customization, it can be placed at anywhere in a webpage. The following workaround is adjusted from a sample "Map with external scalebar" (<a href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/widget_scalebarExt.html" target="_blank">http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/widget_scalebarExt.html</a>)1. Move the scalebar div up so it is located within the map div <div id="map" style="position: relative; width: 900px; height: 500px; border: 1px solid #000;"> <div id="scalebar" style="position:absolute;left:100px;top:530px;"> </div> </div> 2. Make changes on the style of the scalebar div. Use "relative" position. Change the attached position. <div id="map" style="position: relative; width: 900px; height: 500px; border: 1px solid #000;"> <div id="scalebar" style="position:relative;left:20px;top:460px;"> </div> </div> 3. Now the scale bar is anchored at a specific position with the map.

Étapes pour reproduire

ID de bogue: NIM079494

Logiciel:

  • ArcGIS API for JavaScript

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement