Loading ...
Sorry, an error occurred while loading the content.

Re: 'YImage' is undefined

Expand Messages
  • αlexander
    YImage is a class that is defined inside of the Map class. If you re seeing errors relating to YImage being undefined they are probably being caused by
    Message 1 of 2 , Oct 12, 2010
    View Source
    • 0 Attachment
      YImage is a class that is defined inside of the Map class.

      If you're seeing errors relating to YImage being undefined they are probably being caused by attempting to use the map before all the required support files have been loaded/parsed.

      Make sure that the script to include Maps is above all scripts that reference maps... E.g. on an HTML page:

      <script type='text/javascript'>
      //unsafe to make references to Y Maps up here
      </script>
      <script type="text/javascript" src="http://api.maps.yahoo.com/ajaxymap?v=3.8&appid=YD-eQRpTl0_JX2E95l_xAFs5UwZUlNQhhn7lj1H"></script>

      ....

      <script type='text/javascript'>
      //okay to work with Y Maps down here.
      </script>

      The support files should all be cached by the browser, so reloading the page a couple of times may be allowing the browser to download the files on one load, then displaying the maps okay on the next load as everything is already in the local cache.

      ~Alexander

      --- In yws-maps@yahoogroups.com, "ck14085" <ck14085@...> wrote:
      >
      > We are getting the following error in Internet Explorer when attempting to use the Yahoo Maps API.
      >
      > Message: 'YImage' is undefined
      > Line: 88628522
      > Char: 28
      > Code: 0
      >
      > We are calling the map from an IBM Cognos 8 report. The strange thing is that if we refresh the browser a couple of times the map will load. Does anyone have any experience on this end of things?
      >
      > I have used the API javascript from a basic HTML page, and it seems to work. So perhaps the tool is interfering somehow.
      >
      > If you have any ideas, please let me know. Thank you!
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.