Google Maps causing problem when showing in a listview (google.maps.LatLng is not a constructor)t?

0
Hi guys, When I after login directly show a list view with a google maps in it, it will keeps loading (the dotts). If I check a single object on a other page with just that object in dataview i see the maps. When I after this try to open the listview now all gets loaded. So the problem is that it not directly loads the widget and keep loading (no logging), but when opened a single opject and seen a map, the list is shown and the maps are visible.....what do I wrong? (tried also without security and keeps same) In the console I found this error: mxui.js?636075918328289005:29 mendix.sys.Data.get: error in error handler for xpath //Barge.LocalJsonObject[not(Afgerond)] : mxuiwidgetDataView1.applyContext: Error: GoogleMapswidgetGoogleMaps1.applyContext: Error: GoogleMapswidgetGoogleMaps_1.applyContext: TypeError: google.maps.LatLng is not a constructor (webcore.datasource.XPathSource)(anonymous function) @ mxui.js?636075918328289005:29
asked
5 answers
1

Hi Rapido,

I my case this happens when 2 google maps are on 2 tabs of a tabcontainer.

answered
1

Each google map widget is retrieving the Maps javascript library from Google. So a Listview with 5 Google Maps widgets means that 5 the same libraries are retrieved from Google, but Google is preventing that from happening. Google has restricted that a website the Google javascript library retrieves multiple times. The website should retrieve the library 1 one and reuses it for each widget.

That is why a Listview with 1 items works and multiple items don't. Is it possible to have 1 Google Maps widget and put all addresses in that are present is the Listview?

On the other hand I suggest you report a ticket at Mendix support to check if they can manage this issue.

answered
1

The Mendix team (Jelte) released a new version in which this specific issue is fixed. See the App Store for the newest update of 30-11-2016

answered
0

I have the same problem (I put the widget in a template grid). The funny thing is that it happens only the first time you enter the page. After that it works fine. A little bit scandalous that the modeller still doesn't have a built-in maps item!

answered
0

I have the same thing and also because the widget is loaded twice into the DOM because two instances are available in different tabs of a tabcontainer. Making sure only one is available will solve the issue. I will file a ticket with Mendix.

 

EDIT 2016-10-27: Ticket is filed with Mendix. I will post the outcome in this thread once answered.

EDIT 2016-10-28: I added a test project to my ticket, in which the error was reproduced by Mendix. It has been sent to the R&D department for a fix.

 

EDIT 2016-12-02: The Mendix team (Jelte) released a new version in which this specific issue is fixed. See the App Store for the newest update of 30-11-2016

answered