3

I know this is a a stupid and direct question.

How do I add a button to a normal map?

Example: http://developers.arcgis.com/en/javascript/samples/map_simple/

I'm finding a way to make a button appear on the top of the screen.

Gunner
97413 silver badges36 bronze badges
asked Jun 12, 2013 at 7:06

1 Answer 1

3

you must be having map div.put following code

<div id="map">
 <input id="Addlyr" type="submit" value = "Add Layer" style="position: absolute; z-index: 1000; left: 100px; float: right;" />
</div>

if you want new button and put nice style adjust using css in style attribute of input button.

If you are referring + and - button then those button are default zoom button which can be initialized in map properties.

answered Jun 12, 2013 at 7:16
3
  • for some reason it appear out of the map boundary. Commented Jun 12, 2013 at 7:49
  • adjust left, right and float value... Commented Jun 12, 2013 at 7:51
  • 1
    See example #4 in this nice tutorial to understand absolute positioning within a relative div, barelyfitz.com/screencast/html-training/css/positioning Commented Jun 13, 2013 at 16:55

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.