From d1a4bb043d769d348ffc1bb991e0a7d67e3445aa Mon Sep 17 00:00:00 2001 From: Christopher De Cairos Date: Tue, 23 Aug 2011 10:35:33 -0400 Subject: [PATCH] moved getScript call to _setup, which will stop openlayers.js from loading, unless the open map plugin is used. --- plugins/openmap/popcorn.openmap.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/openmap/popcorn.openmap.js b/plugins/openmap/popcorn.openmap.js index 4a782e4..ce6a4b6 100755 --- a/plugins/openmap/popcorn.openmap.js +++ b/plugins/openmap/popcorn.openmap.js @@ -38,11 +38,6 @@ var newdiv, i = 1; - // insert openlayers api script once - if ( !window.OpenLayers ) { - Popcorn.getScript( "http://openlayers.org/api/OpenLayers.js", function() {}); - } - function toggle( container, display ) { if ( container.map ) { @@ -140,6 +135,11 @@ */ _setup: function( options ) { + // insert openlayers api script once + if ( !window.OpenLayers ) { + Popcorn.getScript( "http://openlayers.org/api/OpenLayers.js", function() {}); + } + var isReady = function() { // wait until OpenLayers has been loaded, and the start function is run, before adding map if ( !options.map ) { -- 2.43.0