Created
March 9, 2014 19:38
-
-
Save akosmaroy/9453330 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void bingCallback(String data) { | |
byte b[] = data.getBytes(); | |
IByteBuffer bb = new ByteBuffer_WebGL(b, b.length); | |
onDownloadMetadata(bb); | |
}; | |
private native void bc(String data) /*-{ | |
var s = JSON.stringify(data); | |
$wnd.bingCallback(s); | |
}-*/; | |
private native void initBing() /*-{ | |
$wnd.bingCallback = | |
$entry(this.@aero.glass.gwt.client.BingMapsLayer_GWT::bingCallback(Ljava/lang/String;)); | |
$wnd.bc = | |
$entry(this.@aero.glass.gwt.client.BingMapsLayer_GWT::bc(Ljava/lang/String;)); | |
var script = document.createElement('script'); | |
script.src = 'http://dev.virtualearth.net/REST/v1/Imagery/Metadata/Aerial?key=AnU5uta7s5ql_HTrRZcPLI4_zotvNefEeSxIClF1Jf7eS-mLig1jluUdCoecV7jc&jsonp=$wnd.bc'; | |
document.getElementsByTagName('head')[0].appendChild(script); | |
}-*/; | |
public final void initialize(G3MContext context) | |
{ | |
initBing(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment