Me too!!
This is a great feature
Hello,
I managed to find and add selectable
var map = AmCharts.makeChart(“…”,{
areasSettings: {
selectable: true
}
});
in interactive-map.php
Also found where to change properties of circle ( set it to hidden, easier than to remove it)
But I cant find where to change action listener for areas or where it is fireing event for circle.
Please help
Hi,
Found a way to do it:
Comment line 147: "images" => $images_array
Then move (or copy) lines 131 to 135:
"custom"=> array( "desc"=> ((!$this->disabled_flag) ? '<div class="phoca-flagbox"><span class="phoca-flag '. strtolower($country_code) .'"></span></div>' : '') . get_the_content() )
to the $areas[]
array on line 116.
Hope this helps!
Did anyone figure this out? how to make the whole country clickable instead of the bullet points?
what rjpedrosa has posted, only makes the bullets dissapear.. the country is not clickable anymore
Check out my post
var map = AmCharts.makeChart(“…”,{
areasSettings: {
selectable: true
}
});
if u want give me an email to send you whole file
Yes, mine was an addition to Tajcci’s post. You need the selectable: true
in the areaSettings
options.
Tajcci, did my solution work for you?
yes it did, thanks a lot! I need to find solution to make multi country areas, but I guess i need to rewrite whole plugin 😀 (i need to split world map in zones).
Also i am trying to bypass popup with country details and to redirect directly to country’s page.
Hi, aah, makes sense now and it works 🙂 THANK YOU GUYS! and for those who don’t want the map to zoom out everytime, just comment map.zoomOut:
function zoomOut () {
// map.zoomOut();
}
Tajcci, to bypass the popup just do it in the onregionClick(country)
function.
Just add on $post_link = get_permalink($id);
before the areas[]
array and then on that array add a new entry url in the custom
property like
"custom"=> array(
"desc"=>
((!$this->disabled_flag) ?
'<div class="phoca-flagbox"><span class="phoca-flag '. strtolower($country_code) .'"></span></div>' : '') . get_the_content(),
"url" => $post_link )
Finally replace the contents of the onregionClick(country)
function by
var obj = country.mapObject;
window.location.href = obj.custom.url;
Haven’t tested but should be something like this.
I had added the setting to selectable: true and now how I can make the onregionClick(country) to do the same actions when clicking on whole country?
Thank you for your post rjpedrosa.It solved my issue
I would like to have whole country clickable and would like to hide/delete that circle that is clickable now.
Send me an email the modified file.
Thank you.
It was already answered here, but to recap:
Change to this
var map = AmCharts.makeChart("...",{
areasSettings: {
selectable: true
}
});
in interactive-map.php
On the same file
Comment line 147: "images" => $images_array
Then move (or copy) lines 131 to 135:
"custom"=> array( "desc"=> ((!$this->disabled_flag) ? '<div class="phoca-flagbox"><span class="phoca-flag '. strtolower($country_code) .'"></span></div>' : '') . get_the_content() )
to the $areas[]
array on line 116.
Hope this helps!
Wherabouts do I need to place the following;
var map = AmCharts.makeChart("...",{
areasSettings: {
selectable: true
}
});
I know it needs to go into interactive-map.php, but where? and in place of what?
Thanks
I tried.
This does not work.
Please send the corrected file. interactive-map.php