99 Posts
SimonD
8 years ago
14
Topic

Hello,

I've some trouble to display a google map with seb_map template.

I've created a form and content type with a longitude field (text), a latitude field (text) and a geocode field (address to coordinate set to concatenate).

Address to coordinate plugin seems to work correctly because longitude and latitude fields are populated after saving the form.

Then, I've created a list from my previously described content type, assign seb_map template, set the template parameter Mode to Coordinates and assigned longitude an latitude fields in their respective positions.

I've assingned 2 text fields In Infowindow position.

When trying to display the map, the first probleme was an error saying that I need an API KEY.
So I've struggled a bit with the Google developper site to create one and after added the following code before my </body> tag, I could display the map:
<script src="https://maps.googleapis.com/maps/api/js?key=api_key" type="text/javascript"></script>

I'm not sure I've done it right: in Seblod demo site It seems that their is no code like the previous one.

Now I'm facing the following problem: when clicking on a marker, no popup is displayed.
In the Firefox consol there is an error message:

InvalidValueError: setPosition: not a LatLng or LatLngLiteral: in property lat: not a number
_.ab() js:32
_.wb() js:36
_.sc/<() js:47
_.r.set() js:95
_.r.internalAnchorPosition_changed() js:110
qb() js:34
_.C.prototype.bindTo() js:96
Be() js:68
_.r.internalAnchor_changed() js:109
qb() js:34
qb() js:34
_.r.set() js:95
_.Ce.prototype.open() js:111
JCck.More.SebMap.setMarker/<() centres:77
_.B.trigger() js:93
G_.prototype.handleEvent() marker.js:49
_.Gf.prototype.Zd<() common.js:177
_.r.Oe() common.js:230
_.r.Dj() common.js:229
_.B.trigger() js:93
_.uw/</<() common.js:124
_.B.trigger() js:93
_.r.Rj() common.js:196
hb/<()

My config:
Joomla 3.5.1
Seblod 3.8.1
address to coordinate plugin and seb_map template are the latest ones.

Thank you for your help.

Regards
Simon

Get a Book for SEBLOD
99 Posts
SimonD
8 years ago
3
Level 1

Hello,

I've tried ta change the template for the list.

seb_blog is working as excpected.

I've updated Seblod to the last version: 3.8.4. Problem is still here: info windows do not open when clicking a marker.

You can see what happens live here:

http://www.staminic.com/test/sfgmtc2/index.php/la-societe-francophone-de-greffe-de-moelle-et-de-therapie-cellulaire/centres

Thank you for your help

Regards

Simon

4229 Posts
Kadministrator
8 years ago
2
Level 2

You should not add what you have added as google scripts are already added, so you end up with 2 same scripts causing conflicts.

We will fix this properly in the next release, meanwihle  change this line of index.php of seb_map template

$doc->addScript( $scheme.'://maps.googleapis.com/maps/api/js?sensor=false&language='.$map_lang );

to (replace YOURKEY with your actual key)

$lib    =  $scheme.'://maps.googleapis.com/maps/api/js?sensor=false&language='.$map_lang&key=YOURKEY;
if ( method_exists( 'JCckDev', 'addScript' ) ) {
   JCckDev::addScript( $lib );
} else {
   $doc->addScript( $lib );
}
$doc->addScriptDeclaration( $js );
99 Posts
SimonD
8 years ago
1
Level 3

Hello Klas,

Many thanks for your help.

Just a little adjustment. It is working now but with the following correction:

In index.php of seb_map I've replaced the line 196 by the following code:

	$lib   =   $scheme.'://maps.googleapis.com/maps/api/js?language='.$map_lang.'&key=my_google_api_key';

Quotes are needed around the last part otherwise there is a syntax error and the following code suggested is not needed because it is already there in seb_map 1.3 . 

One more question: as a paid template, I've expected that seb_map appears in the Seblod updater. But is not. Is there something wrong with my config?

Again thank you for your support

Regards

Simon

4229 Posts
Kadministrator
8 years ago
0
Level 4

Hi, yes, sorry, my mistake. Yes,template should appear in updater.

179 Posts
carin
8 years ago
2
Level 1

I cant find the field to add my API key to the maps template. Is it within the template?

4229 Posts
Kadministrator
8 years ago
1
Level 2

Please read the above thread again, there is no such setting yet, you need to modify files.

179 Posts
carin
8 years ago
0
Level 3

... really? There is still no update available for the map extension? But SEBLOD are aware that the API key is now mandatory? Hence everyone who uses that map has to modify files even though the assumed minority of users has never touched any line of code, so they are left hanging dry, not to mention how unconvinient editing files is that get overriden on every update.

4229 Posts
Kadministrator
8 years ago
0
Level 1
4229 Posts
Kadministrator
8 years ago
5
Level 1

New version that includes API key has been published. You need to insert API key in the Seblod templates manager.

548 Posts
joomleb
7 years ago
4
Level 2

Hi guys, 

adding credentials to my Google Project to have back the Google API Key to set into the Address to Coordinates Field Plugin:

Please, Which one I have to add from the Google Map Libraries ?

Is the Google Maps Geocoding API ?

548 Posts
joomleb
7 years ago
0
Level 4

Many Thanks!

548 Posts
joomleb
7 years ago
1
Level 4

Hi Klas, hi guys, 

created and setted. Run, but sometimes editing a member and saving (in the backend, I don't know what's happening to the users in the front end) I have back this Error message:

0 You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console: https://console.developers.google.com/apis/credentials?project=_

But it is impossible (I have 200 users on that site) that I'm over the Users quantities of the standard API:

  • 2,500 free requests per day, calculated as the sum of client-side and server-side queries.
  • 50 requests per second, calculated as the sum of client-side and server-side queries.

Please, May be, Am I forgetting anything ?!?

Do anyone had experienced the same ? 

4229 Posts
Kadministrator
7 years ago
0
Level 5

Judging by the error you forgot to add your key somewhere

Get a VIP membership