[OpenLayers-Users] Question on changing Popups on Textlayer
Christopher Schmidt
crschmidt at metacarta.com
Mon Nov 17 12:51:33 EST 2008
On Mon, Nov 17, 2008 at 11:44:50AM -0500, Yves Moisan wrote:
>
> > >
> > > projects = new OpenLayers.Layer.Text( "Projects",
> > > {location:"project-locations.txt", projection: new
> > > OpenLayers.Projection("EPSG:4326")} );
> > >
> > > projects = new OpenLayers.Layer.GML("Projects",
> > > "project-locations.txt",
> > > {format: OpenLayers.Format.Text, projection: new
> > > OpenLayers.Projection("EPSG:4326") });
> >
> > How does it not? can you provide an example? It should.
>
> The only thing I can think of is that my textfile is not read the same
> way by both forms. The beginning of it is :
>
> lat lon title description icon iconSize iconOffset
> 48.9 9.6075669 Bleu 24x24 Description one<br>Second line.<br>(click
> again to close) images/Ol_icon_blue_example.png 24,24 0,-24
> 48.9899851 9.5382032 Rouge 8x8 Description two.
> images/Ol_icon_red_example.png 8,8 -8,-8
>
> I made sure I have tabs everywhere. It seems the GML layer is stricter
> than the .Text layer. In the latter case, if I did not put iconSize and
> iconOffset, symbols would draw whereas with a GML layer they don't.
> Another issue I have is that the GML layer gives me an "Undefined" for
> title. I tried quoting the title, but to no avail. Have the
> requirements for the textfile changed ?
I'm having a lot of trouble visualizing what you're talking about. I
could do much better with example code or an example URL to look at
(latter preferred).
The Layer.Text and the Layer.GML both use the exact same parser for the
Text File -- the only difference is in how they use the returned
features.
It's possible that more needs to be dne here, and with code examples of
what should work, but doesn't, we can pursue them.
I'll also note, again, that I highly recommend *not* using the
OpenLayers-specific, non-extensible Format.Text, even if it makes some
things slightly easier, because it's simply locking your data up in
another proprietary format.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list