windrobin / timemap

Automatically exported from code.google.com/p/timemap
MIT License
0 stars 0 forks source link

mapCenter and mapZoom options cannot be set as options before Mapstraction is initialised. #98

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create very basic map with options;
tm = TimeMap.init({
        mapId: "map_canvas",               // Id of map div element (required)
        timelineId: "my-timeline",     // Id of timeline div element (required) 
        options: {
            mapCenter: mxn.LatLonPoint(52, 0),
            mapZoom: 3,
            mapType: google.maps.MapTypeId.ROADMAP
        }};

What is the expected output? What do you see instead?
Map should centre and zoom to the passed coordinates, instead the debugger in 
Chrome shows an error at line 272 of mxn.googlev3.core.js with the text 
'Uncaught Bounds not available, map must be initialized'.

What version of the product are you using? On what operating system?
v2, Chrome on Windows Vista using javascript debugger.

Please provide any additional information below.
This error still occurs if the mapCenter line is commented out and only mapZoom 
is set. It goes away when mapZoom is commented too.

It seems that setCenterAndZoom is being called before the map is fully 
initialised in the timeMap code.

Original issue reported on code.google.com by RyanONei...@googlemail.com on 30 May 2011 at 5:26

GoogleCodeExporter commented 9 years ago
I believe this has been fixed in the development trunk - I just haven't had 
time to release the fix. This will be included in maintenance release 2.0.1, 
which will probably be out in about a month. More details and fix here: 
http://groups.google.com/group/timemap-development/browse_thread/thread/4a82462a
dc5998af

Original comment by nick.rab...@gmail.com on 30 May 2011 at 10:56