[OpenLayers-Dev] bug reported when adding postgis layer in chrome and firefox 4.0

Tim Schaub tschaub at opengeo.org
Mon Apr 18 10:47:26 EDT 2011


I'm guessing you are testing your application using the debug loader. 
This is the OpenLayers.js file that loads all other library files 
individually.  Versions of this loader from 2.10 and before do not work 
in Firefox 4.

You can use the latest from trunk to get a fix, or wait for the 2.11 
release.

In any case, you should *never* put an application in production using 
this OpenLayers.js loader.  This is strictly for debugging/development 
purposes.

Always use a minified build of the library.

http://docs.openlayers.org/library/deploying.html

Tim

On 4/18/11 6:13 AM, Mohammed Rashad wrote:
>
> this is the chrome error
> Uncaught TypeError: Cannot read property 'Vector' of undefined
>
> Is this a bug in OL or chrome?
> How to solve it?
>
> the application works fine on Firefox 3.6.6 but not in firefox4
>
> this is the code creating problem
> new_layer = new OpenLayers.Layer.Vector("layername_", {
>          strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
>          projection: new OpenLayers.Projection("EPSG:4326"),
>          protocol: new OpenLayers.Protocol.WFS({
>              version: "1.0.0",
>              srsName: "EPSG:4326",
>              url: "http://localhost/cgi-bin/tinyows",
>              featureNS : "http://www.tinyows.org/",
>              featureType: layername_ ,
>              geometryName: "the_geom",
>              schema:
> "http://localhost/cgi-bin/tinyows?service=wfs&request=DescribeFeatureType&version=1.0.0&typename=tows
> <http://localhost/cgi-bin/tinyows?service=wfs&request=DescribeFeatureType&version=1.0.0&typename=tows>:"
> + 'layername_'
>          })});
>        map.addLayer(new_layer);new_layer.refresh();
>
> if this is commented out the it works but no output
> --
> Thanks && Regards
> Rashad
>
>
>
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev


-- 
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.


More information about the Dev mailing list