Skip to content

Instantly share code, notes, and snippets.

@djtfmartin
Created February 12, 2014 03:42
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save djtfmartin/8949717 to your computer and use it in GitHub Desktop.
Display expert distribution map for Monacanthus chinensis
<html>
<head>
<title>Embed map image example</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<div id="expertDistroDiv">
<img src=""/>
</div>
<script type="text/javascript">
var url = "http://spatial.ala.org.au/layers-service/distribution/map/Monacanthus+chinensis?callback=?";
$.getJSON(url, function(data){
if (data.available) {
$("#expertDistroDiv img").attr("src", data.url);
}
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment