World Maps » Zoom World Map

ID #1006

Can I have a single license and use the map multiple times on my website?

Yes, a single license is enough to use the map multiple times on one site.

To display the map with same xml data multiple times:

Just use the same html code where you want the map to be displayed.

To display the map more than once with different xml data:

If multiple maps are required to be displayed on your website and if each map needs to be different with different data, then you used to use separate xml files. These xml files should be called using Flashvars.

The example given below shows how the map can be displayed twice using two xml files, locator_map1.xml and locator_map2.xml.

HTML (SWFObject) code for first map

<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
	var flashvars= {
        xmlfile1: "locator_map1.xml",
	};
	var params = {
	wmode: "transparent"
	};
	swfobject.embedSWF("locator_map.swf", "Map", "600", "300", "9.0.0", "", flashvars, params);
</script>
<div id="Map">&nbsp;</div>

HTML (SWFObject) code for second map

<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
	var flashvars= {
        xmlfile1: "locator_map2.xml",
	};
	var params = {
	wmode: "transparent"
	};
	swfobject.embedSWF("locator_map.swf", "Map", "600", "300", "9.0.0", "", flashvars, params);
</script>
<div id="Map">&nbsp;</div>

HTML (Non-SWFObject) code for first map

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="600" height="300" id="world" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="locator_map.swf" />
<param name=FlashVars value="xmlfile1=locator_map1.xml">
<param name="quality" value="high" />
<param name="bgcolor" value="#FFFFFF" />
<embed src="locator_map.swf?xmlfile1=locator_map1.xml" quality="high" bgcolor="#FFFFFF" width="600" height="300" name="world" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

 


Tags: flashvars, xml

Related entries:

Last update: 2011-09-10 19:25
Author: Fla-shop Team
Revision: 1.5

Digg it! Share on Facebook Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 (0 Votes)

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry