Hi all,<br><br>right now getDataExtent() only considers the data added LAST (red).<br>But I need the map to zoom in on ALL data in lgpx (green AND red).<br><br>What&#39;s my error?<br><br>Thanks,<br>Jan<br><br>       lgpx = new OpenLayers.Layer.GML (&quot;green&quot;,&quot;separated/20090607172151.gpx&quot;,{                                               <br>

                    projection: new  OpenLayers.Projection(&quot;EPSG:4326&quot;),<br>                    style: {strokeColor: &quot;green&quot;, strokeWidth: 5, strokeOpacity: 0.8},<br>                    format: OpenLayers.Format.GPX,});<br>

    map.addLayer(lgpx);<br><br>       lgpx = new OpenLayers.Layer.GML (&quot;red&quot;,&quot;separated/20090607110550.gpx&quot;,{                                               <br>                    projection: new  OpenLayers.Projection(&quot;EPSG:4326&quot;),<br>

                    style: {strokeColor: &quot;red&quot;, strokeWidth: 5, strokeOpacity: 0.8},<br>                    format: OpenLayers.Format.GPX,});<br>    map.addLayer(lgpx);<br><br>                if( ! map.getCenter() ){<br>

            lgpx.events.register(&#39;loadend&#39;, lgpx, function(){map.zoomToExtent(lgpx.getDataExtent())});<br>            map.setCenter(null, null);<br>            };<br>