Specifically, if you take all the code I pasted into my original forum question, and put it into a div tag, located in an existing webpage, you get errors. Because the website is already formatted, linking to it's own css, etc., and has head information and body information, I am unabe to take the entire chunk of code and paste it into a div tag. I'm able to get the map to display if I paste all the "script" coding in the head section of the document. But, then the scale bar doesn't display properly, and my info windows don't pop up when clicked. If anyone knows which section/s of code to paste into the div tag, and which section of code to place in the head and body of my existing website code, that would be very helpful to know. Thanks in advance!
<div id="map" dojotype="dijit.layout.ContentPane" region="center" style="overflow:hidden;"> </div>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.1"> </script>
Just take the code you pasted, save it to a file on your webserver as a .html (or .htm) file. Have you tried that?
Yes, I have the webmap saved as a stand-alone htm file, and it runs fine. Are you suggesting that I can just link to this uploaded map file (or make a reference to this file) from within my div tag, so it will insert this map into my existing website? That would be nifty! I guess that is somewhat like inserting a google map into a div tag... you create the map, get the reference, and insert the reference into the tag.
The only part that "needs" to be in a div is the one for your map. Here is the code:<div id="map" dojotype="dijit.layout.ContentPane" region="center" style="overflow:hidden;"> </div>
Thanks for this code.
The only links you need to ArcGIS.com is for the mapping javascript.<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.1"> </script>
Does this code just get inserted into my HEAD section of my main website?
If you want to style it yourself, then build your own CSS and use that instead of the CSS that ESRI provides. (looks like your link for the css is not closed)