neveldo / mapael-maps

Vector maps for jQuery Mapael
MIT License
116 stars 139 forks source link

Added map of scandinavia #15

Closed TobbenTM closed 8 years ago

TobbenTM commented 8 years ago

Could use some improvements, but works for my project at the moment

neveldo commented 8 years ago

Hello,

Thank you for your contribution !

We have freshly added AMD compatibility on all the maps. Could you edit your map in order to add this compatibility ?

Here is an example : https://github.com/neveldo/mapael-maps/blob/master/argentina/argentina.js

You only have to encapsule the map data within this template :

(function (factory) {
    if (typeof exports === 'object') {
        // CommonJS
        module.exports = factory(require('jquery'), require('mapael'));
    } else if (typeof define === 'function' && define.amd) {
        // AMD. Register as an anonymous module.
        define(['jquery', 'mapael'], factory);
    } else {
        // Browser globals
        factory(jQuery, jQuery.fn.mapael);
    }
}(function ($, Mapael) {

    "use strict";

    $.extend(true, Mapael,
        {
            // Map content here
        }
    );
}));
TobbenTM commented 8 years ago

Added your wrapper now, does it look okay?

neveldo commented 8 years ago

Hello,

It's great, thank you for the update, and for your contribution ! I merge your pull-request :)