Hi all,<br><br>I am going nuts over not beeing able to figure out how to make getDataExtent work for me.<br><br>This is my page NOT working yet:<br><a href="http://mybestprojects.com/data/test/tracks_layers.html">http://mybestprojects.com/data/test/tracks_layers.html</a><br>
<br>I try to model after <br><a href="http://oms.wff.ch/ol_track.htm">http://oms.wff.ch/ol_track.htm</a> (tracks work fine, just zoom in on the red point manually.)<br>and <br><a href="http://nuug.no/kart.shtml">http://nuug.no/kart.shtml</a> (automatic zoom by getDataExtent not working for me.)<br>
<br>Code in question might be:<br><pre id="line1"> if( ! map.getCenter() ){<br> lgpx.events.register('loadend', map, function(){this.zoomToExtent(lgpx.getDataExtent())});<br> map.setCenter(null, null);<br>
}<br></pre>or check out whole page source at <a href="http://mybestprojects.com/data/test/tracks_layers.html">http://mybestprojects.com/data/test/tracks_layers.html</a><br><br>What's wrong?<br><br>Thanks,<br>
Jan<br>
<br><br>