in this map I have added a line of code to make it zoom to the vector layer:
map.zoomToExtent(vector_Layer.getDataExtent());
This zooms in to the maximum zoom at the point in the Gulf of Guinea where the equator meets the Greenwich meridian. Its not supposed to zoom here, its should show Scotland.
I've passed the same bit of code in the console in Chrome and that works fine. Perhaps, it wont work until after the page has loaded. Does anyone know why its not working properly when the page loads and does anyone know what I can do to fix it?
Thanks