[OpenLayers-Dev] how to overlay jpg and shapefile

Jachym Cepicky jachym.cepicky at gmail.com
Tue Feb 26 01:22:22 EST 2008

arjun dheer píše v Po 25. 02. 2008 v 17:07 -0800:
> Hi,
> I am new to openlayers. I need some help regarding overlaying of
> shapefile over a jpg. What I am trying to do is display a jpg using
> openlayers and then overlaying and displaying the shapefile containing
> data for the area shown in the jpg. Please let me know how such a
> thing is possible? Also, is there an example showing such a
> functionality.
> -Arjun

No, it is not possible. OpenLayers are not able to handle Shapefiles
directly. You have to either setup mapserver [1] or convert shapefile to
some xml format, such as GML (KML, GeoRSS) [2].

For the jpeg part, you can use OpenLayers.Layer.Image class [3], which
is working nice.

[1] http://mapserver.gis.umn.edu
[2] http://www.gdal.org
[3] http://dev.openlayers.org/docs/files/OpenLayers/Layer/Image-js.html
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Toto je =?UTF-8?Q?digit=C3=A1ln=C4=9B?=
	=?ISO-8859-1?Q?_podepsan=E1?= =?UTF-8?Q?_=C4=8D=C3=A1st?=
Url : http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20080226/283d27ab/attachment.bin

More information about the Dev mailing list