Ciul,

I'm REALLY liking your Google maps classes.  Nice work!

One thing I noticed with your various overlays (polygons, polylines,
markers, . . .): in Google Maps API V3, the way to "hide" an overlay
object is to call setMap(null).  But in your classes, you are
preventing that, because of this line:

        var map = [map, this.getMap()].pick();

I had to comment out that line in each of the overlay classes, then I
was able to remove overlays from the map.  Perhaps you could add
methods like hide(), show(), and destroy().

-- Kevin

On Jan 4, 10:10 pm, Ciul <[email protected]> wrote:
> Hi MooTools pals.
>
> New Classes added:
> - Polygon Class
> - Overlay Class
>
> Basically, the Polygon class will let you create polygons in the map,
> you can pass a multidimensional array of Mx2 length with pair of
> latitude, longitude coordinates e.g. [[lat,lng],[lat,lng],
> [lat,lng], ...and so on] just pass this to the paths option from the
> Polygon Class.
>
> and the Overlay Class will let you put HTML content inside yourmaps,
> like, if you want to put and image at a given position and bind it to
> one of the 6 posible layers that compound a Google Map. This is an
> option from the Overlay Class, by default it will use the
> overlayLayer.
>
>         floatPane (Pane 6)
>             This pane contains the info window. It is above all map
> overlays.
>         overlayMouseTarget (Pane 5)
>             This pane contains transparent elements that receive DOM
> mouse events for the markers.
>             It is above the floatShadow, so that markers in the shadow
> of the info window can be clickable.
>         floatShadow (Pane 4)
>             This pane contains the info window shadow. It is above the
> overlayImage,
>             so that markers can be in the shadow of the info window.
>         overlayImage (Pane 3)
>             This pane contains the marker foreground images.
>         overlayShadow (Pane 2)
>             This pane contains the marker shadows.
>         overlayLayer (Pane 1)
>             This pane contains polylines, polygons, ground overlays
> and tile layer overlays.
>         mapPane (Pane 0)
>             This pane is the lowes pane and is above the tiles.
>
> Code posted and uploaded at Forums:
>
>  http://www.mooforum.net/script-showcase-f25/google-maps-api-mootools-...
>
> If someone could help to make this reach the Forge, I'd appreciate
> that.
>
> Best regards,
> Ciul.

Reply via email to