Sign in to follow this  
cubascort

How i can put 2 maps in the same index.html

Recommended Posts

hello, i have 2 maps in diferent index.html. but i need put both together, i combine and all time is "error" (the 1st map desapear) but if i test separated them is ok...  how i can combinate both code for appear in the same page, down i write the actual code index.html separated...

thank

INDEX.HTML 1

<html>

<head>

  <title>My First Map</title>

  <script language="JavaScript" src="FusionMaps.js"></script>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">

<!--

body {

 background-color: #000000;

}

-->

</style></head>

<body>

  <div id="mapdiv" align="center">

FusionMaps.

  </div>

  <script type="text/javascript">

var map = new FusionMaps("FCMap_Paris.swf", "Map1Id", "700", "500", "0", "0");

map.setDataURL("ParisData.xml");

map.render("mapdiv");

  </script>

</body>

</html>

INDEX.HTML 2

<html>

<head>

  <title>My First Map</title>

  <script language="JavaScript" src="FusionMaps.js"></script>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">

<!--

body {

 background-color: #FFFFFF;

}

-->

</style></head>

<body>

  <div id="mapdiv" align="center">

FusionMaps.

  </div>

  <script type="text/javascript">

var map = new FusionMaps("FCMap_IledeFrance.swf", "Map1Id", "900", "600", "0", "0");

map.setDataURL("IledeFranceData.xml");

map.render("mapdiv");

  </script>

</body>

</html>

Edited by Guest

Share this post


Link to post
Share on other sites

Hello,

 

 

 

Welcome to the forum. :w00t:

 

 

 

To have multiple charts on the same page you must make sure they have unique(different) chart IDs and div IDs.

 

 

 

To get a basic idea on how to put multiple charts on the same page, could you please take a look at the following documentation page?

 

 

 

http://www.fusioncharts.com/docs/Contents/MultipleCharts.html

 

 

 

Hope this helps. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this