I am using to the Flash IDE to develop my project. In it I am customizing the POI icons. I have MovieClip assets in the library I am using as the custom icons. They are simple rounded rectangle shapes. The MovieClips have the content's top left corner aligned to the 0,0 point. I am using the same asset for the main and alternate icon options for the POI. See my code sample below. When tested it appears that the size values passed into the setImage method or not being applied. Also, there is some odd behavior with the icon is rolled over. On rollover the alt icon appears to be displaced up(lower on the y-axis) and to the left(lower on the x-axis). If I roll out of the shape from its' top or left side the icon it will reset to the original icon correctly. If I roll out of the shape from its' right or bottom side it does not reset. What is the default behavior for the alt state icon?
Note: If I omit the size values or pass in values that match the dimensions of the original symbol there is no shift.
I am also working with decluttering. I am initially decluttering after the POI's are added to the map. When I roll over a POI it jumps to where it would be located if decluttering had not been executed. The POI remains in that new location until decluttered again.
In the online example for Multiple POI Collections image files are used. In the example the alt size is declared as slightly larger than the original. On rollover the icon appears to re-size from the center.
1// POIIconEat is a MovieClip in the library
2var iconEat:Class = POIIconEat;
3 4// create and assign the map icons
5var emi:MapIcon = new MapIcon();
6emi.setImage(new POIIconEat(), 22, 22);
7var emiAlt:MapIcon = new MapIcon();
8emiAlt.setImage(new POIIconEat(), 30, 30);
910var emiPOI

oi = new Poi(emiLL);
11with(emiPOI){
12 icon = emi;
13 altIcon = emiAlt;
14 addEventListener(MouseEvent.ROLL_OVER,onMouseOver);
15 addEventListener(MouseEvent.ROLL_OUT,onMouseOut);
16}
1718private function onMouseOver(event:MouseEvent):void {
19 event.currentTarget.altStateFlag = true;
20}
21 22private function onMouseOut(event:MouseEvent):void {
23 event.currentTarget.altStateFlag = false;
24}