Skip to main content
1-Visitor
October 7, 2015
Solved

GoogleMap widget is not loading at the opening Mashup - need to reload, do you have solution ? (tutorial n°2)

  • October 7, 2015
  • 3 replies
  • 8443 views

Hi all,

 

I'm currently working on training #2 "Adding extensions to enhance Thingworx Functionality" and i have an issue with the GoogleMap widget.

I have imported the extension on my platform but when i view the mashup (VendingMain), the googlemap widget is not displayed. I use Chrome explorer as recommanded.

 

The alternative solution that I found is : click on "reload" button on the mashup screen, and only then the GoogleMap appears.

But it's not a clean way to do. Does somebody have a solution or an idea?

 

Gaëlle

 

 

    Best answer by ibanham

    Hi

    I think it’s a side effect of the way the course is delivered. You initially load the mashup without the Google extension loaded and then load the extension and refresh the mashup. If you load the extension before you first visit the mashup, it all works as it should.

    The course material is effectively telling you to do something you wouldn’t actually do in real life. The aim of that lesson is to show what benefit extensions bring in a graphical way. “here’s a boring area of grey space”, “Wow, it’s now an interactive map!”

    Regards

    Ian

    3 replies

    5-Regular Member
    October 7, 2015

    Gaelle, one way to check this would be via browser tools/ dev tools. Please enable them (usually F12), and check the Console tab and Network tab for any errors. Do post them here if anything pops up. Also, have you tried loading that in another browser, say Firefox?

    gpaillot1-VisitorAuthor
    1-Visitor
    October 7, 2015

    Hi Aanjan,

    Thanks for your answer.

    I tried to launch the mashup in :

    - Internet Explorer : it doesn't work, even the 'reload' button doesn't fix it

    - Firefox : I dont know why, but it's OK at the first load

    I apply your advise and press F12 in Chrome and re-launch the mashup.

    There are errors in the console :

    http://localhost/Thingworx/Mashups/VendingMain/Services/RequestEdit?Accept=application%2Fjson-compressed&Content-Type=application%2Fjson Failed to load resource: the server responded with a status of 409 (Conflit)

    maps.googleapis.com/maps-api-v3/api/js/22/7/intl/fr_ALL/main.js:7 Uncaught RangeError: Maximum call stack size exceeded

    maps.googleapis.com/maps-api-v3/api/js/22/7/intl/fr_ALL/main.js:7 Uncaught RangeError: Maximum call stack size exceeded

    454index.html:190 Uncaught TypeError: Cannot read property 'x' of undefined

    http://localhost/Thingworx/Mashups/VendingMain/Services/RequestEdit?Accept=application%2Fjson-compressed&Content-Type=application%2Fjson Failed to load resource: the server responded with a status of 409 (Conflit)

    main.js:7 Uncaught RangeError: Maximum call stack size exceeded

    Do you know how I can fix it ?

    5-Regular Member
    October 7, 2015

    The 'Uncaught RangeError: Maximum call stack size exceeded' usually points to an out of bounds error or invalid latitude/ longitude configuration. Do you have any points or markers set in this widget, or is there nothing bound and you are just trying to view a map without any data?

    1-Visitor
    October 14, 2015

    I'm guessing this is the "VendingMain" mashup. Try swapping between the various tabs/menu options of the mashup. I have found doing this can get the map to load. A Shift + F5 reload of the mashup can sometimes help too.

    gpaillot1-VisitorAuthor
    1-Visitor
    October 14, 2015

    Hi Ian, thanks for your answer. Yes i'm talking about the "VendingMain" mashup. Thanks for the palliative, it works.

    However, I was looking for a way to load the map at the first time, because it's unacceptable to deliver a solution and explain to the customer that he has to reload the page to see the map !

    Hope that i'm just unlucky for this eLearning lesson

    ibanham1-VisitorAnswer
    1-Visitor
    October 14, 2015

    Hi

    I think it’s a side effect of the way the course is delivered. You initially load the mashup without the Google extension loaded and then load the extension and refresh the mashup. If you load the extension before you first visit the mashup, it all works as it should.

    The course material is effectively telling you to do something you wouldn’t actually do in real life. The aim of that lesson is to show what benefit extensions bring in a graphical way. “here’s a boring area of grey space”, “Wow, it’s now an interactive map!”

    Regards

    Ian

    1-Visitor
    October 14, 2015

    Ive had a similar issue with it not loading.  It loads correctly the first time I view my contained mashup, but if I navigate to another contained mashup(using a menu bar in a master) the map no longer displays correctly.  Do I need to somehow reload the map extension? 

    1-Visitor
    November 15, 2016

    hi Brian,

    I am also having this issue. Just wondering if you ever found a solution to fix this?

    Thanks

    1-Visitor
    November 15, 2016

    Hey kdonald,

    My issue was that I didn't have the table of coordinates pointing to the correct value on the widget.  It would work one time, but it had issues reloading. Once I found that I had bound to the incorrect property, I switched it and everything worked just fine.  Here is the video on the maps widget in case you havent seen it yet:

    https://www.youtube.com/watch?v=5R2ms0reRe4

    Hope this helps!