[OpenLayers-Users] WFS reprojection help
Zoran Jankovic
zoran.jankovic at zisis.hr
Fri Jul 16 10:02:14 EDT 2010
Hi Christopher,
Maybe this will help: try using proj4js-compressed.js, instead of proj4js.
It worked for me, when I had trouble with compatibility (IE, FF, Chrome).
BR,
---
Zoran Jankovic
ZIS-Izrada softvera i savjetovanje / ZIS - Software Development and
Consulting
http://www.zisis.hr
M: 00 385 98 682 902
T: 00 385 44 683 374
A. Senoe 4
44320 Kutina
Croatia
On Fri, Jul 16, 2010 at 3:57 PM, <christopher.schmidt at nokia.com> wrote:
>
> On Jul 16, 2010, at 9:40 AM, ext Ian Turton wrote:
>
> > On Thu, Jul 15, 2010 at 10:13 PM, <christopher.schmidt at nokia.com>
> wrote:
> >> Hi,
> >>
> >> I have a map that I think should work at:
> >>
> >> http://crschmidt.net/mapping/mas/wfs-states.html
> >>
> >> This is a minimal modification of the wfs-states.html included in the
> examples.
> >>
> >> Specifically, I've added:
> >> * Proj4js lib
> >> * <script src="
> http://spatialreference.org/ref/epsg/26986/proj4js/"></script>
> >>
> >> And modified the layer to be a simple layer that requires reprojection.
> >>
> >> var wfs = new OpenLayers.Layer.Vector("States", {
> >> strategies: [new OpenLayers.Strategy.BBOX({ratio: 1.1})],
> >> protocol: new OpenLayers.Protocol.WFS({
> >> url: "
> http://giswebservices.massgis.state.ma.us/geoserver/wfs",
> >> version: '1.0.0',
> >
> > I think you'll need to use version 1.1.0 of the WFS spec to get
> > reprojection. 1.0 only supports 4326.
>
> Reprojection should be working on the client side; there's an example
> of it in:
>
> http://openlayers.org/dev/examples/wfs-reprojection.html
>
> "In the case where the projection of a vector layer differs from the
> projection of the map, features are requested in the layer projection and
> transformed during parsing. It is assumed that the layer projection is
> "native" projection of the data (the coordinate reference system of the data
> on the server)."
>
> Additionally, though this map doesn't work in Safari when I first load
> it, when I zoom in or out, the map *does* load. (In Firefox, it doesn't
> at all.) So this seems like it's more complex than "ur doin it wrong",
> though maybe I'm still missing something obvious.
>
> Regards,
> --
> Christopher Schmidt
> Nokia
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100716/000e37e8/attachment.html
More information about the Users
mailing list