hi,
we are working on a multi-themed site, logo and colors are changein in relation to accsesing url.
im looking for a way to change the maps custom marker image to change it accordingly to the accsesing url
thanks for your effords and sorry for bad englisch
henry
alternatively, if you can point me to a filter to change the custom marker image url programmaticly that would also be absolutly fine
thanks
Hi,
You can use this code to overwrite the marker programmatically:
add_filter('shortcode_atts_av_google_map', 'avf_shortcode_atts_av_google_map', 10, 4);
function avf_shortcode_atts_av_google_map($out, $pairs, $atts, $shortcode) {
$out['content'][0]['attr']['marker'] = 2759;
return $out;
}
0 is the number of the first map. If you’ve i.e. two maps you could use this code to change the marker of the second map:
$out['content'][1]['attr']['marker'] = 2759;
2759 is the number of the attachment id. You need to replace it with the id of an attachment which is saved on your server.
Best regards,
Peter