The current Google Maps widget allows for just one map per page. Fine for most sites, but a website I'm currently building requires two (one per office) on their contact page. Hence, this amendment.
Allow for more than one Google Maps per page.
Wouldn't it be easier to add the Google Map code in a page chunk (markdown)?
At least if you only use the maps on a single page. I think the widgets should rather be used for stuff in a sidebar, which you'll see on almost every page.
And last but not least you could avoid having 2 GeoCodeer calls for each page visit.
Due to the client requiring two maps on their Contact page, the problem I had was to ensure each map's canvas element (#gmap_canvas) had a unique id.
Maybe use something like this ?
$instance_id = '_' . ((isset($options['widget'])) ? $options["widget"]["instance_id"] : rand(2000,3000));
Yes, that is more efficient, and in keeping with the ethos of PyroCMS.