yenbao1340 / gmaps-utility-library-dev

Automatically exported from code.google.com/p/gmaps-utility-library-dev
0 stars 0 forks source link

me.resetManager_ is not a function #112

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. The following html:

<script type="text/javascript" src="/static/js/jquery-1.2.6.js"></script>
<script type="text/javascript"
src="/static/js/jquery-ui-personalized-1.5.3.min.js"></script>
<script id="127.0.0.1:8000"
src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=XYZ"
type="text/javascript"></script>
<script
src="http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/release
/src/markermanager.js"></script>
<script>
$(document).ready(function(){
   el = document.getElementById( 'google-map' );
   map = new GMap2( el );
   map.setCenter( new GLatLng( 52.3176256, 0.850511316667 ), 13 );
   alert( 'before' );
   marker = MarkerManager( map );
   alert( 'before' );
});

2.
3.

What is the expected output? What do you see instead?

Expected: "before" and "after" alerts
Actual: no "after" alert - Firebug error "me.resetManager_ is not a function"

What version of the product are you using? On what operating system?

http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/release/src/
markermanager.js
FireFox 3.0.8, FireBug 1.3.3

Please provide any additional information below.

Have spent hours attempting various combinations and orders of loading
scripts and initialising (including window.setTimeout( init, 0 ) and using
Google Ajax API), and cannot bypass this error. When markermanager.js is
first parsed, MarkerManager exists (checked by stepping through Firebug),
but goes out of scope by the time it is referenced. Have also tried loading
markermanager.js from local path and adding test code directly to the
markermanager.js file - still fails.

Please help!!!

Original issue reported on code.google.com by jad...@gmail.com on 20 May 2009 at 8:03

GoogleCodeExporter commented 8 years ago
A complete, simpler test case showing same error:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb">
    <head>
    <script src="http://maps.google.com/maps?file=api&v=2&key=xyz"
type="text/javascript"></script>
    <script
src="http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/release
/src/markermanager.js"></script>
    <script>
function startup() {
   el = document.getElementById( 'google-map' );
   map = new GMap2( el );
   map.setCenter( new GLatLng( 52.3176256, 0.850511316667 ), 13 );
   alert( 'before' );
   marker = MarkerManager( map );
   alert( 'after' );
   }
   window.onload=startup;
</script>
    </head>
    <body>
    <div id='google-map'>
    </div>
    </body>
</html>

Original comment by jad...@gmail.com on 20 May 2009 at 8:23