Skip to content

Commit

Permalink
Merge branch 'master' of github.com:timlinux/Quantum-GIS
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Nov 27, 2011
2 parents 301d207 + 191fb22 commit 1b6e10d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions resources/html/qgsrasterlayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,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')
Expand All @@ -22,8 +23,11 @@
else
{
//for fun lets pickle the raster layer as a json object
$("#notes").html(JSON.stringify(mRasterLayer));
//$("#notes").html(JSON.stringify(mRasterLayer));
//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 );
Expand All @@ -42,8 +46,9 @@ <h1>Metadata</h1>
<div id="metadata" class="span-24"></div>
</hr>
<div id="footer">Generated by Quantum GIS (http://qgis.org)</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>
</div>
</body>
</html>

0 comments on commit 1b6e10d

Please sign in to comment.