$dc) { $dc = $d; } // max distance } return ceil ($dc * 2.2); } // set up the blog $feed = new SimplePie($_REQUEST['feed'] ? $_REQUEST['feed'] : $blog, $cache); $feed->enable_order_by_date(true); // override caching info if ($_REQUEST['nocache']) { header ('Pragma: no-cache'); header ('Cache-Control: no-cache must-revalidate'); header ('Expires: ' . date ('r', time() - 3600)); $feed->enable_cache('false'); } else { header ('Expires: ' . date ('r', time() + 3600)); } // now fetch the blog $feed->init(); // set a mime type if ($_REQUEST['text']) { $feed->handle_content_type ('text/plain'); } else { $feed->handle_content_type ('application/vnd.google-earth.kml+xml'); } print "\n"; ?> get_title() ?> get_description() ?> get_author()->get_name(); ?> get_author()->get_email(); ?> get_items(0, $feed->get_item_quantity())) as $item) { $content = $item->get_content(); if ($item->get_latitude() && $item->get_longitude()) { // handle geo information from the ATOM $lnglat = array ($item->get_longitude(), $item->get_latitude()); } else { // else find a Google maps URL if (! preg_match ('/maps.google.com\/maps\S*amp;q=([^&\s]+)/is', $content, $lnglat)) { print ' \n"; continue; } $lnglat = explode(',', $lnglat[1]); } print ' \n"; $r['latlng'] = $lnglat[1] . ',' . $lnglat[0] . ',0'; $r['author'] = $item->get_author()->get_name(); $r['permalink'] = $item->get_permalink(); $r['description'] = preg_replace ('/°/', '°', $item->get_description()); $r['title'] = $item->get_title(); $r['date'] = $item->get_date(); $r['id'] = $item->get_id(); $route[] = $r; } ?>

]]>
#
Our Route 1 #msn_line 0 0 0 normal #sn_open-diamond highlight #sh_open-diamond normal #sn_current_position highlight #sh_current_position normal #sn_line highlight #sn_line