W3C home > Mailing lists > Public > www-svg@w3.org > March 2001

Lines with markers (was Moderator action)

From: Arnold, Curt <Curt.Arnold@hyprotech.com>
Date: Thu, 1 Mar 2001 13:36:55 -0700
Message-ID: <B2C1451A181BD411B88A00E018C1C19C08AAD7@THOR>
To: "'Markus Nilsson (ECS)'" <Markus.Nilsson@ecs.ericsson.se>
Cc: "'www-svg@w3.org'" <www-svg@w3.org>
> Markus Nilsson (ECS) [mailto:Markus.Nilsson@ecs.ericsson.se] wrote:
> 
> I'm working with maps, and am looking for a convenient way to 
> create line patterns. With a line pattern, I refer to for 
> example a shape such as a circle reoccurring at specified 
> intervals along the line. 
> If I have understood it correctly it is not possible to use 
> the pattern element used for surfaces to create this effect, 
> and I do not want to insert the symbols manually using coordinates.
> Markus Nilsson
> 

It would seem the best approach for you would be to add the markers through a script executed at load time.

For example, if you used a specific class for your circle'd lines:

<g class="lineWithCircles">
	<line x1="0" y1="0" x2="100" y2="100"/>
</g>

You could have a script search through the document looking for that class and then add child circle elements to the group at the desired spacing.  The DOM would be as big as if your document was:

<g class="lineWithCircles">
	<line x1="0" y1="0" x2="100" y2="100"/>
	<circle cx="0" cy="0" r="1"/>
	...
	<circle cx="100" cy="100" r="1"/>
</g>

But you wouldn't need to calculate those points on the server or transmit them over the wire.

p.s. svg-developers@yahoogroups.com might be a better forum to ask these types of usage questions as www-svg@w3.org seems more focused on comments on the SVG recommendation.
Received on Thursday, 1 March 2001 15:41:11 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:20 GMT