[OpenLayers-Users] vector layer from text file
Christopher Schmidt
crschmidt at metacarta.com
Wed Feb 10 07:57:52 EST 2010
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
More information about the Users
mailing list