Ticket #1946 (closed feature: fixed)

Opened 4 years ago

Last modified 2 years ago

Support for vector title's aka tooltips

Reported by: openlayers Owned by: crschmidt
Priority: minor Milestone: 2.8 Release
Component: Renderer Version: 2.7
Keywords: Cc: zspitzer
State: Complete

Description

It's rather easy to add simple support for normal image title tooltips for an external graphic

This patch adds support for adding an attribute title to a style map and making the render add the title attribute to the image

Attachments

add_title_support_svg.patch Download (497 bytes) - added by openlayers 4 years ago.
add titles to svg objects
add_title_support_vml.patch Download (0.6 KB) - added by openlayers 4 years ago.
vml patch
vector_tooltips_v2.patch Download (3.9 KB) - added by zspitzer 4 years ago.
single file, with requested changes

Change History

Changed 4 years ago by openlayers

add titles to svg objects

Changed 4 years ago by openlayers

  • owner set to ahocevar
  • state set to Review
  • component changed from Renderer to Renderer.SVG

Changed 4 years ago by openlayers

vml patch

Changed 4 years ago by openlayers

  • owner ahocevar deleted
  • component changed from Renderer.SVG to Renderer

Changed 4 years ago by ahocevar

  • state changed from Review to Needs More Work

Thanks for this contribution. A few remarks:

  • Since this only works for external graphics, could you name the symbolizer property "graphicTitle" instead of "title"?
  • The new symbolizer property has to be advertized in OpenLayers.Feature.Vector
  • An example or acceptance test is missing (unit test would also be nice, just to make sure that the title tag is created)
  • Having all this in one single patch would also be great
  • Do we have a CLA from you?

Changed 4 years ago by crschmidt

  • milestone set to 2.8 Release

Changed 4 years ago by crschmidt

  • owner set to crschmidt
  • status changed from new to assigned

I'll email Zac and see if he's still interested in this.

Changed 4 years ago by zspitzer

single file, with requested changes

Changed 4 years ago by zspitzer

  • state changed from Needs More Work to Review

I have attached a new patch as requested.

Yes I have submitted a CLA, not sure if a unit test is going to be useful here as it's only an attribute

Changed 4 years ago by ahocevar

  • status changed from assigned to closed
  • state changed from Review to Complete
  • resolution set to fixed

(In [9097]) Suport for tooltips on externalGraphics using the graphicTitle symbolizer property. Only supported in IE and FF. Patch by zspitzer, modified by me (added some docs, moved code that sets the title tag so it gets executed for externalGraphics. p=zspitzer, r=me (closes #1946)

Changed 4 years ago by zspitzer

I have filed a bug against webkit relating to lack of support for Safari and Chrome

 https://bugs.webkit.org/show_bug.cgi?id=27222

Changed 2 years ago by zspitzer

Update: Vector marker tooltips work in the latest Chromium builds (now just a safari issue)

Changed 2 years ago by zspitzer

now that I'm on a windows machine, this works with Safari 5.0.3 as well

Note: See TracTickets for help on using tickets.