[OpenLayers-Users] zooming on a complex vector (gml) layer

Gundel, Aaron Aaron_Gundel at sjwater.com
Thu Jul 29 11:33:31 EDT 2010


Hello all,

I'm encountering an issue in which a certain vector (GML) layer doesn't display when zoomed into my map.  When I'm zoomed out, I have no problems viewing the layer.  Here's my basic setup.  I'm happy to email the gml file to anyone who wants to have a look.  Does anyone know why this would occur?

        options = {
            projection : new OpenLayers.Projection("EPSG:900913"),
            displayProjection : new OpenLayers.Projection("EPSG:4326"),
            units : "m",
            maxResolution : "auto",
            maxExtent : new OpenLayers.Bounds(-2.003750834E7, -2.003750834E7,
                2.003750834E7, 2.003750834E7
            ),
            restrictedExtent : new OpenLayers.Bounds(
                -1.3624298063013404E7, 4410600.4729968,
                -1.348582507E7, 4508732.060125004
            ),
            numZoomLevels : 20
        };
        map = new OpenLayers.Map('map', options);
        map.addLayer(new OpenLayers.Layer.Google("Google", {
            'sphericalMercator' : true,
            isBaseLayer : true
        }));
                                var gmlLayer = new OpenLayers.Layer.Vector( "GML", {strategies: [new OpenLayers.Strategy.Fixed()],
                                                protocol: new OpenLayers.Protocol.HTTP({
                                                                url: "images/sanjose.xml",
                                                                format: new OpenLayers.Format.GML()
                                                })
                                });

                                map.addLayer(gmlLayer);
        map.zoomToExtent(new OpenLayers.Bounds(
            -1.3591728512248104E7, 4457700.9873282965,
            -1.3556032436327279E7, 4498280.413855204
        ));
    });
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100729/501b2cc7/attachment.html


More information about the Users mailing list