[OpenLayers-Trac] [OpenLayers] #3477: SVG renderer in Firefox fails when base-URI differs from page location

OpenLayers trac-20090302 at openlayers.org
Mon Aug 29 19:49:43 EDT 2011


#3477: SVG renderer in Firefox fails when base-URI differs from page location
--------------------------+-------------------------------------------------
 Reporter:  fb3rasp       |       Owner:  ahocevar    
     Type:  bug           |      Status:  new         
 Priority:  major         |   Milestone:  2.12 Release
Component:  Renderer.SVG  |     Version:  2.11 RC3    
 Keywords:                |       State:              
--------------------------+-------------------------------------------------
 Hi,

 I am new to this group, specially around filing tickets, so I may not be
 up-to-speed with the processes in this community.

 I had an issue and also found a solution which I like to file here.

 Problem:

 When the base-URI is the html document is defined to a different location
 than the page-location (i.e. to the parent folder), the SVG render fails
 to render other symbols rather circles.

 The href used in setting the style for SVG elements refers to the
 definition via '#' anchor. Because of the different definition, the
 relative path to the anchor does not find the defined SVG symbol.

 I observed this issue in Firefox.

 Solution:

 By changing the href to an absolut path, the problem disappears. This can
 be applied by following change in the SVG.js file:

 {{{
 324                } else {
 325                   node.setAttributeNS(this.xlinkns, "href",
 window.location.href + "#" + id);
 326                }
 }}}

 Thanks,
 Rainer

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3477>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list