Max jOVI plugin

by salitrapraveen

HTML

<script type="text/javascript" src="http://api.maps.ovi.com/jsl.js"></script>

<section id="tests">

    </section>

CSS

/*
 * Color palette: E6E2AF,A7A37E,EFECCA,046380,002F2F
 */

@import url(http://fonts.googleapis.com/css?family=Open+Sans:300,600);
@import url(http://fonts.googleapis.com/css?family=Droid+Sans+Mono);

body {
    font-family: 'Open Sans', helvetica, sans-serif;
    background-color: #E6E2AF;
    font-weight: 300;
}

header {
    width: 90%;
    margin: 20px auto;
}

h1 {
    text-align: right;
    font-weight: 800;
    font-size: 72px;
    color: #046380;
    margin: 10px 0;
    -moz-text-shadow: 0 -1px 0 #333;
    -webkit-text-shadow: 0 -1px 0 #333;
    text-shadow: 0 -1px 0 #333;
}

#tests {
    width: 520px;
    margin: 20px auto;
}

.test h3 {
    background-color: #A7A37E;
    color: #fff;
    padding: 5px;
    border-radius: 4px;
    cursor: pointer;
}

.test h3:hover {
    background-color: #002F2F;
}

/* the following will always be the map container */
.test div.map {
    width: 500px;
    height: 500px;
    border: 5px solid #EFECCA;
    margin: 10px auto;
    border-radius: 4px;
    box-shadow: 0 0 10px #A7A37E;
    display: none;
}

/*
 * HTML5 Boilerplate
 *
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */


/* =============================================================================
   HTML5 element display
   ========================================================================== */

article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
audio[controls], canvas, video { display: inline-block; *display: inline; *zoom: 1; }


/* =============================================================================
   Base
   ========================================================================== */

/*
 * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units
 *    http://clagnut.com/blog/348/#c790
 * 2. Force vertical...

JavaScript

/*
 * Copyright (c) 2011 Massimiliano Marcon, http://marcon.me
 * 
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:

 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.

 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

(function($) {
    var _maps = {},
        _counter = 0,
        _initMap = function(target, settings) {
            var components = [], mapID;
            //Setup components based on settings
            if (settings.behavior) {
                components.push(new ovi.mapsapi.map.component.Behavior());
            }
            if (settings.zoomBar) {
                components.push(new ovi.mapsapi.map.component.ZoomBar());
            }
            if (settings.scaleBar) {
                components.push(new ovi.mapsapi.map.component.ScaleBar());
            }
            if (settings.overview) {
                components.push(new ovi.mapsapi.map.component.Overview());
            }
            if (settings.viewControl) {
                components.push(new ovi.mapsapi.map.component.ViewControl());
            }
            if...