Smashinglabs

Sebastian Poręba's blog

gMap 3.3.0 released

Christmas came early! New version of gMap is ready!

As always, you can download it from github.

I had a lot of feature requests since last version and I hope I covered them all.
Here is what’s new in 3.3.0:

  • clustering
  • fixAfterResize – fixing issues with loading gMaps in tabs
  • changeSettings – works with most of initial options
  • mapclick(callback) – bind for map click event
  • geocode(address, callback) – shorthand for geocoding
  • draggable markers (thanks to theMarvin)

I’m getting close to the point where I’ll consider gMap completed. Now it’s just about the time to improve documentation, which is still in 3.1.0 (sorry for that) and to complete test coverage.

I’d like to share a link to Magic Gallery WordPress Plugin: http://www.magicgalleryplugin.com/ It uses gMap and has a very nice design.

If you want to support my work and make my Christmas even better, please consider donating (button on the right sidebar).

That’s all the news, merry Christmas everyone!

15 Responses so far.

  1. Gport says:

    Thanks for the linkback guys :) Great work on the gMap again!

  2. Carl says:

    Hi, ZOOM does not seem to work any more.
    It always zooms to the maximum.
    Do you need an example page?

    My code that calls the plugin:
    $(“#MAP1″).gMap({
    address: ‘Kaddenbusch 21, 25578 Dägeling’,
    markers: [{ address: ‘Kaddenbusch 21, 25578 Dägeling’,
    html: ‘Kaddenbusch 2125578 Dägeling’,
    popup: false }],
    zoom: 8,
    maptype: google.maps.MapTypeId.ROADMAP,
    mapTypeControl: false,
    zoomControl: true,
    panControl: false,
    scaleControl: true,
    streetViewControl: false,
    scrollwheel: false
    });

    • Sebastian Poręba says:

      It does work, but the location you specified can’t be found by google maps. It may be a charset issue with ‘ä’, I tried your config with “Dageling” and it worked fine.

      A quick way to fix that is to type $(“#MAP1″).gMap(‘geocode’, ‘Kaddenbusch 21, 25578 Dageling’, function(location) {console.log(location);}); in your console, check marker lat/lng and use them in config. It’s faster/better/fancier anyway.

      • Carl says:

        Hi Sebastian,
        thanks for looking at the issue.
        Actually Google found the right spot, if I zoom out, the place is 100% correct – just the zoom level does not work since 3.3.0 (things worked fine was in 3.2.0).

        Lat/Lang might be a cool workaround but I am not sure about the results, now it looks like it found the place (again) but zoomed out to much (not level 8):

        Maybe it has to do with gmap new zoom features or something has changed with the setup and my code is wrong? I am using it with Jquery 1.7.1.

        <!–
        $(document).ready(function() {
        $("#MAP1").gMap({
        latitude: 53.878113,
        longitude: 9.532103,
        markers: [{
        latitude: 53.878113,
        longitude: 9.532103,
        html: 'Kaddenbusch 2125578 Dägeling’,
        popup: false }],
        zoom: 8,
        maptype: google.maps.MapTypeId.ROADMAP,
        mapTypeControl: false,
        zoomControl: true,
        panControl: false,
        scaleControl: true,
        streetViewControl: false,
        scrollwheel: false // letztes Element kein Komma
        });
        });

        • Carl says:

          sorry, the zoom level IS at 8, so lat/lang works!

          • Sebastian Poręba says:

            Funny thing is that I tried “Dägeling”, it didn’t work, changed to “Dageling” which worked and back “Dägeling” which worked this time. Using address is a lottery, that’s why coords are better. It’s quite improbable they ever change ;)

  3. Ben E says:

    Is there a way to make the map works perfectly in a tabbed menu? I seem to find no solution to it yet!

  4. Slim says:

    Hello
    I have an issue with clustering:

    i initialize the map, than make
    map.gMap(“removeAllMarkers”);
    map.gMap(“addMarkers” …

    markers are being added; then

    map.gMap(‘changeSettings’, {
    zoom: ‘fit’,
    clustering: true,
    fastClustering: true,
    clusterSize: 40
    });

    Zoom changes, but clustering doesn’t happen.
    can that be helped in any way?

    thanx in advance

  5. Khai says:

    Hi Sebastian,

    Is there support for stylized Google Maps?

    https://developers.google.com/maps/documentation/javascript/styling

    I’ve tried to call the styles variable from the $.fn.gMap.defaults object but it didn’t work. Any clues?

    Thanks so much – awesome work!

    Khai

  6. Ramona says:

    Hi Sebastian, great plugin.

    I was wondering if it would be possible to use this gmap script in a commercial worpress plugin.

    I am writing a wordpress plugin to display responsive maps ( I will not alter your .js script, I will attribute your work in a clear manner and I will only include your js script). I intend to try to sell my wordpress plugin on codecanyon.net.

    I would appreciate a lot if you allow me that and I am officially promissing a lot of beers for this :)

    Thanks, Ramona

    • Sebastian Poręba says:

      There are actually many WordPress themes using gMap and you are the first one to ask for permission. It’s cool, I’m always happy when people are using it and I allow usage also in commercial products. Just please do not make some overpriced shit, it’s the only thing I don’t like :)

      • Ramona says:

        Thanks so much Sebastian.
        We’ll keep in touch, I am a fair person, if I will make money using your work, please be sure you’ll be a part of the success&income.
        Regarding the price, I am afraid on codecanyon.net where I intend to sell my wordpress plugin, the administrators decide the price, usually, a wordpress plugin it’s between 4-10$. But anyway, I will keep you posted; once again, very useful plugin, keep up the good work!

  7. Ruben says:

    Hello Sebastian:

    I’m using your library code for create Google Maps with jQuery.

    I have a question… do you prevent include some function to filter map markers in future versions of library?

    How can I do this actually?

    Thank you in advance


  • RSS
  • Facebook
  • Twitter

FAQ about Wordpress

This came as a surprise for me but gMap is ...

gMap 3.3.3 released

It was a looong time since I last visited gMap. ...

Talks for Google Dev

Two new slide decks appeared in lectures tab. This time with ...

Talks and lectures w

Every now and then I spend a weekend watching various ...

3D Tetris with Three

In the fifth part of tutorial we add some final ...

FAQ about Wordpress

This came as a surprise for me but gMap is ...

gMap 3.3.0 released

Christmas came early! New version of gMap is ready!

Lecture for GTUG: Ja

Today I gave a lecture for GTUG Krakow about optimizations in ...

Unit testing for jQu

In part 1 I described basics of unit testing in ...

Unit testing for jQu

In part 1 I described some basic concepts behind unit ...