Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Google map APi problem

Google map APi problem 26 Sep 2016 07:00 #37525

  • micker
  • micker's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 860
  • Karma: 1
  • Thank you received: 24
en fait c'est vraiment tout con
toi tu ajoute ce code :
<?php
$map_style = trim($params->get('mapstyle',''));
if ($map_style)
{
 json_decode($map_style);
 if (json_last_error() == JSON_ERROR_NONE)
 {
  // ALL good, user gave good style
 }
 else
 {
  $map_style = null;
  echo '<div class="alert alert-warning"> Bad map styling was set for Module with ID #: '. $module->id.'</div>';
 }
}
?>
et dans ton script
 var map = new google.maps.Map(document.getElementById('map'), {
    ...
    styles:[<?php echo $mapstyle; ?>],
    ...
  });
puis un champs dans l'admin pour charger le code json de snazzy
The following user(s) said Thank You: ced1870

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

Google map APi problem 26 Sep 2016 09:34 #37544

  • ced1870
  • ced1870's Avatar
  • Offline
  • Administrateur
  • Administrateur
  • Posts: 25090
  • Karma: 427
  • Thank you received: 3155
merci pour le code et les explications, j'ai mis ça dans la todolist de pagebuilder ;)
Joomlack Webmaster and Developer

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

Google map APi problem 05 Oct 2016 13:21 #37830

  • ced1870
  • ced1870's Avatar
  • Offline
  • Administrateur
  • Administrateur
  • Posts: 25090
  • Karma: 427
  • Thank you received: 3155
intégré dans la version en cours :)
Joomlack Webmaster and Developer

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

  • Page:
  • 1
  • 2
Time to create page: 0.177 seconds

Fast and powerful creation, customizable and responsive.

Read More

Qui est en ligne

We have 232 guests and no members online