[geojquery] jQuery UI Themes

Javier Carrasco jcarrasco at prodevelop.es
Mon Sep 20 02:52:24 EDT 2010


I started to work on styling the map with the standard
jQuery UI classes to provide support of jQuery UI themes.

To do this I had to do 2 things:

1. Create the map using a custom css (with no colors or fonts)

    $.widget("geo.geoCore", {
        // default options
        options: {
            allOverlays: true,
                        theme: 'jqui.css'
        },

2. Add jquery standard classes after the creation of the map

    $(".olControlLayerSwitcher")
        .addClass("ui-widget")
        .addClass("ui-corner-left")
        .addClass("ui-widget-content")
    ;
    ...

I did a screenshot (work in progress), you can see it here[1]

I think doing this is a bit dirty but I did this way
because I didn't want to edit jQuery's code.

The questions are:

 - Do you know a better way to do that?
 - Do you think it is useful or everybody will use external
   components like here [2]?

[1] http://gitorious.org/~jacarma/geojquery/jacarmas-geojquery/blobs/master/img/mintchoc-redmond.png
[2] http://demo.mapfish.org/mapfishsample/trunk/examples/map/toolbar.html



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geojquery/attachments/20100920/57ec4dc6/attachment.html


More information about the Geojquery mailing list