cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

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

gpaillot
1-Visitor

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

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

 

 

ACCEPTED SOLUTION

Accepted Solutions
ibanham
12-Amethyst
(To:gpaillot)

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

View solution in original post

19 REPLIES 19
Aanjan
12-Amethyst
(To:gpaillot)

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?

gpaillot
1-Visitor
(To:Aanjan)

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 ?

Aanjan
12-Amethyst
(To:gpaillot)

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?

gpaillot
1-Visitor
(To:Aanjan)

Hi,

I have points set in this widget, and they are displayed on the GMAP in Firefox

I have imported the entities, then the data and after the GoogleMap extensions.

Aanjan
12-Amethyst
(To:gpaillot)

Just to test, can you create a new Mashup with just the GoogleMap widget? Don't add any data, just a plain and simple Mashup with this widget. Now, does this Mashup load the first time or do you have to reload it? Also, just so I'm clear about the issue, it loads the first time on Firefox, but you need to reload for Chrome, correct?

gpaillot
1-Visitor
(To:Aanjan)

I did your test, and my new Mashup is loading the first time on IE, Chrome and Firefox \o/.

It seems to be an issue with the data/mashup configuration, but I've just imported the tutorial package for exercises.

For the issue, yes it is what you're describing, and also that on Internet Explorer it doesn't load even if I reload the page.

Aanjan
12-Amethyst
(To:gpaillot)

One last question - What is your ThingWorx platform version and your browser version (specifically Chrome)? I'll load the tutorial package here locally via Chrome in the platform version you currently have to see its behavior. Thanks!

gpaillot
1-Visitor
(To:Aanjan)

Hi Aanjan,

I use ThingWorx platform Neo4j 6.5 and my Chrome browser is on Version 45.0.2454.101 m.

Thanks again for your help.

Aanjan
12-Amethyst
(To:gpaillot)

Gaelle, with regards to IE, do you have the compatibility mode enabled? This can be accessed in IE by clicking on the gear icon on the top right and selecting 'Compatibility View Settings'. Uncheck both 'Display intranet sites in Compatibility View' and 'Use Microsoft Compatibility lists' and reload the Mashup. From a Chrome standpoint, unfortunately it looks like it has something to do with the recent Chrome update, as there are changes with java and java security handling.

gpaillot
1-Visitor
(To:Aanjan)

Hi,

I try with IE after unchecked the 2 options of « Compatbility View Settings ».

I close and re-launch IE, the mashup doesn’t launch at the first time, i’ll have to click on « reload » button and it’s OK.

Just like the behaviour on Chrome using … it’s a mystery ! :-)

Aanjan
12-Amethyst
(To:gpaillot)

Yes it is ... Can clear your cookies and cache (on both Chrome and IE), and then view the Mashup again? Sorry to have you test multiple times; I'm not able to reproduce the issue you're seeing on my end.

gpaillot
1-Visitor
(To:Aanjan)

Nothing changes

Never mind, thanks again for all your help Aanjan !

ibanham
12-Amethyst
(To:gpaillot)

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.

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

ibanham
12-Amethyst
(To:gpaillot)

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

Hello Ian,

I am facing same issue and when I search more on this I found this discussion.

As per your suggestions I load the extension first as soon as I deploy war file (without even creating test user.)

But still I GoogleMap widget is not working for me. In my first attempt, atleast map was displayed for fraction of second. But later it is not all loaded.

Am I missing anything here or doing anything wrong?

Any thoughts. Plz..

- Shirish

byutz
12-Amethyst
(To:gpaillot)

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? 

kdonald
1-Visitor
(To:byutz)

hi Brian,

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

Thanks

byutz
12-Amethyst
(To:kdonald)

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!

Announcements


Top Tags