Maps does not show up

Hello,
When I try to display a map, I get this : “Petit problème… Une erreur s’est produite
Google Maps ne s’est pas chargé correctement sur cette page. Pour plus d’informations techniques sur cette erreur, veuillez consulter la console JavaScript"
It means : "little problem… an error occured. Google Maps didn’t load properly on this page. For more technical data on this, see javascript console…

The console shows : ""Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error" js:34:315
“Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys” util.js:211:33
“Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required” util.js:211:33"

I failed to find the solution on the web. How can I make it work ? I got an API Key but can’t find out how and where to use it.

Best regards,
Rob.

PS : full console content attached

Under jjwg_maps, jjwg_markers, jjwg_areas modules search for the following line

 <script type="text/javascript" src="//maps.google.com/maps/api/js?sensor=false&libraries=drawing,geometry"></script>

Replace it with

 <script type="text/javascript" src="//maps.google.com/maps/api/js?sensor=false&key=<APIKEY>&libraries=drawing,geometry"></script>

Make sure to copy over the files in custom folder and make your changes there.

Thank you for your answer. I need a little more : where do I found theses files and what extension are they ?
Thanks a lot.

This is where the files need to be (edited as Arsalan indicated):

/custom/modules/jjwg_Areas/views/view.area_detail_map.php
/custom/modules/jjwg_Areas/views/view.area_edit_map.php
/custom/modules/jjwg_Maps/views/view.map_markers.php
/custom/modules/jjwg_Markers/views/view.marker_detail_map.php
/custom/modules/jjwg_Markers/views/view.marker_edit_map.php

copy the files over from /modules/… to /custom/modules/…

1 Like

Well… It does not work.
Any other idea ?
Thanks anyway,
Friendly,
Rob.

Hi,
I need to clear the question. I’m not naturally english speaking, so I’m liable to misunderstand english materials.
What I hope from Google map in SuiteCRM is to instanteneously get the map of the account or contact, provided that I entered the correct adress before.
See, opening the account/contact record, cliking on somewhere (button, link, whatever) and then displaying the localization of the guy and/or the route to him.
Is this the way google map in SuiteCRM is supposed to work ? I don’t want to get into lots of complex handling to finally realize it does not do what I expected.
Thanks for your help.
Friendly,
Rob. :wink:

As far as I’m aware, SuiteCRM does not show routes to a particular Contact/Account from the current location. It will only display the location mentioned in the address of those records, which can be easily accessed by selecting the records in listview and using the action menu dropdown option called “Map”.
This will display the selected records on a map, but not any routing from your current location.

OK, I’d like it anyway; quiet handy. I just have to find out how to make it work now !
Friendly,
Rob.

This will not help you zicrob for your routing/travel time issue, but for sake of completeness, to get the jjwg modules working, I had to also change the URL to the image repository because Google moved its repository to github.

I had to replace
google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m
with
cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/images/m

in these two files:
/custom/modules/jjwg_Maps/javascript/markerclusterer.js
/custom/modules/jjwg_Maps/javascript/views/view.map_markers.php

for the markers all to be loaded correctly.

more info here:
https://github.com/googlemaps/js-marker-clusterer/issues/55

Thank you very much.
It’s still not working though !
I think I’m gonna forget it.
thanks for helping anyway.
Friendly,
Rob.

just to throw it out there.

the sensor parameter is not required
https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required