including external script results in error when trying to call a method

Tagged:
  • Klaus79
    Participant
      5 years, 2 months ago #19961

      I’ve included some libraries for maps (HERE service).

       

      and afterwards added to my application

       

      After deploying I get following error:

      is there an error in the way adding the external libraries to the app?

      Dinkel
      Moderator
        Has successfully completed the online course Introduction
        Has successfully completed the online course Intermediate (200)
        Has successfully completed the online course Advanced (300)
        Has successfully completed the online course Basics (100)
      5 years, 2 months ago #19988
      Up
      1
      Down
      ::

      I mean the order of loading the library parts. Look at this code snippet:

      addScript('js/mapsjs-core.js', 'mapsjs-core');
      addScript('js/mapsjs-mapevent.js', 'mapsjs-mapevent', ['mapsjs-core']);
      addScript('js/mapsjs-service.js', 'mapsjs-service', ['mapsjs-core']);
      addScript('js/mapsjs-ui.js', 'mapsjs-ui', ['mapsjs-core',  'mapsjs-mapevent', 'mapsjs-service']);
      addStyle('css/mapsjs-ui.css');

      I don’t know if this is the right order because I don’t know the library.

      If it’s a problem of generating the code then try deploying and look into index.html. Your library should be referenced there.

      Dinkel
      Moderator
        Has successfully completed the online course Introduction
        Has successfully completed the online course Intermediate (200)
        Has successfully completed the online course Advanced (300)
        Has successfully completed the online course Basics (100)
      5 years, 2 months ago #19967
      Up
      0
      Down
      ::

      I think the problem is the order of loading your library.
      Look at the documentation to learn how you control the order loading the library.

      Klaus79
      Participant
        5 years, 2 months ago #19968
        Up
        0
        Down
        ::

        I did it as it is described in documentation.

        Problem is that name of crested library (HERE_MAP) can’t be found so it can’t be the order of included libraries.

        Which order do you mean?

        I did not find any generated code where here_map is included/loaded in code view

        Klaus79
        Participant
          5 years, 2 months ago #19996
          Up
          0
          Down
          ::

          it is working with the optional [], now.

          thx.

        Viewing 5 posts - 1 through 5 (of 5 total)

        You must be logged in to reply to this topic.