Select to view content in your preferred language

InfoWindow shows thumbnail in FF but not IE

864
2
03-13-2012 01:55 PM
by Anonymous User
Not applicable
Original User: doerr@usgs.gov

I have graphics on a map that when clicked will pop up an InfoWindow containing a title and a thumbnail image.  However the thumbnail only appears in FF.  It doesn't appear in IE8 or IE9.
Here's the code:
////////////////////////////////////////////////
                        var iconUrl = dojo.moduleUrl("com.esri.solutions.jsviewer", "assets/images/icons/i_pushpin.png").path;
                               
                        var smallIconUrl = com.esri.solutions.jsviewer.util.getSmallIcon(iconUrl);
                               
          
                        var pms = new esri.symbol.PictureMarkerSymbol(smallIconUrl,20, 20);



                        var point = new esri.geometry.Point(xVal, yVal, this.srWGS84);
                       
   var title = item.prodname;
                       //example item.browseURL = 'http://tdds.cr.usgs.gov/browse/ortho/14R/NT/14RNT430640_200301_0x1500m_CL.jpg'
   var content =  item.tileName + "<br/><img width='200' height='200' src='" + item.browseUrl + "'/>";

   var attrs = {
    "title": title,
    "content": content
   };




   var orthoTileInfo = new esri.Graphic(point, pms, attrs);

                        this.map.graphics.add(orthoTileInfo);
///////////////////////////////////////////////////////////////////////////

I'm using ArcGIS JS API 2.3

Any ideas?

I've attached screenshots from each browser.
0 Kudos
2 Replies
todddoerr
Occasional Contributor
Disregard.  I found the issue.
The InfoPopup widget has explicit code in it removing any img tags if browser is IE or Opera.
Here's the explicit code:

/////////////////////////////////////
                                        if (dojo.isIE || dojo.isOpera) {
                                        dojo.query("img", this.contentNode).forE
ach( function(img) {
                                                img.parentNode.removeChild(img);
                                                });
                                        }
////////////////////////////////////

FYI:  InfoPop is a part of a sample viewer ESRI posted to their Code Gallery a few years ago when ArcGIS API for Javascript first came out.  We took it and ran with it.  We have kept it current with the latest API version.  Maybe InfoPop didn't behave properly with img tags at version 1.2 and thus the code above.  But images appear without any problems now at 2.3.
0 Kudos
by Anonymous User
Not applicable
Original User: jeff.pace

We did the same. 

http://www.mymanatee.org/gisapps/mapviewer/index.jsp?type=landdevelopment&widgetOn=Basemap%20Gallery...

There is a sample of some of the modifications we have made.  Happy to share ideas.
0 Kudos