EB 3.3.0 Error creating new location Uncaught SyntaxError: Unexpected token ,

  • Russell Noble
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
6 years 1 day ago #112361 by Russell Noble
Hi,
from the front end getting js errors when trying to add a new location using EB 3.3.0.

add-location?layout=popup&tmpl=component:382 Uncaught SyntaxError: Unexpected token ,
Code:
// Create the map object map = new google.maps.Map(mapDiv, { center: new google.maps.LatLng(,), zoom: 10, mapTypeId: google.maps.MapTypeId.ROADMAP, streetViewControl: false });

Issue appears to be the center LatLng()

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
6 years 1 day ago #112363 by Tuan Pham Ngoc
Hi Russell

Go to Events Booking -> Configuration, there is a config option called Center coordinates. Enter a coordinates there (center of the map) and it should be fine

Regards,

Tuan
The following user(s) said Thank You: Russell Noble

Please Log in or Create an account to join the conversation.

  • Russell Noble
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
6 years 1 day ago #112364 by Russell Noble
I should point out no default centre coordinates had been entered in the configuration page, perhaps this should be checked and if no value is provided then at least provide 0,0 as a default so a syntax error doesn't occur.

Please Log in or Create an account to join the conversation.

  • Russell Noble
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
6 years 1 day ago #112365 by Russell Noble
Thanks, found that just before you replied. Great service as always - just posted suggestion to maybe set default values of 0,0 so if no config values are provided it doesn't cause the js to fail?
cheers!

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
6 years 1 day ago #112366 by Tuan Pham Ngoc
It's actually not needed. The system try to detect default coordinates base on default country, maybe in your site, it could not be detected for some reasons and that's why entering it manually is needed

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc