Locator Maps » Version 4.0

ID #1013

01. How do I install the Locator Map on a webpage?

Follow these steps to install the map to your webpage.

1. Extract the contents of the purchased zip file to your local computer using any compressed file extraction application (e.g. WinZip, 7Zip, WinRar, etc.)

2. Upload the following files to the server, without changing their file names:

  a. locator_map.xml (this is the customized configuration file)

  b. locator_map.swf (the engine file for the map)

  c. swfobject.js (the SWFObject Java script file)

  d. data.swf (contains crucial map data)

3. Now you need to insert the HTML code to your page where you want your map to be. To do this, paste either the SWFObject code or the Non-SWFObject code to your web page where you wish the map to be rendered.

SWFObject code:

<script src="swfobject.js" type="text/javascript"></script>
<script type="text/javascript">
		var params = {
		  wmode: "transparent",
		  menu: "false"
		};
		var flashvars = {
		  datafile: "data.swf",
		  xmlfile1: "locator_map.xml"
		};		
		swfobject.embedSWF("locator_map.swf", "locator_map", "500", "400", "9.0.0", "", flashvars, params);
</script>
<div id="locator_map">Alternative content</div>

Non-SWFObject code:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="500" height="400" id="locator_map" align="middle">
<param name="movie" value="locator_map.swf" />
<param name="flashvars" value="xmlfile1=locator_map.xml&datafile=data.swf">
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="wmode" value="transparent"> 
<embed src="locator_map.swf&xmlfile1=locator_map.xml&datafile=data.swf" menu="false" quality="high" wmode="transparent" width="500" height="400" name="locator_map" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

Note: the code above assumes that you uploaded map’s files to the same folder where the HTML page that will display the map is. If the files are stored in some other folder, you need to adjust the paths accordingly.

For instance:

SWFObject code: 

<script src="/folder/swfobject.js" type="text/javascript"></script>
<script type="text/javascript">
		var params = {
		  wmode: "transparent",
		  menu: "false"
		};
		var flashvars = {
		  datafile: "/folder/data.swf",
		  xmlfile1: "/folder/locator_map.xml"
		};		
		swfobject.embedSWF("/folder/locator_map.swf", "locator_map", "500", "400", "9.0.0", "", flashvars, params);
</script>
<div id="locator_map">Alternative content</div>

Non-SWFObject code:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="500" height="400" id="locator_map" align="middle">
<param name="movie" value="/folder/locator_map.swf" />
<param name="flashvars" value="xmlfile1=/folder/locator_map.xml&datafile=/folder/data.swf">
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="wmode" value="transparent"> 
<embed src="/folder/locator_map.swf&xmlfile1=/folder/locator_map.xml&datafile=/folder/data.swf" menu="false" quality="high" wmode="transparent" width="500" height="400" name="locator_map" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

You can use the locator_start.html as an additional example of how you can build the map into your webspage.

Tags: install, locator, swfobject

Related entries:

Last update: 2011-05-26 09:49
Author: Fla-shop Team
Revision: 1.6

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

Average rating: 5 (1 Vote)

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry