On Mar 28, 4:50 pm, Vernon <[email protected]> wrote:
> Page for troubleshooting --->http://www.dragonmodz.net/test.html
>
> I'm working on a block for Concrete5 for setting up a google map and I
> wanted to add a service area option toggle to show the service area
> for a business. The problem I'm having is finding a working example of
> a show/hide toggle that is not bloated down with half a dozen other
> options using special widgets so I can figure out how it works.
>
> I've been able to figure out how to hide the circle but I can't figure
> out how to redraw it. To hide it I'm using
>
>     function hideServiceArea(){
>         serviceArea.setMap(null);
>     }
>
> I'm trying to redraw it using the following but it does not work.
>     function showServiceArea(){
>         serviceArea.setMap(map);
>     }
>
> Any help would be greatly appreciated.

Interesting. I would expect you would get an error, but I don't see
it.

The "map" variable is local to your "googleMapInit110" function:
    function googleMapInit110() {
...
   var map = new
google.maps.Map(document.getElementById('googleMapCanvas110'),
mapOptions);

if you remove the "var" from in front of it, it will initialize/use
the global map variable that you defined above and
serviceArea.setMap(map) (which runs in the global context) should
work.

  -- Larry

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to