[OpenLayers-Users] Firebug Error: Invalid Object Initializer

Nicholas Efremov-Kendall n.e.kendall at gmail.com
Mon May 11 21:27:15 EDT 2009


Hi all,

I'm getting a firebug error, which is this:


invalid object initializer
var factory=null;if(typeof
GearsFactory!...documentElement.appendChild(factory);}}} error line 224

Here's my code, basically, I'm just trying to get OL to display data in UTM
Zone 32N, which I believe is EPSG:22332 (although there are several))
I apologize for the commented out lines of code.

I'm pretty sure the error's with the mapserver layer.

//Tricking OL's wms to setCenter
             var lon = 10.8804;
        var lat = 33.7817;
                var zoom = 10;
        var myproj = new OpenLayers.Projection("EPSG:22332");
        //var myproj = new OpenLayers.Projection("EPSG:4326");
        var map, layer;
   function init(){
         //  Default WMS from Metacarta
         map = new OpenLayers.Map('map',
         {
         maxExtent: new OpenLayers.Bounds (656782.661, 3720728.22,
693473.18, 3754557.09),
         maxResolution: "auto",
         projection: "myproj"
         });

        // var myBaseLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
                // "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}
);

        // map.addLayer(myBaseLayer);
        // var jerbaSites =(new OpenLayers.Layer.GML("Jerba_sites",
"kml/doc.kml",
        // {
        // projection: new OpenLayers.Projection ("EPSG:4326"),
        // format: OpenLayers.Format.KML,
                // formatOptions: {
                // extractStyles: true,
                // extractAttributes: true,
                // maxDepth: 2
            // }
        // }));

//         map.addLayer(jerbaSites);
         var mapserv = new OpenLayers.Layer.WMS( "Jerba",
              "http://localhost/cgi-bin/mapserv.exe",
         {
         map: 'C:/ms4w/apache/htdocs/oltest/Jerba.map',
         layers: "satt", "sites", "soils"
         }
         );
         map.addLayer(mapserv);

    //     var kmlTest = new OpenLayers.Layer.GML("KML_Test",
"kml/jerba_site.kml",
    //     { projection: new OpenLayers.Projection ("EPSG:4326"), format:
OpenLayers.Format.KML, formatOptions: {extractStyles: true,
    //             extractAttributes: true,
  //               maxDepth: 2
//             }
//             }));
//    map.addLayer(kmlTest);
    // Map Controls
         map.addControl( new OpenLayers.Control.LayerSwitcher());
            map.addControl( new OpenLayers.Control.MousePosition());
            map.addControl( new OpenLayers.Control.OverviewMap());
            map.addControl( new OpenLayers.Control.ScaleLine());
            map.addControl(new OpenLayers.Control.Permalink());
            map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);

             }
           // -->
         </script>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090511/cdf94410/attachment.html


More information about the Users mailing list