AFComponents.com

Adding locations to Map
Updated: Apr 23, 2008   Views: 3559  
Description: Adding Custom Location points to the Map component


Part I - Installing Map component

Please see this installation tutorial on how to add Map component. Once it has been installed drag a instance of the map to the stage.

Part II - Setting up the XML file
The locations are set up in the XML file. This is the structure needed to create a location point.

<content>
    <location">
          <point>
                <data>0</data>
                <description>Denver, United States</description>
                <descriptionType>text</descriptionType>
                <icon>airplane_mc</icon>
                <latitude>39</latitude>
                <longitude>-104</longitude>
           </point>
    </location>
</content>


Part III - Setting up Locations
First you will need a content tag. Then within this tag is where you can add all the location points you want.

<content>
   <location>
    </location>
</content>


Part IV - Adding a point in the line
Now we will setup the points need to create the line. For each point you will need to state  a description, marker icon, and the lat/long position of the marker.

<data>0</data>
<description>Denver, United States</description>
<descriptionType>text</descriptionType>
<icon>airplane_mc</icon>
<latitude>39</latitude>
<longitude>-104</longitude>


Part V - Markers
Our marker icons are movie clips stored in the library. You can use any icon you want. Once you have created a movieclip you will need to make sure that you have setup linkage id for the movieclip. Then delete it off stage. Once linkage is setup you will just need to reference the movie clip name within the icon tag in XML file.

<icon>airplane_mc</icon>


After all your point is setup you will need to add more points with all fields specified.When your done you will need to close up the xml file by ending with..

</content>


© 2005-2007 advanced flash components