Ticket #2924 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

Make style.graphicTitle standards-conformant

Reported by: potter000 Owned by: pgiraud
Priority: minor Milestone: 2.11 Release
Component: Renderer.SVG Version: 2.10
Keywords: Cc:
State: Review

Description

Hello, I've recently been using OpenLayers to draw a map with a layer of markers, each of them being an external PNG image. I wanted tooltips to be shown on markers hover, and the easiest way to achieve that is to set a graphicTitle attribute for each marker (feature) style.

Though that works for FF, that does not work for other browsers (e.g. Google Chrome), 'cause the present behaviour is not standard-compliant. According to  http://www.w3.org/TR/2000/CR-SVG-20001102/struct.html#DescriptionAndTitleElements, "title" is a child element, while currently Renderer.SVG sets an attribute.

I have created a patch to resolve the issue. It leaves current behaviour (an attribute) while adding a child <title> element. I've checked it with FF 3.6, IE 7, Opera 10.63 and Chrome 8 (all on Linux except IE). Please consider this patch and let me know if it was useful.

Attachments

01_SVG_title.patch Download (0.7 KB) - added by potter000 3 years ago.

Change History

Changed 3 years ago by potter000

  Changed 3 years ago by pgiraud

  • owner changed from ahocevar to pgiraud
  • status changed from new to assigned
  • state set to Review

I think this patch is correct and is already ready for review. This doesn't break any tests and it preserves backward compatibility for Firefox.

I think we'll need an agreement from this contributor.

  Changed 3 years ago by potter000

Please feel free to do whatever you find necessary with this patch (if you mean this by "an agreement from this contributor."). I'm using trac for 1st time, so if any actions are required from me, let me know what I should do.

follow-up: ↓ 4   Changed 3 years ago by bartvde

Hi, we need a contributor license agreement from you, see the instructions here:

 http://trac.osgeo.org/openlayers/wiki/HowToContribute

in reply to: ↑ 3   Changed 3 years ago by potter000

Replying to bartvde:

Hi, we need a contributor license agreement from you, see the instructions here:  http://trac.osgeo.org/openlayers/wiki/HowToContribute

Done. Hope you can use this patch now without worrying about legal and copyright issues:)

  Changed 2 years ago by pgiraud

Sorry, but can you send you agreements to openlayers-cla at openlayers dot org. The address seemed to be the wrong one. Thanks again.

  Changed 2 years ago by crschmidt

  • status changed from assigned to closed
  • resolution set to fixed

(In [11569]) Make SVG graphicTitle standards compliant. p=potter000, r=pgiraud (Closes #2924)

Note: See TracTickets for help on using tickets.