Good day everyone,
I used the following sample to display the home button: Home Button | ArcGIS API for JavaScript
Using the following css code:
#HomeButton {
position: absolute;
top: 95px;
left: 20px;
z-index: 50;
}
The button displays here:
If I change the css to this:
#HomeButton {
position: absolute;
top: 175px;
left: 260px;
z-index: 50;
}
The button displays here:
Is there a way in the css that I can tie the home button to the map pane? Just not sure if how I am doing it is the correct way.
Thanks,
Chris
Solved! Go to Solution.
You need to put the homebutton div within the map div.
<div id="map">
<div id="HomeButton"></div>
</div>
I don't think you can tie it to the map within your CSS.
You need to put the homebutton div within the map div.
<div id="map">
<div id="HomeButton"></div>
</div>
I don't think you can tie it to the map within your CSS.
Thanks Tim. I had this:
<div id="map" class="shadow roundedCorners" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'"></div>
<div id="HomeButton"></div>
When I should have had this:
<div id="map" class="shadow roundedCorners" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'">
<div id="HomeButton"></div>
</div>
Chris
Glad we got it figured out