Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have been working on a web app that displays points based on a date query, and an infotemplate pops up when you click on a point. When the user clicks on a point, it retrieves the HTML contents of the infotemplate, but it appears as plain text on the map (no dijit window with an 'x' button in the corner). I assumed that I was loading the tundra CSS theme incorrectly, but that is not the case as I have removed the CSS reference from the HTML of other web maps yet they still retain the infotemplate box. I'm assuming it's an option in the map object but I have had no luck.

The zoom bar and infotemplate are not styled correctly

As you can see, the zoom bar and infotemplate are not being styled correctly. Does anyone know how to resolve this, or know where these styles are derived?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Your initial thought was probably correct: this type of thing happens when you don't properly include the appropriate theme's stylesheet or you don't assign the proper class to the body of your page. Make sure your page has the following in your head tag:

<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.3/js/dojo/dijit/themes/tundra/tundra.css">

and

<body class="tundra">
share|improve this answer
    
Thanks! The thing I was missing was <body class="tundra"> –  Tanner May 17 '11 at 21:21
    
Nice! Figured it was one of the two ;) –  Derek Swingley May 17 '11 at 21:23

Or just add class="tundra" into div that covers your map.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.