Hi,
i have the same question as edu_sanzio : how to display different icons for 2 or more locations ?
My locations’informations are attached to 3 differents pages, only one google maps of its is displayed on my sidebar.
I’have tried to add the add_filter fonction but I don’t know where exactly to place it.
I use a custom field googlemap to know which icon should be displayed.
This keyword googlemap contains a character string with display ‘s parameters whichs are record in a table.
my php code :
`function add_info_to_pronamic_google_maps ($item) {
global $post;
return get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_DESCRIPTION, true);
}
if(get_post_meta($post->ID, ‘googlemap’, true))
{
$bloginfo = get_bloginfo( ‘wpurl’, ‘raw’ );
$googlemap= get_post_meta($post->ID, ‘googlemap’, true);
$googlemapId=explode( ‘,’ ,$googlemap);
$i=0;
while($i<count($googlemapId))
{
if($googlemapId[$i]==0){
switch($i){
//width
case ‘0’:
$googlemapId[$i]=280;
break;
//height
case ‘1’:
$googlemapId[$i]=240;
break;
//map_type_id
case ‘2’:
$googlemapId[$i]=’roadmap’;
break;
//zoom
case ‘3’:
$googlemapId[$i]=14;
break;
//latitude
case ‘4’:
$googlemapId[$i]=’-4.629089′;
break;
//longitude
case ‘5’:
$googlemapId[$i]=’55.456436′;
break;
//icon
case ‘6’:
$urlIcon=$bloginfo.’/wp-content/uploads/’.$googlemapId[$i];
break;
}
}
$i++;
}
if(function_exists(‘pronamic_google_maps_mashup’)) {
pronamic_google_maps_mashup(
array(
‘post_type’ => ‘page’
) ,
array(
‘width’ => $googlemapId[0] ,
‘height’ => $googlemapId[1] ,
‘map_type_id’ => $googlemapId[2] ,
‘zoom’ => $googlemapId[3] ,
‘latitude’ => $googlemapId[4] ,
‘longitude’ => $googlemapId[5] ,
‘fit_bounds’ => false,
‘marker_options’ => array(
‘icon’ => $urlIcon
)
)
);
add_filter (Pronamic_Google_Maps_Filters::FILTER_MASHUP_ITEM, ‘add_info_to_pronamic_google_maps’);
}
}`