I can't get Google Physical Map and Google Street Map varients to appear as baselayers... I've tried a number of combinations...
I have the baselayer_options_separator = "|"
[map baselayers="google,yahoo" zoom="4" /] // this only shows google and yahoo default baselayers
[map baselayers="google|physical,yahoo" zoom="4" /] // doesn't work
[map baselayers="google|google - physical,yahoo" zoom="4" /] // doesn't work
I was looking at the code in openlayers.mapclient.inc, specifically the get_baselayers function, and I'm uncertain how to format my baselayers string for physical, streets, etc. to parse correctly. I did a quick hack and got them working, but I messed up the $baselayers[$i]['baselayer_options'] string... I pasted what I believe is the relevant code below...
foreach($baselayers_arr as $baselayer_info) {
$tmp = explode($baselayer_options_separator, $baselayer_info);
$baselayer_variant = $tmp[0];
$baselayer_options = (count($tmp) > 1) ? array_splice($tmp, 1) : array();
$tmp = explode('-', $baselayer_variant);
$baselayer_vendor = $tmp[0];
$variant = (count($tmp) > 1) ? strtolower($tmp[1]) : 'default';
$baselayers[$i]['baselayer_vendor'] = $baselayer_vendor;
$baselayers[$i]['variant'] = $variant;
$baselayers[$i]['baselayer_options'] = get_baselayer_options($baselayer_options);
$i++;
}
Please help!
Comments
Comment #1
jpulles commentedYou could have a look at http://aardbodem.nl/?q=node/56. This example shows that the format is something like vendor-variant|option_1=value_1|option_n=value_n,etc. In a settings page you can change the separators if you would prefer that.
I hope this helps you.
Comment #2
dpw commentedYes, thanks for the example.
I've been working with this module for the past few days and it is working quite well. I have another question, but I'll open a new support request.
Comment #3
jpulles commentedThanks, that fixes this one.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.