tags:

views:

740

answers:

0

I'm trying to create a gray "frame" (see pic below) around a google map, to try to convey the concept of an area of focus, as oppose to a point (which is usually represented with a marker). Note that this is not an overlay, that is, the gray "frame" should not move when you drag the map.

Edited: image link added

http://i680.photobucket.com/albums/vv170/bustrofedon_bucket/inage1.jpg

It appears that only option is to "subclass" GControl to create a custom control. I have 3 questions

1) First of all, is GControl subclassing the best course of action?

2) In my example, the canvas (div) where map renders can change its size (i.e is not fixed width). Do I have to delete and add custom control when canvas changes size? See docs http://code.google.com/apis/maps/documentation/controls.html#Custom_Controls on how to create a custom map control.

3) Now, how to do it. Naively, I thought I could create a table with 3 columns and 3 rows, and set display: none for the cell in the middle. But that doesn't work. I've also experimented with clipping, that didn't work either. My css skills are quite lacking, so there must be way to do this more elegantly than adding four rectangular gray divs. If I wanted to add an inner border, with divs, I would need to paint 8 then. In a nutshell, what's the best way to create a "hollow" rectangle?

Thanks P.S. This is my first entry to StackOverflow. Just discovered it. It's impressive how well SO is put together.