Skip to content
Browse files
Added the show scale range button
  • Loading branch information
timlinux committed Nov 24, 2011
1 parent d219534 commit 52eb8fd
Showing 1 changed file with 7 additions and 2 deletions.
@@ -12,6 +12,7 @@
<script id="source" language="javascript" type="text/javascript">
//The raster layer properties dialog will pass an object 'mRasterLayer'
//to this javascript context which you can interrogate for all its metadata
//and invoke any of its slots
function showJson()
if (typeof mRasterLayer === 'undefined')
@@ -21,8 +22,11 @@
//for fun lets pickle the raster layer as a json object
//also you can use any slots as native jscript methods:
$("#scale-range").hide().html("Minumum Scale: " + mRasterLayer.minimumScale() + " to Maximum Scale: " + mRasterLayer.maximumScale() ).slideToggle();

/** Load the metadata object passed into this page from c++ context using
wvMetadata->page()->mainFrame()->addToJavaScriptWindowObject( "mRasterLayer", mRasterLayer );
@@ -41,8 +45,9 @@ <h1>Metadata</h1>
<div id="metadata" class="span-24"></div>
<div id="footer">Generated by Quantum GIS (</div>
<button onclick="showJson()" >Show JSON</button>
<div id="scale-range" class="span-24"></div>
<div id="notes" class="span-24"></div>
<button onclick="showJson()" >Show scale range</button>

0 comments on commit 52eb8fd

Please sign in to comment.