5th Year, Still Flash Mapping With IndyJunior

I have a soft sentimental spot for technology thats till works well after a 5+ year lifespan. Since 2003, on this blog, I have made use of Bryan Boyer’s IndyJunior Flash Mapping Module, which parses data from an external XML file to plot geographic locations that this dog travels to or has been before– see http://cogdogblog.com/indy.php.

I’ve engineered this with my own custom PHP wrapper, making ti so I create a different XML file for each year’s data, storing it in a directory like wp-content/indy/2005.xml, wp-content/indy/2007.xml, wp-content/indy/2007.xml, etc. (see the manual for details on the data format, but it is XML I can ever understand).

To execute my PHP, and to have a drop down menu with the years to select, I had to take this page out of the WordPress content flow; but you can easily create accessory pages that use the WP functions for building headers, styles, sidebars, and footers. So my indy.php file looks something like (note extra RETURNS added to code for display here):

<?php

/* Set up WordPress stuff to use template functiond */
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');

// create a data array for all years we have indy data
$all_years = array('2007', '2006','2005','2004','2003');

// check that we got a year defined as a variable
// if not, use the current year

$year = (isset($_REQUEST['year'])) ? $_REQUEST['year'] 
   : date('Y');
?>

<!-- start WP template code -->
<?php get_header(); ?>

  <div id="content" class="narrowcolumn">
    <div class="post">
    
    <h2>CogDogBlog's IndyJunior for <?php echo $year?></h2>
    
    <!-- start year form -->
  <form action="<?php echo $_SERVER['PHP_SELF']?>">
  where I am in... 
  <select name="year" onChange="submit()">
  <?php
  
  foreach ($all_years as $key) {
    $selected = ($key == $year) ? 'selected' : '';
    echo "<option value=\"$key\" $selected>$key</option>";
  }
  
  ?>
  </select>
  <input type="submit" name="enter" value="go" />
  </form>  
        
  <p>Follow this dog's travels, past and future!
  IndyJunior maps the places I have gone (red
  circles), will go (blue diamonds) or am now
  (bouncing green arrow). Double clicking any
  node will launch an associated URL.</p>

<!-- start the indyjunior flash embed and insert 
     appropiate value to point to the correct 
     XML file for the selected year ->
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-
96B8-444553540000" 
codebase="http://download.macromedia.com/pub/
shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="480" HEIGHT="242"  id="map" ALIGN="center"> 
<PARAM NAME=movie VALUE="/wp-content/indy/map.swf"> 
<PARAM NAME=menu VALUE=false> 
<PARAM NAME=quality VALUE=high> 
<PARAM NAME=bgcolor VALUE=#ededed> 
<PARAM name=FlashVars
value="stage_height=200&map_title=Alan%27s%
20IndyJunior&xml_file=/wp-content/indy/locations<?
php echo
$year?>.xml&map_style=solid&map_color=cdcdee&
date_format=mdy&zoom=auto&grid_line_opacity=4&
show_routes=false&route_curve_factor=false&
tooltip_bg_color=ededed&tooltip_shadow_color=
222222&tooltip_shadow_opacity=44&mod=1.8&
current_point_color=bcefad&
current_point_outline_color=555555&point_size=8&
target_size=8&past_point_style=circle&
future_point_style=diamond"> <EMBED
src="/wp-content/indy/map.swf"
FlashVars="stage_height=200&map_title=Alan%27s%
20IndyJunior&xml_file=/wp-content/indy/locations
<?php echo $year?>.xml&map_style=solid&map_color=cdcdee&
date_format=mdy&zoom=auto&grid_line_opacity=4&
show_routes=false&route_curve_factor=false&
tooltip_bg_color=ededed&tooltip_shadow_color=
222222&tooltip_shadow_opacity=44&mod=1.8&
current_point_color=bcefad&
current_point_outline_color=555555&point_size=8&
target_size=8&past_point_style=circle&
future_point_style=diamond"
 menu=false 
quality=high 
bgcolor=#ededed 
NAME="map" WIDTH="480" HEIGHT="242" 
ALIGN="center" 
TYPE="application/x-shockwave-flash" 
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"> 
</EMBED> 
</OBJECT> 
 <!-- 

<p>This flash appication created by <a
href="http://www.bryanboyer.com/">Bryan Boyer</a>
parses and XML file of travel nodes and
dynamically generates a map of places I have come
and gone from. For more see, <a
href="http://www.bryanboyer.com/indyjunior/">
IndyJunior Flash Mapping Module</a>.</p>

    </div>
</div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>
<!-- end WP template code -->

So the real task is to know what year is selected, and then grab the appropriate file to write out in the Flash code script.

Previously, the largest task was finding latitude and longitude for various locations, but the numerous geocoding sites make that a snap. Maporama is really good if you need international sites

So there are many similar tools out there for mapping locations, but I’m a bit sentimental for IndyJunior, maybe because I paid my shareware fee when Bryan was a student.

Comments are closed.

Recent Barks and Howls: