OpenLayers OpenLayers

Ticket #1398 (closed feature: fixed)

Opened 2 years ago

Last modified 2 years ago

alternate rendering of point features

Reported by: achipa Assigned to: ahocevar
Priority: critical Milestone: 2.7 Release
Component: Renderer Version: 2.5
Keywords: Cc:
State: Complete

Description

Is there a preferred/suggested way of drawing point features OTHER than a circle ? In #1284 for example a square highlight is drawn (which is technically a point feature). This patch allows defining a pointStyle property which defines whether the node drawn should be a circle, rectangle, etc. Full SVG object insertion/specification seemed a bit of an overkill, but if someone has a better idea, I'm all ears. Also, at this moment I did it only for SVG, a VML patch will come if/when I get consent of getting this into trunk.

Attachments

squarepoint-r6376.patch (1.7 kB) - added by achipa on 02/27/08 09:01:51.
1398-r7614-A0.patch (21.2 kB) - added by ahocevar on 07/30/08 17:45:50.
New patch; implements all WellKnownName symbols from SLD
graphicName.patch (24.3 kB) - added by tschaub on 07/30/08 20:23:31.
minor tweaks to above patch and example

Change History

02/27/08 09:01:51 changed by achipa

  • attachment squarepoint-r6376.patch added.

02/28/08 11:38:37 changed by achipa

  • owner changed from achipa to ahocevar.

Reassigning to ahocevar, I've seen he did some per feature render commits so I guess he has a word or two on this.

@ahocevar: If not, sorry for the inconvenience, just reassign it back to me or whoever you think would be relevant.

06/05/08 19:24:58 changed by tschaub

  • state changed from Review to Needs Discussion.

I would suggest integrating this with sld:Graphic > sld:Mark > sld:WellKnownName.

I have another reason to update the SLD parser, and was going to store the well-known name as symbolizer.mark. So, symbolizer.mark values would be things like "circle" (our default), "square", "triangle", "cross", "x", etc.

07/28/08 14:54:57 changed by euzuro

  • priority changed from minor to critical.

07/30/08 17:45:50 changed by ahocevar

  • attachment 1398-r7614-A0.patch added.

New patch; implements all WellKnownName symbols from SLD

07/30/08 17:47:36 changed by ahocevar

  • owner changed from ahocevar to tschaub.
  • state changed from Needs Discussion to Review.
  • component changed from Renderer.SVG to Renderer.

The above new patch implements all WellKnownName symbols from the SLD spec, and works with both SVG and VML renderers. Tests pass in FF2 and IE7.

07/30/08 20:23:31 changed by tschaub

  • attachment graphicName.patch added.

minor tweaks to above patch and example

07/30/08 20:29:24 changed by tschaub

  • owner changed from tschaub to ahocevar.
  • state changed from Review to Commit.

Really nice work! This is a great addition.

07/31/08 00:52:19 changed by elemoine

Indeed, thanks for this great work. I'll take a look at the patch as soon as I can.

07/31/08 13:02:11 changed by ahocevar

  • status changed from new to closed.
  • state changed from Commit to Complete.
  • resolution set to fixed.

(In [7634]) added new graphicName symbolizer property, which allows to render well-known graphic symbols named "square", "cross", "x" and "triangle", in addition to the existing "circle". Thanks Tim for the tweaks and the example. r=tschaub,elemoine (closes #1398)

07/31/08 13:09:27 changed by ahocevar

Credits: it would not have been possible to create this patch without taking ideas and code from camptocamp's vectorSymbols sandbox.