Sha256: ae0179675f3e460c33e5a0c4d2fdc14955af53ea8b872444dcddcbbe68e539fe

Contents?: true

Size: 1.82 KB

Versions: 22

Compression:

Stored size: 1.82 KB

Contents

//////////////////////
//$.extend({
//  getUrlVars: function(){
//    var vars = [], hash;
//    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
//    for(var i = 0; i < hashes.length; i++)
//    {
//      hash = hashes[i].split('=');
//      vars.push(hash[0]);
//      vars[hash[0]] = hash[1];
//    }
//    return vars;
//  },
//  getUrlVar: function(name){
//    return $.getUrlVars()[name];
//  }
//});
//////////////////////////////

   function openlayersInit(base_url,metadataUrl, rft_id, div_identifier){

	//alert(params);
        //var metadataUrl = "http://localhost/adore-djatoka/resolver?url_ver=Z39.88-2004&rft_id=http://memory.loc.gov/gmd/gmd433/g4330/g4330/np000066.jp2&svc_id=info:lanl-repo/svc/getMetadata";

        var OUlayer = new OpenLayers.Layer.OpenURL( "OpenURL",
          base_url, {layername: 'basic',
format:'image/jpeg',
rft_id: rft_id,
metadataUrl: metadataUrl} );
        var metadata = OUlayer.getImageMetadata();
        var resolutions = OUlayer.getResolutions();
        var maxExtent = new OpenLayers.Bounds(0, 0, metadata.width,
metadata.height);
        var tileSize = OUlayer.getTileSize();
        var options = {resolutions: resolutions, maxExtent: maxExtent,
tileSize: tileSize};
        var map = new OpenLayers.Map( div_identifier, options);
        map.addLayer(OUlayer);
        var lon = metadata.width / 2;
        var lat = metadata.height / 2;
        map.setCenter(new OpenLayers.LonLat(lon, lat), 0);
      }
///////////////////////////////////////
//     $(document).ready(function() {
//   openlayersInit('http://localhost',"http://localhost/adore-djatoka/resolver?url_ver=Z39.88-2004&rft_id=http://memory.loc.gov/gmd/gmd433/g4330/g4330/np000066.jp2&svc_id=info:lanl-repo/svc/getMetadata",
//   'http://memory.loc.gov/gmd/gmd433/g4330/g4330/np000066.jp2');
// });

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
djatoka-0.4.1 generators/djatoka/templates/djatoka.js
djatoka-0.4.0 generators/djatoka/templates/djatoka.js
djatoka-0.3.2 generators/djatoka/templates/djatoka.js
djatoka-0.3.1 generators/djatoka/templates/djatoka.js
djatoka-0.3.0 generators/djatoka/templates/djatoka.js
djatoka-0.2.4 generators/djatoka/templates/djatoka.js
djatoka-0.2.3 generators/djatoka/templates/djatoka.js
djatoka-0.2.2 generators/djatoka/templates/djatoka.js
djatoka-0.2.1 generators/djatoka/templates/djatoka.js
djatoka-0.2.0 generators/djatoka/templates/djatoka.js
djatoka-0.1.0 generators/djatoka/templates/djatoka.js
djatoka-0.0.12 generators/djatoka/templates/djatoka.js
djatoka-0.0.11 generators/djatoka/templates/djatoka.js
djatoka-0.0.10 generators/djatoka/templates/djatoka.js
djatoka-0.0.9 generators/djatoka/templates/djatoka.js
djatoka-0.0.8 generators/djatoka/templates/djatoka.js
djatoka-0.0.7 generators/djatoka/templates/djatoka.js
djatoka-0.0.6 generators/djatoka/templates/djatoka.js
djatoka-0.0.5 generators/djatoka/templates/djatoka.js
djatoka-0.0.4 generators/djatoka/templates/djatoka.js