SHOW:
|
|
- or go back to the newest paste.
| 1 | - | // This here just assigns an image to each marker based on type, then it prints the marker and when I click the marker it sets off a function to display the information in the tab below the map. |
| 1 | + | private function toggleHotel():void |
| 2 | - | protected function getBusiness_resultHandler(event:ResultEvent):void |
| 2 | + | {
|
| 3 | - | {
|
| 3 | + | for(i in typeDict) |
| 4 | - | var xml:XML = new XML(event.result as String); |
| 4 | + | {
|
| 5 | - | //businessListCol = new XMLListCollection (xml.business); |
| 5 | + | var marker = typeDict[i]; |
| 6 | - | businessList = xml.business; |
| 6 | + | |
| 7 | - | |
| 7 | + | if(marker.type=="Hotel") |
| 8 | - | |
| 8 | + | {
|
| 9 | - | for (var i:int=0; i<businessList.length(); i++) |
| 9 | + | marker.visible = !marker.visible; |
| 10 | - | {
|
| 10 | + | } |
| 11 | - | |
| 11 | + | } |
| 12 | - | if (businessList[i].type=="Hotel") |
| 12 | + | } |
| 13 | - | {
|
| 13 | + | //---------------------------- |
| 14 | - | var bm:Bitmap = new Hotel as Bitmap; |
| 14 | + | private function toggleHotel():void |
| 15 | - | } |
| 15 | + | {
|
| 16 | - | else if (businessList[i].type=="Hostel") |
| 16 | + | for(marker in typeDict) |
| 17 | - | {
|
| 17 | + | {
|
| 18 | - | var bm:Bitmap = new Hostel as Bitmap; |
| 18 | + | if(marker.type=="Hotel") |
| 19 | - | } |
| 19 | + | {
|
| 20 | - | else if (businessList[i].type=="Pharmacy") |
| 20 | + | marker.visible = !marker.visible; |
| 21 | - | {
|
| 21 | + | } |
| 22 | - | var bm:Bitmap = new Pharmacy as Bitmap; |
| 22 | + | } |
| 23 | - | } |
| 23 | + | } |