Graphics located wrong with Firefox 3.6

583
2
07-19-2010 01:04 PM
XavierIrias
New Contributor III
I have some very simple code to place markers using lat-longs I'm reading from an external file.  The markers plot okay using MSIE 8, but in Firefox 3.6 (Mac and PC alike), they are way, way off initially (thousands of feet), then as the map is panned and zoomed they move even more. 

Unfortunately this is highly repeatable, and plagues version 1.6 and 2.0 of the API alike.  Any workaround??

Code excerpt:

var loc = esri.geometry.geographicToWebMercator(new esri.geometry.Point(longitude, latitude));

var attributes={latitude:latitude, longitude:longitude, description:description};
                   
var point = new esri.Graphic(loc, symbol, attributes, template);

cfg.layer.add(point);
0 Kudos
2 Replies
XavierIrias
New Contributor III
Solution found:  I traced the problem to inclusion of Yahoo YUI version 2.81, specifically a single css file:

<link rel="stylesheet" type="text/css" href="../yui/reset-fonts-grids/reset-fonts-grids.css" >
       

When I remove that line, or replace it with an include of  reset-fonts.css, the ESRI API works correctly in Firefox.   So clearly the grids css from YUI is causing some problems for ESRI.  This is true regardless of whether the ESRI stylesheet tundra.css is before or after the YUI sheet.
0 Kudos
BrandonHerrington
New Contributor II
I'm having this same issue, but we don't have the YUI compatibility issue that the author of this post had.  Looks great in IE, Chrome, Opera, and Safari.  Firefox 3.6 is the issue.  Anyone have any ideas?
0 Kudos