<?php
/***************************************************************************
- * Copyright (C) 2003-2011 Polytechnique.org *
+ * Copyright (C) 2003-2013 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
static public function buildStaticMapURL($latitude, $longitude, $color, $separator = '&')
{
+ if (!$latitude || !$longitude) {
+ return null;
+ }
+
$parameters = array(
'size' => '300x100',
'markers' => 'color:' . $color . '|' . $latitude . ',' . $longitude,
'zoom' => '12',
'sensor' => 'false'
);
- global $globals;
return Platal::globals()->maps->static_map . '?' . http_build_query($parameters, '', $separator);
}