Sign in to follow this  
Aaron Weier

Wisconsin County Map - Link Counties to PDF file using HTML

Recommended Posts

Hi All,

I'm having trouble with an HTML page using javascript to create a new map of FCMap_Wisconsin.swf and having each county link to a file.

This works great if i'm using my localhost web server but it doesn't work as just an HTML page. What am i missing?!?

Here's my HTML code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

  <title></title>

  <script type="text/javascript" src="JS/FusionMaps.js"></script>

  <script type="text/javascript">

<!--

  function LinkToProfile(CountyName) {

  alert(CountyName);

  window.open(<County PDF link>);

  }

  //-->

  </script>

</head>

<body>

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

  FusionMaps.

  </div>

  <script type="text/javascript">

  var map = new FusionMaps("Maps/FCMap_Wisconsin.swf", "Map1Id", "500", "500", "1", "1");

  map.setDataURL("EPHT_CountyProfiles.xml");

  map.render("mapdiv");

  </script>

</body>

</html>

here is a sample of my xml file:

<map borderColor='FFFFFF' connectorColor='000000' fillAlpha='70' hoverColor='FFFFFF' showBevel='0'>

 

 <data>

<entity id='001' link='j-LinkToProfile-Adams' />

<entity id='003' link='j-LinkToProfile-Ashland' />

<entity id='005' link='j-LinkToProfile-Barron' />

<entity id="007" link='j-LinkToProfile-Bayfield' />

 

 </data>

 <styles>

<definition>

 <style type="animation" name="animX" param="_xscale" start="0" duration="1" />

 <style type="animation" name="animY" param="_yscale" start="0" duration="1" />

</definition> 

<application>

 <apply toObject="PLOT" styles="animX,animY" />

</application>

 </styles>

</map>

 

Any help is greatly appreciated!!

Aaron

Share this post


Link to post
Share on other sites
Sign in to follow this