> I tried to do this at one point. Because OL ties a single SVG/VML object > to a > single geometry, it was hard to do right, so I gave up after spending a > couple > weekends on it. Good luck. :)
Where were the problems? I think the label SVG/VML object is also tied to this geometry!? Right now, I'm creating a textpath instead of the textbox element. I had no problems doing this with SVG, so far. My problem is (as always -.-) doing the same thing for IE. For some reason the textpath in VML is not working... And for some other reason there is in OL a flipping of VML-objects around the y-axis... Regards > Datum: Mon, 15 Feb 2010 09:27:15 +0100 > Von: "Dominik Gärner" <dom...@gmx.at> > An: dom...@gmx.at > Betreff: Fwd: Re: [OpenLayers-Dev] feature label enhancement > > > ------- Weitergeleitete Nachricht ------- > Von: "Christopher Schmidt" <crschm...@metacarta.com> > An: "Dominik Gärner" <dom...@gmx.at> > Kopie: dev@openlayers.org > Betreff: Re: [OpenLayers-Dev] feature label enhancement > Datum: Wed, 10 Feb 2010 14:11:22 +0100 > > On Wed, Feb 10, 2010 at 11:29:48AM +0100, "Dominik Gärner" wrote: > > Hi everyone, > > > > I'd like to do some label enhancement for vector features. I want the > > label to follow the feature shape (e.g. see > > http://www.svgbasics.com/text2.html ) > > It shouldn't be that hard by using SVG & VML. However, since this means > > some changes in the Renderers - and I'm not so familiar with the whole > > existing implementations - I need some ideas & help for creating a > > concept: > > > > - using SVG, a textpath needs a <path> element. In SVG i could link the > > text to the path element (using the xlink:href attribute), but currently > > > only Polygon and Curve geometries are using <path> node types. And I'm > > not sure if VML allows links. > > The better way will be to create a separate path element for the > > text/label, using the feature's geometry (--> this means changes to the > > drawText methods in the Renderers) > > > > - maybe some additional style attributes for the label have to be added. > > > > - Who knows something about Canvas? Is it possible to implement curved > > text like in SVG & VML? > > Where or which component decides what to use (besides of IE->VML, > > Firefox->SVG) > > I doubt it. > > > - Rotating labels comes for free by rotating the vector feature. Does it > > > make sense to create an extra Label/Text class for placing just labels > > (e.g. if I want to place just a text, not a feature with a label > > attribute) > > No, because you can use a feature with no strokeWidth/strokeColor (an > invisible > feature) if you really want to do that. > > > - Did I forget something essential? Sees anyone bigger blockades for the > > > programming of this? > > I tried to do this at one point. Because OL ties a single SVG/VML object > to a > single geometry, it was hard to do right, so I gave up after spending a > couple > weekends on it. Good luck. :) > > Regards, > > > -- > Erstellt mit Operas revolutionärem E-Mail-Modul: > http://www.opera.com/mail/ -- Sicherer, schneller und einfacher. Die aktuellen Internet-Browser - jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/atbrowser _______________________________________________ Dev mailing list Dev@openlayers.org http://openlayers.org/mailman/listinfo/dev