[OpenLayers-Users] vector layer from text file

ryan burns burnsr77 at gmail.com
Thu Feb 11 12:57:09 EST 2010


Thanks, Chris!

ryan

On Wed, Feb 10, 2010 at 4:57 AM, Christopher Schmidt <
crschmidt at metacarta.com> wrote:

> On Wed, Feb 10, 2010 at 12:37:00AM -0500, ryan burns wrote:
> > Hi all OLers-
> >
> > Does anyone know of a way to structure a text file (for reading into
> > OpenLayers) to support lines and polygons? In my OL interface I am
> reading a
> > text file into a vector layer but so far it only works with points. My
> code
> > is below. Many, many thanks in advance for any suggestions!!
>
> Use GeoJSON, KML, GML, OSM, or any of the other formats provided
> in OpenLayers.
>
>  http://docs.openlayers.org/library/formats.html
>
> -- chris
>
> > var tLayer = new OpenLayers.Layer.Vector( 'Features', {
> >               strategies: [new OpenLayers.Strategy.Fixed()],
> >               projection:map.displayProjection,
> >               protocol: new OpenLayers.Protocol.HTTP({
> >                  url: loc,
> >                  format: new OpenLayers.Format.Text
> >               })
> >               }
> >            );
> >
> >
> >
> >
> >
> > --
> > Department of Geography
> > University of Washington
> >
> > BurnsR77 at gmail.com
> > rlburns at uw.edu
>
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users
>
>
> --
> Christopher Schmidt
> MetaCarta
>



-- 
Department of Geography
University of Washington

BurnsR77 at gmail.com
rlburns at uw.edu
859-582-9125
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100211/797f6e99/attachment.html


More information about the Users mailing list