amMap support forum

You are not logged in.

Announcement

FORUM CLOSED! This forum is closed. We moved to a new place at Zendesk. Update your bookmarks.

Flash amMap: Help


#1 2012-06-20 09:37:55

trichins
Moderator

Is this possible???

Ravi Teja,

AmMap cannot read csv file directly. AmMap needs the data in properly-structured XML format, either like the data.xml examples provide with AMMAP, or include the XML data nodes in the HTML file using:

Code:

so.addVariable("map_data", "");   This line is used for including data directly in the HTML file instead of loading it from an external file.

Offline

 

#2 2012-06-21 05:43:35

trichins
Moderator

Re: Is this possible???

You may want to start with some of the online documentation at: http://www.ammap.com/docs/

ammap.swf is the engine that makes the map work.

world3.swf is an example of a map that you can interact with and add your own data to. There also are single country maps, such as usa.swf or germany.swf or china.swf

ammap_data.xml is the data file ammap uses to populate your map with data.

Each area (country, province, etc.) on a map is identified by a code - example: mc_name="SZ". These codes must be used as listed in the data file that comes with each map - you cannot substitute your own codes. As per the documentation, there are several types of objects you can use with an ammap map:

- areas: countries, provinces, etc.
- lines: lines you add to show routes, pipelines, etc.
- movies: location markers
- labels: text lables you add to the map and position wherever you want to.

So, if you want to make Swaziland a certain color, in the data file node for Swaziland you would write something like:
<area title="SWAZILAND" mc_name="SZ" color="#000000"></area>

Now, when the map loads, Swaziland will appear black and the other countries will be the color you specify in your ammap_settings.xml file (red is the default). You do not need the lat/long coordinates for the areas. You can add pop-up boxes that contain longer descriptions by following the directions in the documentation. (There are also other attributes ytou can add (including teh zooming feature)

If you want to place a marker in the map, you would write something like the following:

<movies>
<movie file="circle" title="Barbados" lat="-59.5333" long="13.1667" width="10" height="10" fixed_size="true">
  <description><![CDATA[<b>Some html formatted description can be placed here</b>]]></description>
</movie>
</movies>

I recommend you look at the "Getting Started" documentation and  the various working examples that come with AmMap to better understand how to make it work for your needs. When I started, I made a copy of the examples and started experimenting with making different changes to the data file to see how things worked.

Offline

 

© amMap & amCharts | Forum engine: PunBB