Sure you can: 
http://code.google.com/apis/maps/documentation/v3/overlays.html#CustomOverlays

Now, these aren't "custom controls" yet. But you can get them on
specific layers of the map by attaching them in the onAdd function:
var panes = this.getPanes();
panes.overlayImage.appendChild(div);

If you look at the documentation for panes, there are predefined
layers there that you can attach to. If you want it just floating on
top of the map, like the other controls, you may just want to append
it to the map.getDiv(). That's where the other controls are. Then just
give it CSS positioning ("top: 0; left: 0;" for top-left, etc.).

The problem with this is that since they aren't controls, the other
controls don't know anything about what you're trying to do. Since we
only have the gimped control-positioning (http://code.google.com/apis/
maps/documentation/v3/controls.html#ControlPositioning) we can't give
the controls a specific position. The workaround is to go through the
map-div and grab the right control div. This is really hacky though,
especially since the control divs get added after the overlays, and as
far as I can tell, there is no event to hook into that fires off after
the controls are loaded. This API can be frustrating at times!

I am currently using a "control" that sits in the top left of the map.
This is the control: http://nickspacek.github.com/jQuery-PlacePicker/
It requires some more code to make it an overlay, which isn't
demonstrated there, but is fairly easy.

Nick

On Jan 4, 1:23 pm, Илья <lisichkin.i...@googlemail.com> wrote:
> Hi,
>
> I'm new to Google Maps API.
> I have a question is there ability to create controls and place them
> on map (for example like in Map Maker to edit the map).
> I know that in V2 we can create one. But what about V3? Any
> guidelines? Examples?
>
> Thanks in advance,
> -Ilya.
-- 
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 google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Reply via email to