esadude February 2016

as3 app location data google maps

It is still possible to run google maps from Flash/as3. I've seen information suggesting that either htmlLoader and or stagewebview etc can bypass the google api which is no longer but can't find any examples to back this up.

I want to be able to load an xml file which lists, places, locations and the details covering the target object if selected so that the choice displays a target and zooms in to the map coordinates.

Thanks in advance if anyone could be kind enough help point me in the right direction with this.

Answers


kare February 2016

I used this code once : It depends on location :

var webView: StageWebView = new StageWebView();


webView.stage = this.stage;
webView.viewPort = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight - 200);


btn.addEventListener(MouseEvent.CLICK, locating)

function locating(e: MouseEvent): void {
var lat:String = //location latitude
var lng:String = //location longitude
    url = "http://maps.google.com/maps?q=" + lat + "," + lng;
    webView.loadURL(url);

}

Post Status

Asked in February 2016
Viewed 1,117 times
Voted 7
Answered 1 times

Search




Leave an answer