Skip to main content plot locations on initialization of jsp

1 reply [Last post]
Joined: 2008-02-11


I am creating application, which shows office locations of the company on page.
On a jsp I have - widget. on initialization of page, I am calling Javascript method (defined in glue.js) to create markers on map.

This works in Firefox, but in IE this does not work, when the page is initialized. If you put one button and call this javascript on click of that, it marks the locations on map.

Lines after this are not executing in javascript in IE, seems like jmaki has still not loaded the map in browser.
var _map = jmaki.getWidget("locationsMap").map;

But as firefox is loading the map, it is getting map object and is able to create marks for locations.

Is there any callback method, or how can i make sure the map is loaded than only call the initialize method to mark the locations on map.
OR if you can guide me for any other approach, would be great.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-02-10

Hi Ketan,

In your glue code add a subscriber to the following topic:

This fires when all the widgets are loaded. In the function of the subscriber you can then proceed with the initialization. So

jmaki.subscribe("/jmaki/runtime/loadComplete", function(args) {
//init code here

Let me know if you have any questions.