Mapquest API AS3 - Points of Interest
Hey everyone,
I'm a new as3 student taking my first steps foward into a map-based tourism app.
I'm using the MapQuest API for as3, it's the first time I'm using an api and so far I've made the basic AS3 Map and the MouseWheel ZoomControl from here.
At the moment I'm trying to use the 'Easy POIl' from the link I left above but I've no idea how to get the code right, since it looks like xml and I'm working with AS3 on Flash Pro CC.
Can anybody help me?
Thanks a lot everyone, best regards.
Here's my code so far:
package {
//IMPORTS
import flash.display.Sprite;
import flash.display.StageScaleMode;
import com.mapquest.tilemap.*
import com.mapquest.tilemap.pois.*
import com.mapquest.tilemap.controls.inputdevice.*;
import com.mapquest.tilemap.controls.shadymeadow.*;
import com.mapquest.LatLng;
import mx.controls.*;
public class AS3Map extends Sprite {
var zs:ZoomSettings;
var map:TileMap
var myPoi:Poi;
//MAP
public function AS3Map():void {
//turn scaling off
this.stage.scaleMode = StageScaleMode.NO_SCALE;
//create a new TileMap object, passing your platform key
map = new TileMap("Fmjtd%7Cluurn96rnl%2Cra%3Do5-9w80lr");
//set the size of the map
map.size = new Size(stage.stageWidth, stage.stageHeight);
//add the map to the sprite
addChild(map);
addMapCenterF();
addControlsF();}
//ZOOM
private function addMapCenterF():void{
//set the map center
map.setCenter(new LatLng(41.156168845136705,-8.628559112548828),12);}
private function addControlsF():void{
//add a control to the map
map.addControl(new SMLargeZoomControl());
//make a zoomSettings object
this.zs = new ZoomSettings();
this.zs.animate = true;
//CODIGO COM ERRO: this.zs.easeFunction = mx.effects.easing.Linear.easeInOut;
//add the mousewheelzoomcontrol to the map
map.addControl(new MouseWheelZoomControl());}
}
}
