Hi,
I would like to disable the settings fixed in admin/settings/gmap for the default center coordinates of Google map, expressed as a decimal latitude and longitude, separated by a comma and assign those values dynamically catching those values on server variables.
Exactly like this
in gmap_location_module:
if(!empty($_SERVER['GEOIP_LATITUDE'])&&!empty($_SERVER['GEOIP_LONGITUDE'])){
$longitude=$_SERVER['GEOIP_LONGITUDE'];
$latitude=$_SERVER['GEOIP_LATITUDE'];
$zoom=8;
}
elseif(empty($_SERVER['GEOIP_LATITUDE'])|| empty($_SERVER['GEOIP_LONGITUDE'])){
$longitude=46.785016;
$latitude=2.109375;
$zoom='6';
and assign this to the default node map variable
function _gmap_location_node_map_defaults() {
return array(
'macro' => '[gmap |id=nodemap|center=$longitude,$latitude|zoom=$zoom|width=100%|height=700px]',
'header' => 'This map illustrates the locations of the nodes on this website. Each marker indicates a node associated with a specific location.',
'footer' => '',
'markermode' => 1,
);
}
But this does'nt work, the settings in the page admin/settings/gmap still determine the center and zoom level....
Did someboby have one solution to perform this in my web site http://www.ivigi.fr?
Thanks
Comments
Comment #1
podarokrelease unsupported
feel free to open issue against latest 7.x dev