Last active
October 7, 2016 04:51
-
-
Save marchbold/c84de2c23a0a35c78138263be75a94bb to your computer and use it in GitHub Desktop.
Create a native map using the NativeMaps ANE
This file contains hidden or 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
var viewport:Rectangle = new Rectangle( 0, 0, 500, 800 ); | |
NativeMaps.service.addEventListener( NativeMapEvent.MAP_CREATED, mapCreatedHandler ); | |
var success:Boolean = NativeMaps.service.createMap( viewport.width, viewport.height, viewport.x, viewport.y, MapType.MAP_TYPE_HYBRID ); | |
if (success) | |
{ | |
trace( "Map creation started successfully" ); | |
} | |
else | |
{ | |
trace( "Map creation failed - most likely a map has already been created" ); | |
} | |
... | |
private function mapCreatedHandler( event:NativeMapEvent ):void | |
{ | |
trace( "Map created" ); | |
} | |
// com.distriqt.NativeMaps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment