<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:ymaps="http://api.maps.yahoo.com/Maps/V2/AnnotatedMaps.xsd" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Adam Estrada</title>
	
	<link>http://www.adamestrada.com</link>
	<description>Mapping the planet 7.5 minutes at a time...</description>
	<lastBuildDate>Sat, 06 Feb 2010 19:32:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AdamEstrada" /><feedburner:info uri="adamestrada" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>AdamEstrada</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>GmapEZ</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/agBp3mroers/</link>
		<comments>http://www.adamestrada.com/2010/02/06/gmapez/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 19:09:42 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[Web Mapping]]></category>
		<category><![CDATA[GmapEZ]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=388</guid>
		<description><![CDATA[I have been using GMapEZ for a few years now and it continues to impress me by how easy it is to use. The GMapEZ  script completely eliminates the need for any javascript programming which in my opinion is a really good thing. I have used it in the past to add pushpins that are [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_389" class="wp-caption alignleft" style="width: 169px"><a href="http://n01se.net/gmapez/"><img class="size-full wp-image-389" title="logo3main" src="http://www.adamestrada.com/wp-content/uploads/2010/02/logo3main.png" alt="" width="159" height="38" /></a><p class="wp-caption-text">Using GMapEZ</p></div>
<p>I have been using <a href="http://n01se.net/gmapez/">GMapEZ</a> for a few years now and it continues to impress me by how easy it is to use. The <a href="http://n01se.net/gmapez/gmapez-2.5.js" target="_blank">GMapEZ  script</a> completely eliminates the need for any javascript programming which in my opinion is a really good thing. I have used it in the past to add pushpins that are returned form any number of data sources. I like classic ASP so I&#8217;ve returned data from an ASP RecordSet or now a days from a .NET DataReader. At any rate, you simply have to read data from the DB and then write out the HTML to represent the structure needed to put pushpins on your map. Here is a C# example of what I am talking about.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p388code2'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3882"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
</pre></td><td class="code" id="p388code2"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">partial</span> <span style="color: #6666cc; font-weight: bold;">class</span> Pages_mapPanel <span style="color: #008000;">:</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Web</span><span style="color: #008000;">.</span><span style="color: #0000FF;">UI</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">UserControl</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #008080;">#region Page Props</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">String</span> defaultGmapPage <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;http://maps.google.com/maps&quot;</span><span style="color: #008000;">;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">String</span> defaultPage <span style="color: #008000;">=</span> ConfigurationSettings<span style="color: #008000;">.</span><span style="color: #0000FF;">AppSettings</span><span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;defaultPage&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #008080;">#endregion</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">protected</span> <span style="color: #6666cc; font-weight: bold;">void</span> Page_Load<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, EventArgs e<span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">try</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #6666cc; font-weight: bold;">string</span> mapPlaceHolder <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">loadMapData</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ctlPlaceHolder</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Controls</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> LiteralControl<span style="color: #008000;">&#40;</span>mapPlaceHolder<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> 
        <span style="color: #008000;">&#125;</span>
        <span style="color: #0600FF; font-weight: bold;">catch</span> <span style="color: #008000;">&#40;</span>Exception ex<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #0600FF; font-weight: bold;">throw</span> <span style="color: #008000;">&#40;</span>ex<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #008080;">#region loadMapData()</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">String</span> loadMapData<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">try</span>
        <span style="color: #008000;">&#123;</span>
            OracleConnection conn <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> OracleConnection<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #6666cc; font-weight: bold;">String</span> mainConn <span style="color: #008000;">=</span> ConfigurationManager<span style="color: #008000;">.</span><span style="color: #0000FF;">ConnectionStrings</span><span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;MainConnStr&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ConnectionString</span><span style="color: #008000;">;</span>
            conn<span style="color: #008000;">.</span><span style="color: #0000FF;">ConnectionString</span> <span style="color: #008000;">=</span> mainConn<span style="color: #008000;">;</span>
            conn<span style="color: #008000;">.</span><span style="color: #0000FF;">Open</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            OracleCommand cmd <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> OracleCommand<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            cmd<span style="color: #008000;">.</span><span style="color: #0000FF;">CommandType</span> <span style="color: #008000;">=</span> CommandType<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #6666cc; font-weight: bold;">String</span> query <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;SELECT * FROM MYTABLE ORDER BY DATEIN DESC&quot;</span><span style="color: #008000;">;</span>
            cmd<span style="color: #008000;">.</span><span style="color: #0000FF;">CommandText</span> <span style="color: #008000;">=</span> query<span style="color: #008000;">;</span>
            cmd<span style="color: #008000;">.</span><span style="color: #0000FF;">Connection</span> <span style="color: #008000;">=</span> conn<span style="color: #008000;">;</span>
&nbsp;
            cmd<span style="color: #008000;">.</span><span style="color: #0000FF;">ExecuteReader</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            OracleDataReader dr <span style="color: #008000;">=</span> cmd<span style="color: #008000;">.</span><span style="color: #0000FF;">ExecuteReader</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            StringBuilder map <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> StringBuilder<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            QueryString qs <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> QueryString<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #0600FF; font-weight: bold;">while</span> <span style="color: #008000;">&#40;</span>dr<span style="color: #008000;">.</span><span style="color: #0000FF;">Read</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                qs<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;fid&quot;</span>, <span style="color: #666666;">&quot;ms&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                qs<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;id&quot;</span>, dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;ID&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
                    map<span style="color: #008000;">.</span><span style="color: #0000FF;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;a id=<span style="color: #008080; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;ID&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\&quot;</span> href=<span style="color: #008080; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #008000;">+</span> defaultGmapPage <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;?ll=&quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;LATITUDE&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;,&quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;LONGITUDE&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&amp;amp;t=k&amp;amp;hl=en<span style="color: #008080; font-weight: bold;">\&quot;</span>&gt;GREEN MINI&lt;/a&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                    map<span style="color: #008000;">.</span><span style="color: #0000FF;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;div title=<span style="color: #008080; font-weight: bold;">\&quot;</span>Event<span style="color: #008080; font-weight: bold;">\&quot;</span>&gt;&lt;font size=<span style="color: #008080; font-weight: bold;">\&quot;</span>1<span style="color: #008080; font-weight: bold;">\&quot;</span> face=<span style="color: #008080; font-weight: bold;">\&quot;</span>Arial, Helvetica, sans-serif<span style="color: #008080; font-weight: bold;">\&quot;</span>&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                    map<span style="color: #008000;">.</span><span style="color: #0000FF;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;strong&gt;Name:&lt;/strong&gt; &quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;NAME&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;br /&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                    map<span style="color: #008000;">.</span><span style="color: #0000FF;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;strong&gt;Type:&lt;/strong&gt; &quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;TYPE&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;br /&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                    map<span style="color: #008000;">.</span><span style="color: #0000FF;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;strong&gt;Description:&lt;/strong&gt; &quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;DESC&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;br /&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                    map<span style="color: #008000;">.</span><span style="color: #0000FF;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;a href=<span style="color: #008080; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #008000;">+</span> defaultPage <span style="color: #008000;">+</span> qs <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\&quot;</span>&gt;Go To Main Page...&lt;/a&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                    map<span style="color: #008000;">.</span><span style="color: #0000FF;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/font&gt;&lt;/div&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                    map<span style="color: #008000;">.</span><span style="color: #0000FF;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;div title=<span style="color: #008080; font-weight: bold;">\&quot;</span>Dates<span style="color: #008080; font-weight: bold;">\&quot;</span>&gt;&lt;font size=<span style="color: #008080; font-weight: bold;">\&quot;</span>1<span style="color: #008080; font-weight: bold;">\&quot;</span> face=<span style="color: #008080; font-weight: bold;">\&quot;</span>Arial, Helvetica, sans-serif<span style="color: #008080; font-weight: bold;">\&quot;</span>&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                    map<span style="color: #008000;">.</span><span style="color: #0000FF;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;strong&gt;Date In:&lt;/strong&gt; &quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;DATEIN&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;br /&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                    map<span style="color: #008000;">.</span><span style="color: #0000FF;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;strong&gt;Date Out:&lt;/strong&gt; &quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;DATEOUT&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;br /&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                    map<span style="color: #008000;">.</span><span style="color: #0000FF;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;a href=<span style="color: #008080; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #008000;">+</span> defaultPage <span style="color: #008000;">+</span> qs <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\&quot;</span>&gt;Go To Main Page...&lt;/a&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                    map<span style="color: #008000;">.</span><span style="color: #0000FF;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/font&gt;&lt;/div&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #008000;">&#125;</span>
            <span style="color: #008000;">&#125;</span>
&nbsp;
            conn<span style="color: #008000;">.</span><span style="color: #0000FF;">Close</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> map<span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
        <span style="color: #0600FF; font-weight: bold;">catch</span> <span style="color: #008000;">&#40;</span>Exception ex<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            Zekiah<span style="color: #008000;">.</span><span style="color: #0000FF;">Logging</span><span style="color: #008000;">.</span><span style="color: #0000FF;">LoggingManager</span><span style="color: #008000;">.</span><span style="color: #0000FF;">WebApplication</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Error</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;A Fatal Error has occured in the Map Control&quot;</span>, ex<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            redirectToFailure<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
    <span style="color: #008080;">#endregion</span>
&nbsp;
	<span style="color: #008080;">#region Failure Notice </span>
    <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> redirectToFailure<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        QueryString qs <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> QueryString<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        qs<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;fid&quot;</span>, <span style="color: #666666;">&quot;ERROR&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Redirect</span><span style="color: #008000;">&#40;</span>defaultPage <span style="color: #008000;">+</span> qs, <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>    
    <span style="color: #008080;">#endregion </span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>Please note that I am reading data from an Oracle Database and simply returning it as a properly formatted String in HTML format. Each pushpin also has two tabs which can hold extra data including another URL. For more information on what you can do with GMapEZ, <a href="http://n01se.net/gmapez/start.html">check out the examples</a> on the hosted site. You&#8217;ll also note that I <a href="http://www.csharper.net/blog/querystring_class_useful_for_querystring_manipulation__appendage__etc.aspx" target="_blank">used a class written by Bobby ReRosa called &#8220;QueryString&#8221;</a>. What a freaking time saver this thing is! Thanks Bobby&#8230;I actually want to write more on how to use it in another blog post so look for that one too.</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/agBp3mroers" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2010/02/06/gmapez/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<georss:point>38.8903896 -77.0841446</georss:point><geo:lat>38.8903896</geo:lat><geo:long>-77.0841446</geo:long>	<feedburner:origLink>http://www.adamestrada.com/2010/02/06/gmapez/</feedburner:origLink></item>
		<item>
		<title>Oracle Spatial and USER_SDO_GEOM_METADATA</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/0a1J0NymIUs/</link>
		<comments>http://www.adamestrada.com/2010/01/15/oracle-spatial-and-user_sdo_geom_metadata/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 18:42:44 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[ESRI]]></category>
		<category><![CDATA[Oracle Spatial]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=380</guid>
		<description><![CDATA[Oracle is a very powerful database but at the same time VERY difficult to use. I&#8217;m guessing that&#8217;s why Oracle DBA&#8217;s get all the money and women&#8230;hehe. Oracle Spatial is also an incredibly powerful tool, if you know how to use it. I&#8217;ve talked before about how to get your spatial data in to the [...]]]></description>
			<content:encoded><![CDATA[<p>Oracle is a very powerful database but at the same time <em>VERY</em> difficult to use. I&#8217;m guessing that&#8217;s why Oracle DBA&#8217;s get all the money and women&#8230;hehe. Oracle Spatial is also an incredibly powerful tool, if you know how to use it. I&#8217;ve talked before about how to <a href="http://www.adamestrada.com/2009/06/14/how-to-load-a-shapefile-in-to-oracle-spatial/" target="_blank">get your spatial data in to the Database</a>, but what happens if the database doesn&#8217;t like the data? See, in Oracle you must have an SDO_GEOMETRY type to actually perform spatial queries on your data. What they don&#8217;t make so apparent is the fact that you must also Insert a record in to the USER_SDO_GEOM_METADATA table (they call it a view) and also create a Spatial Index to perform the query. SHP2SDO will create the Update/Insert statement for USER_SDO_GEOM_METADATA but if you already Inserted the data and don&#8217;t have the original you can use the following to Insert in to your table</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p380code8'); return false;">View Code</a> SQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3808"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p380code8"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> USER_SDO_GEOM_METADATA
<span style="color: #993333; font-weight: bold;">VALUES</span><span style="color: #66cc66;">&#40;</span>
<span style="color: #ff0000;">'EVENTS'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'GEOM'</span><span style="color: #66cc66;">,</span>
    MDSYS<span style="color: #66cc66;">.</span>SDO_DIM_ARRAY<span style="color: #66cc66;">&#40;</span>   
    MDSYS<span style="color: #66cc66;">.</span>SDO_DIM_ELEMENT<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'X'</span><span style="color: #66cc66;">,</span> <span style="color: #66cc66;">-</span><span style="color: #cc66cc;">180</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">180</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0.000000005</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
    MDSYS<span style="color: #66cc66;">.</span>SDO_DIM_ELEMENT<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Y'</span><span style="color: #66cc66;">,</span> <span style="color: #66cc66;">-</span><span style="color: #cc66cc;">90</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">90</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0.000000005</span><span style="color: #66cc66;">&#41;</span>
     <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
  <span style="color: #cc66cc;">4326</span>   <span style="color: #808080; font-style: italic;">-- SRID (reserved for future Spatial releases)</span>
<span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>Once you&#8217;ve Inserted that record you can look at it using the following Query:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p380code9'); return false;">View Code</a> SQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3809"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p380code9"><pre class="sql" style="font-family:monospace;">&nbsp;
<span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> USER_SDO_GEOM_METADATA</pre></td></tr></table></div>

<p>The Update query is simple&#8230;</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p380code10'); return false;">View Code</a> SQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p38010"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p380code10"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> EVENTS S <span style="color: #993333; font-weight: bold;">set</span> S<span style="color: #66cc66;">.</span>GEOM<span style="color: #66cc66;">.</span>SDO_SRID <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">4326</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">UPDATE</span> USER_SDO_GEOM_METADATA <span style="color: #993333; font-weight: bold;">SET</span> SRID <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">4326</span> <span style="color: #993333; font-weight: bold;">WHERE</span> TABLE_NAME<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'EVENTS'</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">UPDATE</span> USER_SDO_GEOM_METADATA <span style="color: #993333; font-weight: bold;">SET</span> DIMINFO <span style="color: #66cc66;">=</span> 
MDSYS<span style="color: #66cc66;">.</span>SDO_DIM_ARRAY<span style="color: #66cc66;">&#40;</span>MDSYS<span style="color: #66cc66;">.</span>SDO_DIM_ELEMENT<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'X'</span><span style="color: #66cc66;">,-</span><span style="color: #cc66cc;">180</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">180</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">0.000000005</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
MDSYS<span style="color: #66cc66;">.</span>SDO_DIM_ELEMENT<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Y'</span><span style="color: #66cc66;">,-</span><span style="color: #cc66cc;">90</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">90</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">0.000000005</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">WHERE</span> TABLE_NAME <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'EVENTS'</span></pre></td></tr></table></div>

<p>If you want to make sure your geometries are valid, you may use Oracle&#8217;s ST_IsValid() command.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p380code11'); return false;">View Code</a> SQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p38011"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p380code11"><pre class="sql" style="font-family:monospace;">&nbsp;
<span style="color: #993333; font-weight: bold;">SELECT</span> s<span style="color: #66cc66;">.</span>GEOM<span style="color: #66cc66;">.</span>st_isvalid<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">FROM</span> EVENTS s</pre></td></tr></table></div>

<p>Finally, do you want to generate a GEOM column from latitude/longitude fields?</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p380code12'); return false;">View Code</a> SQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p38012"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p380code12"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> EVENTS
<span style="color: #993333; font-weight: bold;">SET</span> GEOM <span style="color: #66cc66;">=</span> MDSYS<span style="color: #66cc66;">.</span>SDO_GEOMETRY<span style="color: #66cc66;">&#40;</span>
<span style="color: #cc66cc;">2001</span><span style="color: #66cc66;">,</span> <span style="color: #808080; font-style: italic;">-- 3-dimensional point or use 2001 for 2-dimensional point</span>
<span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
MDSYS<span style="color: #66cc66;">.</span>SDO_POINT_TYPE<span style="color: #66cc66;">&#40;</span>EVENTS<span style="color: #66cc66;">.</span>LON<span style="color: #66cc66;">,</span> EVENTS<span style="color: #66cc66;">.</span>LAT<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <span style="color: #808080; font-style: italic;">-- X,Y,Z</span>
<span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>Have fun!</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/0a1J0NymIUs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2010/01/15/oracle-spatial-and-user_sdo_geom_metadata/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<georss:point>38.5292877 -76.9752514</georss:point><geo:lat>38.5292877</geo:lat><geo:long>-76.9752514</geo:long>	<feedburner:origLink>http://www.adamestrada.com/2010/01/15/oracle-spatial-and-user_sdo_geom_metadata/</feedburner:origLink></item>
		<item>
		<title>GIS for the “Have Nots”</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/HnjV0RkpmtI/</link>
		<comments>http://www.adamestrada.com/2009/12/17/gis-for-the-have-nots/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 22:59:47 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[GeoDC]]></category>
		<category><![CDATA[GIS in the Rockies]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=373</guid>
		<description><![CDATA[A colleague of mine, Marshall Worthey, gave this presentation at GIS in the Rockies earlier this year. Last night, I did it at a GeoDC event at FortiusOne.
GIS in the Rockies Presentation
View more presentations from geodawg.

For more information on embedding maps from Geocommons in to Wordpress, check out this previous post of mine.
]]></description>
			<content:encoded><![CDATA[<p>A colleague of mine, <a href="http://www.linkedin.com/pub/dir/Marshall/Worthey/" target="_blank">Marshall Worthey</a>, gave this presentation at GIS in the Rockies earlier this year. Last night, I did it at a <a href="http://geo-dc.ning.com/" target="_blank">GeoDC</a> event at <a href="http://www.fortiusone.com" target="_blank">FortiusOne</a>.</p>
<div style="width:425px;text-align:left" id="__ss_2739974"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/geodawg/gis-in-the-rockies-presentation" title="GIS in the Rockies Presentation">GIS in the Rockies Presentation</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=gisrpresentation09-091217164700-phpapp02&#038;rel=0&#038;stripped_title=gis-in-the-rockies-presentation" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=gisrpresentation09-091217164700-phpapp02&#038;rel=0&#038;stripped_title=gis-in-the-rockies-presentation" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/geodawg">geodawg</a>.</div>
</div>
<p>For more information on embedding maps from Geocommons in to Wordpress, check out this <a href="http://www.adamestrada.com/2009/09/22/wordpress-as-a-cms/">previous post of mine</a>.</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/HnjV0RkpmtI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/12/17/gis-for-the-have-nots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<georss:point>38.89156726911702 -77.08402633666992</georss:point><geo:lat>38.89156726911702</geo:lat><geo:long>-77.08402633666992</geo:long>	<feedburner:origLink>http://www.adamestrada.com/2009/12/17/gis-for-the-have-nots/</feedburner:origLink></item>
		<item>
		<title>More on ESRI Flex and Config.xml</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/Wqs7p75wkIY/</link>
		<comments>http://www.adamestrada.com/2009/12/15/more-on-flex-and-config-xml/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 01:59:38 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[ESRI]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[e4x]]></category>
		<category><![CDATA[ExternalInterface]]></category>
		<category><![CDATA[MapMouseEvent]]></category>
		<category><![CDATA[MouseEvent.CLICK]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=365</guid>
		<description><![CDATA[ESRI, Flex and Actionscript]]></description>
			<content:encoded><![CDATA[<p>More often than not, when building a Flex application that includes a URL that references a map service, you&#8217;ll have to swap out that URL from your development environment to production when you go live. The following script/technique is intended to alleviate having to completely rebuild your application during deployment.</p>
<p>Take a look at the following mxml file and note that there are 3 things in particular to note.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p365code13'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p36513"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
</pre></td><td class="code" id="p365code13"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&lt;</span> ?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>mx :Application
    xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span>
    xmlns:esri=<span style="color: #ff0000;">&quot;http://www.esri.com/2008/ags&quot;</span>
    layout=<span style="color: #ff0000;">&quot;absolute&quot;</span>
    initialize=<span style="color: #ff0000;">&quot;init()&quot;</span>
    styleName=<span style="color: #ff0000;">&quot;plain&quot;</span>
    <span style="color: #66cc66;">&gt;</span>
  <span style="color: #66cc66;">&lt;/</span>mx<span style="color: #66cc66;">&gt;&lt;</span>mx :Script<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span> <span style="color: #66cc66;">!</span><span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span>
    	<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">collections</span>.<span style="color: #006600;">XMLListCollection</span>;
    	<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">collections</span>.<span style="color: #006600;">ArrayCollection</span>;
        	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">esri</span>.<span style="color: #006600;">ags</span>.<span style="color: #006600;">Graphic</span>;
        	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">esri</span>.<span style="color: #006600;">ags</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">MapMouseEvent</span>;        	
        	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">esri</span>.<span style="color: #006600;">ags</span>.<span style="color: #006600;">geometry</span>.<span style="color: #006600;">MapPoint</span>;
        	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">esri</span>.<span style="color: #006600;">ags</span>.<span style="color: #006600;">geometry</span>.<span style="color: #006600;">Extent</span>;
            <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">esri</span>.<span style="color: #006600;">ags</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">ExtentEvent</span>;
            <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">rpc</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">FaultEvent</span>;
        	<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">rpc</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">ResultEvent</span>;
            <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">controls</span>.<span style="color: #006600;">Alert</span>;
            <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">external</span>.<span style="color: #66cc66;">*</span>;
            <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">events</span>.<span style="color: #006600;">FlexEvent</span>;
            <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">esri</span>.<span style="color: #006600;">ags</span>.<span style="color: #006600;">layers</span>.<span style="color: #006600;">TiledMapServiceLayer</span>;
            <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">controls</span>.<span style="color: #0066CC;">Button</span>;
            <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">controls</span>.<span style="color: #0066CC;">Text</span>;
            <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">esri</span>.<span style="color: #006600;">ags</span>.<span style="color: #006600;">layers</span>.<span style="color: #006600;">ArcGISDynamicMapServiceLayer</span>;
            <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">rpc</span>.<span style="color: #006600;">http</span>.<span style="color: #006600;">HTTPService</span>;
&nbsp;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> initXML<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
        	<span style="color: #66cc66;">&#123;</span>
        		<span style="color: #000000; font-weight: bold;">var</span> configService:HTTPService = <span style="color: #000000; font-weight: bold;">new</span> HTTPService<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        		configService.<span style="color: #0066CC;">url</span> = <span style="color: #ff0000;">&quot;config.xml&quot;</span>;
        		configService.<span style="color: #006600;">resultFormat</span> = <span style="color: #ff0000;">&quot;e4x&quot;</span>;
        		configService.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>ResultEvent.<span style="color: #006600;">RESULT</span>, configResult<span style="color: #66cc66;">&#41;</span>;
        		configService.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FaultEvent.<span style="color: #006600;">FAULT</span>, configFault<span style="color: #66cc66;">&#41;</span>;
        		configService.<span style="color: #0066CC;">send</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        	<span style="color: #66cc66;">&#125;</span>
&nbsp;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> configResult<span style="color: #66cc66;">&#40;</span>event:ResultEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
            <span style="color: #66cc66;">&#123;</span>
            	<span style="color: #000000; font-weight: bold;">var</span> configXML:<span style="color: #0066CC;">XML</span> = event.<span style="color: #006600;">result</span> as <span style="color: #0066CC;">XML</span>;
            	<span style="color: #000000; font-weight: bold;">var</span> serviceList:XMLList = configXML..<span style="color: #006600;">service</span>;
            	<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> serviceList.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; i++<span style="color: #66cc66;">&#41;</span>
            	<span style="color: #66cc66;">&#123;</span>
             		<span style="color: #000000; font-weight: bold;">var</span> serviceName:<span style="color: #0066CC;">String</span> = serviceList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">name</span>;
            		<span style="color: #000000; font-weight: bold;">var</span> serviceURL:<span style="color: #0066CC;">String</span> = serviceList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">url</span>;
            		<span style="color: #000000; font-weight: bold;">var</span> serviceAlpha:<span style="color: #0066CC;">int</span> = serviceList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">alpha</span>;
            		<span style="color: #000000; font-weight: bold;">var</span> serviceVisible:<span style="color: #0066CC;">Boolean</span> = serviceList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">visible</span>;
            		<span style="color: #000000; font-weight: bold;">var</span> serviceLayers:ArrayCollection = <span style="color: #000000; font-weight: bold;">new</span> ArrayCollection<span style="color: #66cc66;">&#40;</span>serviceList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">layers</span>.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;,&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
            		<span style="color: #000000; font-weight: bold;">var</span> tLayer:ArcGISDynamicMapServiceLayer = <span style="color: #000000; font-weight: bold;">new</span> ArcGISDynamicMapServiceLayer<span style="color: #66cc66;">&#40;</span>serviceURL<span style="color: #66cc66;">&#41;</span>; 
            		tLayer.<span style="color: #006600;">id</span> = serviceName;
            		tLayer.<span style="color: #0066CC;">visible</span> = serviceVisible;
            		tLayer.<span style="color: #006600;">alpha</span> = serviceAlpha;
            		tLayer.<span style="color: #006600;">visibleLayers</span> = serviceLayers;
            		myMap.<span style="color: #006600;">addLayer</span><span style="color: #66cc66;">&#40;</span>tLayer<span style="color: #66cc66;">&#41;</span>;	
            	<span style="color: #66cc66;">&#125;</span>          	
            <span style="color: #66cc66;">&#125;</span>
&nbsp;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> configFault<span style="color: #66cc66;">&#40;</span>event:FaultEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
            <span style="color: #66cc66;">&#123;</span>
            	Alert.<span style="color: #0066CC;">show</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">fault</span>.<span style="color: #006600;">faultString</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> layerShowHandler<span style="color: #66cc66;">&#40;</span>event:FlexEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
            <span style="color: #66cc66;">&#123;</span>
                <span style="color: #808080; font-style: italic;">// update the LODs/zoomslider to use/show the levels for the selected base map</span>
                <span style="color: #000000; font-weight: bold;">var</span> tiledLayer:TiledMapServiceLayer = event.<span style="color: #0066CC;">target</span> as TiledMapServiceLayer;
                myMap.<span style="color: #006600;">lods</span> = tiledLayer.<span style="color: #006600;">tileInfo</span>.<span style="color: #006600;">lods</span>;
            <span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #808080; font-style: italic;">//add a callback for js to flex communication</span>
			<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
			<span style="color: #66cc66;">&#123;</span>
				initXML<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			  <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>flash.<span style="color: #006600;">external</span>.<span style="color: #006600;">ExternalInterface</span>.<span style="color: #006600;">available</span><span style="color: #66cc66;">&#41;</span>
			    flash.<span style="color: #006600;">external</span>.<span style="color: #006600;">ExternalInterface</span>.<span style="color: #006600;">addCallback</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;changeExtent&quot;</span>, changeExtent<span style="color: #66cc66;">&#41;</span>;     
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #808080; font-style: italic;">//call from js</span>
			<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> changeExtent<span style="color: #66cc66;">&#40;</span>sextent:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>	
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #808080; font-style: italic;">//var avals = sextent.split(&quot;|&quot;);</span>
				<span style="color: #808080; font-style: italic;">//var ext:Extent = new Extent(new Number(avals[0]),new Number(avals[2]),new Number(avals[1]),new Number(avals[3]));</span>
				<span style="color: #808080; font-style: italic;">//ext.spatialReference = myMap.spatialReference;</span>
				<span style="color: #808080; font-style: italic;">//myMap.extent = ext;</span>
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
            <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> onBasemapCreationComplete<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
			<span style="color: #66cc66;">&#123;</span>
            	myMap.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, pushExtentEvent<span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span>
&nbsp;
     		<span style="color: #808080; font-style: italic;">//send extents to html/js</span>
     		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> pushExtentEvent<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>           
      	 	<span style="color: #66cc66;">&#123;</span>
      	 		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>flash.<span style="color: #006600;">external</span>.<span style="color: #006600;">ExternalInterface</span>.<span style="color: #006600;">available</span><span style="color: #66cc66;">&#41;</span>
			     <span style="color: #66cc66;">&#123;</span>
			       const mapPoint:MapPoint = myMap.<span style="color: #006600;">toMapFromStage</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">stageX</span>, event.<span style="color: #006600;">stageY</span><span style="color: #66cc66;">&#41;</span>;
			       <span style="color: #000000; font-weight: bold;">var</span> extent:<span style="color: #0066CC;">Array</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			       flash.<span style="color: #006600;">external</span>.<span style="color: #006600;">ExternalInterface</span>.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;displayExtent&quot;</span>, mapPoint.<span style="color: #006600;">y</span>.<span style="color: #006600;">toFixed</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">6</span><span style="color: #66cc66;">&#41;</span>, mapPoint.<span style="color: #006600;">x</span>.<span style="color: #006600;">toFixed</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">6</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			     <span style="color: #66cc66;">&#125;</span>        
      	 	<span style="color: #66cc66;">&#125;</span>
      	 	<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onMapClick<span style="color: #66cc66;">&#40;</span>event:MapMouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
      	 	<span style="color: #66cc66;">&#123;</span>    	 		
      	 		myMap.<span style="color: #006600;">infoWindow</span>.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;Event Location &quot;</span>;
      	 		myMap.<span style="color: #006600;">infoWindow</span>.<span style="color: #0066CC;">show</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">mapPoint</span><span style="color: #66cc66;">&#41;</span>;
      	 	<span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>mx<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>esri :Map id=<span style="color: #ff0000;">&quot;myMap&quot;</span> <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;100%&quot;</span> mapClick=<span style="color: #ff0000;">&quot;onMapClick(event)&quot;</span> <span style="color: #66cc66;">&gt;</span>
      <span style="color: #66cc66;">&lt;/</span>esri<span style="color: #66cc66;">&gt;&lt;</span>esri :extent<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;/</span>esri<span style="color: #66cc66;">&gt;&lt;</span>esri :Extent xmin=<span style="color: #ff0000;">&quot;-122.2&quot;</span> ymin=<span style="color: #ff0000;">&quot;24.89&quot;</span> xmax=<span style="color: #ff0000;">&quot;-70.59&quot;</span> ymax=<span style="color: #ff0000;">&quot;46.92&quot;</span>  <span style="color: #66cc66;">&gt;</span>
          <span style="color: #66cc66;">&lt;</span>esri :SpatialReference wkid=<span style="color: #ff0000;">&quot;4326&quot;</span><span style="color: #66cc66;">/&gt;</span>
        <span style="color: #66cc66;">&lt;/</span>esri<span style="color: #66cc66;">&gt;</span>
&nbsp;
        <span style="color: #66cc66;">&lt;</span>esri :ArcGISTiledMapServiceLayer
            <span style="color: #0066CC;">visible</span>=<span style="color: #ff0000;">&quot;{bb.selectedIndex == 0}&quot;</span>
            <span style="color: #0066CC;">show</span>=<span style="color: #ff0000;">&quot;layerShowHandler(event)&quot;</span>
            <span style="color: #0066CC;">url</span>=<span style="color: #ff0000;">&quot;http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer&quot;</span> 
            creationComplete=<span style="color: #ff0000;">&quot;onBasemapCreationComplete()&quot;</span> <span style="color: #66cc66;">/&gt;</span>
        <span style="color: #66cc66;">&lt;</span>esri :ArcGISTiledMapServiceLayer
            <span style="color: #0066CC;">visible</span>=<span style="color: #ff0000;">&quot;{bb.selectedIndex == 1}&quot;</span>
            <span style="color: #0066CC;">show</span>=<span style="color: #ff0000;">&quot;layerShowHandler(event)&quot;</span>
            <span style="color: #0066CC;">url</span>=<span style="color: #ff0000;">&quot;http://server.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer&quot;</span> 
            creationComplete=<span style="color: #ff0000;">&quot;onBasemapCreationComplete()&quot;</span><span style="color: #66cc66;">/&gt;</span>
        <span style="color: #66cc66;">&lt;</span>esri :ArcGISTiledMapServiceLayer
            <span style="color: #0066CC;">visible</span>=<span style="color: #ff0000;">&quot;{bb.selectedIndex == 2}&quot;</span>
            <span style="color: #0066CC;">show</span>=<span style="color: #ff0000;">&quot;layerShowHandler(event)&quot;</span>
            <span style="color: #0066CC;">url</span>=<span style="color: #ff0000;">&quot;http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer&quot;</span> 
            creationComplete=<span style="color: #ff0000;">&quot;onBasemapCreationComplete()&quot;</span> <span style="color: #66cc66;">/&gt;</span>
&nbsp;
    <span style="color: #66cc66;">&lt;</span>mx :ToggleButtonBar id=<span style="color: #ff0000;">&quot;bb&quot;</span> horizontalGap=<span style="color: #ff0000;">&quot;2&quot;</span> selectedIndex=<span style="color: #ff0000;">&quot;0&quot;</span> themeColor=<span style="color: #ff0000;">&quot;0x00FF00&quot;</span> <span style="color: #0066CC;">right</span>=<span style="color: #ff0000;">&quot;5&quot;</span> top=<span style="color: #ff0000;">&quot;5&quot;</span><span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;/</span>mx<span style="color: #66cc66;">&gt;&lt;</span>mx :dataProvider<span style="color: #66cc66;">&gt;</span>
            <span style="color: #66cc66;">&lt;/</span>mx<span style="color: #66cc66;">&gt;&lt;</span>mx :Array<span style="color: #66cc66;">&gt;</span>
                <span style="color: #66cc66;">&lt;/</span>mx<span style="color: #66cc66;">&gt;&lt;</span>mx :String<span style="color: #66cc66;">&gt;</span>Streets<span style="color: #66cc66;">&lt;/</span>mx<span style="color: #66cc66;">&gt;</span>
                <span style="color: #66cc66;">&lt;</span>mx :String<span style="color: #66cc66;">&gt;</span>Topo<span style="color: #66cc66;">&lt;/</span>mx<span style="color: #66cc66;">&gt;</span>
                <span style="color: #66cc66;">&lt;</span>mx :String<span style="color: #66cc66;">&gt;</span>Imagery<span style="color: #66cc66;">&lt;/</span>mx<span style="color: #66cc66;">&gt;</span></pre></td></tr></table></div>

<p>First, note the code block that references an external XML file (config.xml). It really doesn&#8217;t get any easier than this. What&#8217;s really cool about this XML file is that basically, all the web service configuration options from the ArcGIS Service are configured through here. You can traverse through the config.xml file by referencing the node you want in the XMLList or serviceList:XMLList.</p>
<blockquote><p>  var serviceName:String = serviceList[i].name;<br />
            		var serviceURL:String = serviceList[i].url;<br />
            		var serviceAlpha:int = serviceList[i].alpha;<br />
            		var serviceVisible:Boolean = serviceList[i].visible;<br />
            		var serviceLayers:ArrayCollection = new ArrayCollection(serviceList[i].layers.split(&#8220;,&#8221;));
</p></blockquote>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p365code14'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p36514"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
</pre></td><td class="code" id="p365code14"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> initXML<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
        	<span style="color: #66cc66;">&#123;</span>
        		<span style="color: #000000; font-weight: bold;">var</span> configService:HTTPService = <span style="color: #000000; font-weight: bold;">new</span> HTTPService<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        		configService.<span style="color: #0066CC;">url</span> = <span style="color: #ff0000;">&quot;config.xml&quot;</span>;
        		configService.<span style="color: #006600;">resultFormat</span> = <span style="color: #ff0000;">&quot;e4x&quot;</span>;
        		configService.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>ResultEvent.<span style="color: #006600;">RESULT</span>, configResult<span style="color: #66cc66;">&#41;</span>;
        		configService.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FaultEvent.<span style="color: #006600;">FAULT</span>, configFault<span style="color: #66cc66;">&#41;</span>;
        		configService.<span style="color: #0066CC;">send</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        	<span style="color: #66cc66;">&#125;</span>
&nbsp;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> configResult<span style="color: #66cc66;">&#40;</span>event:ResultEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
            <span style="color: #66cc66;">&#123;</span>
            	<span style="color: #000000; font-weight: bold;">var</span> configXML:<span style="color: #0066CC;">XML</span> = event.<span style="color: #006600;">result</span> as <span style="color: #0066CC;">XML</span>;
            	<span style="color: #000000; font-weight: bold;">var</span> serviceList:XMLList = configXML..<span style="color: #006600;">service</span>;
            	<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> serviceList.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; i++<span style="color: #66cc66;">&#41;</span>
            	<span style="color: #66cc66;">&#123;</span>
             		<span style="color: #000000; font-weight: bold;">var</span> serviceName:<span style="color: #0066CC;">String</span> = serviceList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">name</span>;
            		<span style="color: #000000; font-weight: bold;">var</span> serviceURL:<span style="color: #0066CC;">String</span> = serviceList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">url</span>;
            		<span style="color: #000000; font-weight: bold;">var</span> serviceAlpha:<span style="color: #0066CC;">int</span> = serviceList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">alpha</span>;
            		<span style="color: #000000; font-weight: bold;">var</span> serviceVisible:<span style="color: #0066CC;">Boolean</span> = serviceList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">visible</span>;
            		<span style="color: #000000; font-weight: bold;">var</span> serviceLayers:ArrayCollection = <span style="color: #000000; font-weight: bold;">new</span> ArrayCollection<span style="color: #66cc66;">&#40;</span>serviceList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">layers</span>.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;,&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
            		<span style="color: #000000; font-weight: bold;">var</span> tLayer:ArcGISDynamicMapServiceLayer = <span style="color: #000000; font-weight: bold;">new</span> ArcGISDynamicMapServiceLayer<span style="color: #66cc66;">&#40;</span>serviceURL<span style="color: #66cc66;">&#41;</span>; 
            		tLayer.<span style="color: #006600;">id</span> = serviceName;
            		tLayer.<span style="color: #0066CC;">visible</span> = serviceVisible;
            		tLayer.<span style="color: #006600;">alpha</span> = serviceAlpha;
            		tLayer.<span style="color: #006600;">visibleLayers</span> = serviceLayers;
            		myMap.<span style="color: #006600;">addLayer</span><span style="color: #66cc66;">&#40;</span>tLayer<span style="color: #66cc66;">&#41;</span>;	
            	<span style="color: #66cc66;">&#125;</span>          	
            <span style="color: #66cc66;">&#125;</span>
&nbsp;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> configFault<span style="color: #66cc66;">&#40;</span>event:FaultEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
            <span style="color: #66cc66;">&#123;</span>
            	Alert.<span style="color: #0066CC;">show</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">fault</span>.<span style="color: #006600;">faultString</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>The XML is below: Note the configuration options that you would normally have to set in your compiled code. I just included the service name, url, alpha and visibility in this demonstration. There are many more options to choose from&#8230;</p>
</pre>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p365code15'); return false;">View Code</a> XML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p36515"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code" id="p365code15"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;">&lt; ?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;service<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	Service Name
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	http://yoururl.com/yourserver/rest/services/BaseMap/MapServer/
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;alpha<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	1.0
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/alpha<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;visible<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	true
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/visible<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;layers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	0,1
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/layers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/service<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>The next thing to take a look at is the fact that there is an Event that grabs the Latitude and Longitude from your map when it's clicked on (MouseEvent.CLICK). Moreover, it passes them to an HTML Input text box in the host page through an ExternalInterface call. The corresponding javascript should resemble the following. Note the < %= this.latitude.ClientID %> and < %= this.longitude.ClientID %> as they are required if you are embedding this in a ASP.NET for C# application.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p365code16'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p36516"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code" id="p365code16"><pre class="javascript" style="font-family:monospace;">&lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&gt;
//call flex function changeExtent
function mapextentchange(value)
{
	if(value != ''){
		getFlexApp('FlexMaps').changeExtent(value);
	}	
}
&nbsp;
//called from flex
function displayExtent(latitude,longitude)
{
	document.getElementById(&quot;&lt; %= this.latitude.ClientID %&gt;&quot;).value = latitude;
	document.getElementById(&quot;&lt; %= this.longitude.ClientID %&gt;&quot;).value = longitude;
}
&lt;/script&gt;</pre></td></tr></table></div>

<p>Finally, I snagged an example off of the ESRI Flex Community page that allowed me to toggle between Streetmap, Topographic Maps and Imagery data. As the selected Index changes, the base map changes...</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p365code17'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p36517"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code" id="p365code17"><pre class="actionscript" style="font-family:monospace;">        <span style="color: #66cc66;">&lt;</span>esri :ArcGISTiledMapServiceLayer
            <span style="color: #0066CC;">visible</span>=<span style="color: #ff0000;">&quot;{bb.selectedIndex == 0}&quot;</span>
            <span style="color: #0066CC;">show</span>=<span style="color: #ff0000;">&quot;layerShowHandler(event)&quot;</span>
            <span style="color: #0066CC;">url</span>=<span style="color: #ff0000;">&quot;http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer&quot;</span> 
            creationComplete=<span style="color: #ff0000;">&quot;onBasemapCreationComplete()&quot;</span> <span style="color: #66cc66;">/&gt;</span>
        <span style="color: #66cc66;">&lt;</span>esri :ArcGISTiledMapServiceLayer
            <span style="color: #0066CC;">visible</span>=<span style="color: #ff0000;">&quot;{bb.selectedIndex == 1}&quot;</span>
            <span style="color: #0066CC;">show</span>=<span style="color: #ff0000;">&quot;layerShowHandler(event)&quot;</span>
            <span style="color: #0066CC;">url</span>=<span style="color: #ff0000;">&quot;http://server.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer&quot;</span> 
            creationComplete=<span style="color: #ff0000;">&quot;onBasemapCreationComplete()&quot;</span><span style="color: #66cc66;">/&gt;</span>
        <span style="color: #66cc66;">&lt;</span>esri :ArcGISTiledMapServiceLayer
            <span style="color: #0066CC;">visible</span>=<span style="color: #ff0000;">&quot;{bb.selectedIndex == 2}&quot;</span>
            <span style="color: #0066CC;">show</span>=<span style="color: #ff0000;">&quot;layerShowHandler(event)&quot;</span>
            <span style="color: #0066CC;">url</span>=<span style="color: #ff0000;">&quot;http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer&quot;</span> 
            creationComplete=<span style="color: #ff0000;">&quot;onBasemapCreationComplete()&quot;</span> <span style="color: #66cc66;">/&gt;</span>
&nbsp;
    <span style="color: #66cc66;">&lt;</span>mx :ToggleButtonBar id=<span style="color: #ff0000;">&quot;bb&quot;</span> horizontalGap=<span style="color: #ff0000;">&quot;2&quot;</span> selectedIndex=<span style="color: #ff0000;">&quot;0&quot;</span> themeColor=<span style="color: #ff0000;">&quot;0x00FF00&quot;</span> <span style="color: #0066CC;">right</span>=<span style="color: #ff0000;">&quot;5&quot;</span> top=<span style="color: #ff0000;">&quot;5&quot;</span><span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;/</span>mx<span style="color: #66cc66;">&gt;&lt;</span>mx :dataProvider<span style="color: #66cc66;">&gt;</span>
            <span style="color: #66cc66;">&lt;/</span>mx<span style="color: #66cc66;">&gt;&lt;</span>mx :Array<span style="color: #66cc66;">&gt;</span>
                <span style="color: #66cc66;">&lt;/</span>mx<span style="color: #66cc66;">&gt;&lt;</span>mx :String<span style="color: #66cc66;">&gt;</span>Streets<span style="color: #66cc66;">&lt;/</span>mx<span style="color: #66cc66;">&gt;</span>
                <span style="color: #66cc66;">&lt;</span>mx :String<span style="color: #66cc66;">&gt;</span>Topo<span style="color: #66cc66;">&lt;/</span>mx<span style="color: #66cc66;">&gt;</span>
                <span style="color: #66cc66;">&lt;</span>mx :String<span style="color: #66cc66;">&gt;</span>Imagery<span style="color: #66cc66;">&lt;/</span>mx<span style="color: #66cc66;">&gt;</span></pre></td></tr></table></div>

<p>So, I've had fun playing with this an I've actually been able to use the entire script in a project I was a part of. I hope that someone else gets as much use out of it as I did.</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/Wqs7p75wkIY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/12/15/more-on-flex-and-config-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.adamestrada.com/2009/12/15/more-on-flex-and-config-xml/</feedburner:origLink></item>
		<item>
		<title>SpatiaLite 2.4.0 RC-0</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/Bw3BADA98MM/</link>
		<comments>http://www.adamestrada.com/2009/11/25/spatialite-2-4-0-rc-0/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 14:38:35 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[SpatiaLite]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=361</guid>
		<description><![CDATA[SpatiaLite 2.4.0 ReleaseCandidate-0 [2009-11-23] work in progress]]></description>
			<content:encoded><![CDATA[<p>Alessando announced today that the latest version of <a href="http://www.gaia-gis.it/spatialite-2.4.0/index.html" target="_blank">SpatiaLite</a> is ready for download. This is a Release Candidate so he is really looking for feedback! Please download it and test if you can&#8230;Check out the impressive RoadMap for this Open Source project.</p>
<blockquote><table border="1" cellpadding="8">
<tr>
<td rowspan="6"><b>Road Map</b></td>
<td>
<table border="1" cellpadding="4" cellspacing="4" width="100%" >
<tr>
<td><b>libspatialite</b></td>
<td>
<ul>
<li>supporting <b>3D</b> geometries [<b>XY</b>, <b>XYZ</b>, <b>XYM</b>, <b>XYZM</b>]</li>
<li>implementing <b>compressed</b> geometries</li>
<li>supporting <b>ST_</b><i>alias-names</i> for <b>OGC</b> functions</li>
<li>supporting <b>SQLite v.3.6.20</b>, and consequently truely enforcing <b>Foreign Key</b> constraints</li>
<li>supporting <b>libproj 4.7.0</b> [lots of new SRIDs added]</li>
<li>added SQL functions supporting <b>GreatCircle</b> and <b>Geodesic</b> distance/lenght computation</li>
<li>added SQL functions for unit conversions [<b>meter</b> to <b>feet</b> and alike]</li>
<li>fixed several <b>SHP</b> related issues</li>
<li>supporting <b>3D</b> shapefiles</li>
</ul>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="1" cellpadding="4" cellspacing="4" width="100%" >
<tr>
<td><b>spatialite-tools</b></td>
<td>
<ul>
<li>added a new CLI tool <b>spatialite_osm</b> supporting direct acquisition of<br /> <br />
								<b>road networks</b> from <b>Open Street Map</b> XML/OSM datasets</li>
</ul>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="1" cellpadding="4" cellspacing="4" width="100%">
<tr>
<td rowspan="2"><b>librasterlite</b></td>
<td>
<ul>
<li>minor bug-fixing and code cleaning</li>
<li>now supporting the <b>MSVC</b> compiler as well</li>
</ul>
</td>
</tr>
<tr>
<td class="info"><b>Important notice</b>:<br />Alexender Simakov [the Wavelet codec developer]<br /> <br />
						is currently evaluating my proposal to re-release his <b>libepsilon</b> under the LPGL.<br /> <br />
						accordingly to this	<b>librasterlite</b> will be re-released under <b>LGPL</b> as soon as possible</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="1" cellpadding="4" cellspacing="4" width="100%">
<tr>
<td><b>spatialite-gui</b></td>
<td>
<ul>
<li>supporting an interactive <b>Query / View builder</b> tool</li>
<li>added the capability to <b>DROP</b> or <b>RENAME</b> columns</li>
</ul>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="1" cellpadding="4" cellspacing="4" width="100%" >
<tr>
<td><b>spatialite-gis</b></td>
<td>
<ul>
<li>supporting <b>View</b>-based layers [<i>read-only</i>]</li>
<li>supporting <b>VirtualSHP</b>-based layers [<i>read-only</i>]</li>
<li>supporting <b>map labeling</b> with optional <b>anti-overlap</b> optimization</li>
<li>supporting interactive <b>routing</b></li>
<li>supporting <b>map output</b> generation as:
<ul>
<li><b>PNG</b>, <b>JPEG</b>, <b>TIFF</b> images</li>
<li><b>PDF</b> documents</li>
<li><b>SVG</b> documents</li>
</ul>
</li>
</ul>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="1" cellpadding="4" cellspacing="4" width="100%" >
<tr>
<td>Quantum GIS <b>QGis</b></td>
<td>
<ul>
<li>updated data provider released on QGis <b>trunk</b> SVN</li>
</ul>
</td>
</tr>
</table>
</td>
</tr>
</table>
</blockquote>
<p>I particularly like the fact that it now supports routing using <a href="http://www.gaia-gis.it/spatialite-2.4.0/Using-Routing.pdf" target="_blank">OpenStreetMap</a>! Way cool, Sando!</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/Bw3BADA98MM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/11/25/spatialite-2-4-0-rc-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.adamestrada.com/2009/11/25/spatialite-2-4-0-rc-0/</feedburner:origLink></item>
		<item>
		<title>Geographic to UTM Converter</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/PuuyMPoYeYU/</link>
		<comments>http://www.adamestrada.com/2009/10/25/geographic-to-utm-converter/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 19:16:55 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[GeoSpatial]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Converter]]></category>
		<category><![CDATA[geographic]]></category>
		<category><![CDATA[UTM]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=344</guid>
		<description><![CDATA[Geographic to UTM Javascript Coordinate Converter]]></description>
			<content:encoded><![CDATA[<p>A few years ago, I came across an algorithm (written in javascript) to convert <a href="http://en.wikipedia.org/wiki/Decimal_degrees" target="_blank">Decimal Degrees</a> to <a href="http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system" target="_blank">Universal Transverse Mercator (UTM)</a> coordinates. At the time, I really needed this functionality because I had to perform some basic QA/QC tasks on data that was all referenced to UTM in North America. Of course, I didn&#8217;t know if all my other reference data in UTM was accurate to client specifications so I needed to convert them to Geographic in decimal degrees to display over a Google Map. See below:</p>
<p><iframe src ="http://www.adamestrada.com/wp-content/uploads/2009/10/UTM2GEO.html" width="100%" height="300"></p>
<p>Your browser does not support iframes.</p>
<p></iframe></p>
<p>I hope that someone else find this as useful as I did for spot checking large amounts of data&#8230;</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p344code18'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p34418"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
</pre></td><td class="code" id="p344code18"><pre class="html" style="font-family:monospace;">&lt; !DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Geographic/UTM Coordinate Converter&lt;/title&gt;
&lt;style TYPE=&quot;text/css&quot;&gt;
&lt;!--
TD { text-align: left; }
--&gt;
&lt;/style&gt;
&lt;script TYPE=&quot;text/javascript&quot;&gt;
&lt;!--
var pi = 3.14159265358979;
/* Ellipsoid model constants (actual values here are for WGS84) */
var sm_a = 6378137.0;
var sm_b = 6356752.314;
var sm_EccSquared = 6.69437999013e-03;
var UTMScaleFactor = 0.9996;
&nbsp;
/*
* DegToRad
*
* Converts degrees to radians.
*
*/
&nbsp;
function DegToRad (deg)
{
return (deg / 180.0 * pi)
}
/*
* RadToDeg
*
* Converts radians to degrees.
*
*/
&nbsp;
function RadToDeg (rad)
{
return (rad / pi * 180.0)
}
&nbsp;
&nbsp;
/*
* ArcLengthOfMeridian
*
* Computes the ellipsoidal distance from the equator to a point at a
* given latitude.
*
* Reference: Hoffmann-Wellenhof, B., Lichtenegger, H., and Collins, J.,
* GPS: Theory and Practice, 3rd ed. New York: Springer-Verlag Wien, 1994.
*
* Inputs:
* phi - Latitude of the point, in radians.
*
* Globals:
* sm_a - Ellipsoid model major axis.
* sm_b - Ellipsoid model minor axis.
*
* Returns:
* The ellipsoidal distance of the point from the equator, in meters.
*
*/
&nbsp;
function ArcLengthOfMeridian (phi)
{
var alpha, beta, gamma, delta, epsilon, n;
var result;
&nbsp;
/* Precalculate n */
n = (sm_a - sm_b) / (sm_a + sm_b);
&nbsp;
/* Precalculate alpha */
alpha = ((sm_a + sm_b) / 2.0)
* (1.0 + (Math.pow (n, 2.0) / 4.0) + (Math.pow (n, 4.0) / 64.0));
&nbsp;
/* Precalculate beta */
beta = (-3.0 * n / 2.0) + (9.0 * Math.pow (n, 3.0) / 16.0)
+ (-3.0 * Math.pow (n, 5.0) / 32.0);
&nbsp;
/* Precalculate gamma */
gamma = (15.0 * Math.pow (n, 2.0) / 16.0)
+ (-15.0 * Math.pow (n, 4.0) / 32.0);
&nbsp;
/* Precalculate delta */
delta = (-35.0 * Math.pow (n, 3.0) / 48.0)
+ (105.0 * Math.pow (n, 5.0) / 256.0);
&nbsp;
/* Precalculate epsilon */
epsilon = (315.0 * Math.pow (n, 4.0) / 512.0);
&nbsp;
/* Now calculate the sum of the series and return */
result = alpha
* (phi + (beta * Math.sin (2.0 * phi))
+ (gamma * Math.sin (4.0 * phi))
+ (delta * Math.sin (6.0 * phi))
+ (epsilon * Math.sin (8.0 * phi)));
&nbsp;
return result;
&nbsp;
}
&nbsp;
/*
* UTMCentralMeridian
*
* Determines the central meridian for the given UTM zone.
*
* Inputs:
* zone - An integer value designating the UTM zone, range [1,60].
*
* Returns:
* The central meridian for the given UTM zone, in radians, or zero
* if the UTM zone parameter is outside the range [1,60].
* Range of the central meridian is the radian equivalent of [-177,+177].
*
*/
&nbsp;
function UTMCentralMeridian (zone)
{
var cmeridian;
&nbsp;
cmeridian = DegToRad (-183.0 + (zone * 6.0));
&nbsp;
return cmeridian;
&nbsp;
}
&nbsp;
/*
* FootpointLatitude
*
* Computes the footpoint latitude for use in converting transverse
* Mercator coordinates to ellipsoidal coordinates.
*
* Reference: Hoffmann-Wellenhof, B., Lichtenegger, H., and Collins, J.,
* GPS: Theory and Practice, 3rd ed. New York: Springer-Verlag Wien, 1994.
*
* Inputs:
* y - The UTM northing coordinate, in meters.
*
* Returns:
* The footpoint latitude, in radians.
*
*/
&nbsp;
function FootpointLatitude (y)
{
var y_, alpha_, beta_, gamma_, delta_, epsilon_, n;
var result;
&nbsp;
/* Precalculate n (Eq. 10.18) */
n = (sm_a - sm_b) / (sm_a + sm_b);
&nbsp;
/* Precalculate alpha_ (Eq. 10.22) */
/* (Same as alpha in Eq. 10.17) */
alpha_ = ((sm_a + sm_b) / 2.0)
* (1 + (Math.pow (n, 2.0) / 4) + (Math.pow (n, 4.0) / 64));
&nbsp;
/* Precalculate y_ (Eq. 10.23) */
y_ = y / alpha_;
&nbsp;
/* Precalculate beta_ (Eq. 10.22) */
beta_ = (3.0 * n / 2.0) + (-27.0 * Math.pow (n, 3.0) / 32.0)
+ (269.0 * Math.pow (n, 5.0) / 512.0);
&nbsp;
/* Precalculate gamma_ (Eq. 10.22) */
gamma_ = (21.0 * Math.pow (n, 2.0) / 16.0)
+ (-55.0 * Math.pow (n, 4.0) / 32.0);
&nbsp;
/* Precalculate delta_ (Eq. 10.22) */
delta_ = (151.0 * Math.pow (n, 3.0) / 96.0)
+ (-417.0 * Math.pow (n, 5.0) / 128.0);
&nbsp;
/* Precalculate epsilon_ (Eq. 10.22) */
epsilon_ = (1097.0 * Math.pow (n, 4.0) / 512.0);
&nbsp;
/* Now calculate the sum of the series (Eq. 10.21) */
result = y_ + (beta_ * Math.sin (2.0 * y_))
+ (gamma_ * Math.sin (4.0 * y_))
+ (delta_ * Math.sin (6.0 * y_))
+ (epsilon_ * Math.sin (8.0 * y_));
&nbsp;
return result;
&nbsp;
}
&nbsp;
/*
* MapLatLonToXY
*
* Converts a latitude/longitude pair to x and y coordinates in the
* Transverse Mercator projection. Note that Transverse Mercator is not
* the same as UTM; a scale factor is required to convert between them.
*
* Reference: Hoffmann-Wellenhof, B., Lichtenegger, H., and Collins, J.,
* GPS: Theory and Practice, 3rd ed. New York: Springer-Verlag Wien, 1994.
*
* Inputs:
* phi - Latitude of the point, in radians.
* lambda - Longitude of the point, in radians.
* lambda0 - Longitude of the central meridian to be used, in radians.
*
* Outputs:
* xy - A 2-element array containing the x and y coordinates
* of the computed point.
*
* Returns:
* The function does not return a value.
*
*/
&nbsp;
function MapLatLonToXY (phi, lambda, lambda0, xy)
{
var N, nu2, ep2, t, t2, l;
var l3coef, l4coef, l5coef, l6coef, l7coef, l8coef;
var tmp;
&nbsp;
/* Precalculate ep2 */
ep2 = (Math.pow (sm_a, 2.0) - Math.pow (sm_b, 2.0)) / Math.pow (sm_b, 2.0);
&nbsp;
/* Precalculate nu2 */
nu2 = ep2 * Math.pow (Math.cos (phi), 2.0);
&nbsp;
/* Precalculate N */
N = Math.pow (sm_a, 2.0) / (sm_b * Math.sqrt (1 + nu2));
&nbsp;
/* Precalculate t */
t = Math.tan (phi);
t2 = t * t;
tmp = (t2 * t2 * t2) - Math.pow (t, 6.0);
&nbsp;
/* Precalculate l */
l = lambda - lambda0;
&nbsp;
/* Precalculate coefficients for l**n in the equations below
so a normal human being can read the expressions for easting
and northing
-- l**1 and l**2 have coefficients of 1.0 */
l3coef = 1.0 - t2 + nu2;
l4coef = 5.0 - t2 + 9 * nu2 + 4.0 * (nu2 * nu2);
&nbsp;
l5coef = 5.0 - 18.0 * t2 + (t2 * t2) + 14.0 * nu2
- 58.0 * t2 * nu2;
&nbsp;
l6coef = 61.0 - 58.0 * t2 + (t2 * t2) + 270.0 * nu2
- 330.0 * t2 * nu2;
&nbsp;
l7coef = 61.0 - 479.0 * t2 + 179.0 * (t2 * t2) - (t2 * t2 * t2);
&nbsp;
l8coef = 1385.0 - 3111.0 * t2 + 543.0 * (t2 * t2) - (t2 * t2 * t2);
&nbsp;
/* Calculate easting (x) */
xy[0] = N * Math.cos (phi) * l
+ (N / 6.0 * Math.pow (Math.cos (phi), 3.0) * l3coef * Math.pow (l, 3.0))
+ (N / 120.0 * Math.pow (Math.cos (phi), 5.0) * l5coef * Math.pow (l, 5.0))
+ (N / 5040.0 * Math.pow (Math.cos (phi), 7.0) * l7coef * Math.pow (l, 7.0));
&nbsp;
/* Calculate northing (y) */
xy[1] = ArcLengthOfMeridian (phi)
+ (t / 2.0 * N * Math.pow (Math.cos (phi), 2.0) * Math.pow (l, 2.0))
+ (t / 24.0 * N * Math.pow (Math.cos (phi), 4.0) * l4coef * Math.pow (l, 4.0))
+ (t / 720.0 * N * Math.pow (Math.cos (phi), 6.0) * l6coef * Math.pow (l, 6.0))
+ (t / 40320.0 * N * Math.pow (Math.cos (phi), 8.0) * l8coef * Math.pow (l, 8.0));
&nbsp;
return;
&nbsp;
}
&nbsp;
/*
* MapXYToLatLon
*
* Converts x and y coordinates in the Transverse Mercator projection to
* a latitude/longitude pair. Note that Transverse Mercator is not
* the same as UTM; a scale factor is required to convert between them.
*
* Reference: Hoffmann-Wellenhof, B., Lichtenegger, H., and Collins, J.,
* GPS: Theory and Practice, 3rd ed. New York: Springer-Verlag Wien, 1994.
*
* Inputs:
* x - The easting of the point, in meters.
* y - The northing of the point, in meters.
* lambda0 - Longitude of the central meridian to be used, in radians.
*
* Outputs:
* philambda - A 2-element containing the latitude and longitude
* in radians.
*
* Returns:
* The function does not return a value.
*
* Remarks:
* The local variables Nf, nuf2, tf, and tf2 serve the same purpose as
* N, nu2, t, and t2 in MapLatLonToXY, but they are computed with respect
* to the footpoint latitude phif.
*
* x1frac, x2frac, x2poly, x3poly, etc. are to enhance readability and
* to optimize computations.
*
*/
function MapXYToLatLon (x, y, lambda0, philambda)
{
var phif, Nf, Nfpow, nuf2, ep2, tf, tf2, tf4, cf;
var x1frac, x2frac, x3frac, x4frac, x5frac, x6frac, x7frac, x8frac;
var x2poly, x3poly, x4poly, x5poly, x6poly, x7poly, x8poly;
&nbsp;
/* Get the value of phif, the footpoint latitude. */
phif = FootpointLatitude (y);
&nbsp;
/* Precalculate ep2 */
ep2 = (Math.pow (sm_a, 2.0) - Math.pow (sm_b, 2.0))
/ Math.pow (sm_b, 2.0);
&nbsp;
/* Precalculate cos (phif) */
cf = Math.cos (phif);
&nbsp;
/* Precalculate nuf2 */
nuf2 = ep2 * Math.pow (cf, 2.0);
&nbsp;
/* Precalculate Nf and initialize Nfpow */
Nf = Math.pow (sm_a, 2.0) / (sm_b * Math.sqrt (1 + nuf2));
Nfpow = Nf;
&nbsp;
/* Precalculate tf */
tf = Math.tan (phif);
tf2 = tf * tf;
tf4 = tf2 * tf2;
&nbsp;
/* Precalculate fractional coefficients for x**n in the equations
below to simplify the expressions for latitude and longitude. */
x1frac = 1.0 / (Nfpow * cf);
Nfpow *= Nf; /* now equals Nf**2) */
&nbsp;
x2frac = tf / (2.0 * Nfpow);
Nfpow *= Nf; /* now equals Nf**3) */
&nbsp;
x3frac = 1.0 / (6.0 * Nfpow * cf);
Nfpow *= Nf; /* now equals Nf**4) */
&nbsp;
x4frac = tf / (24.0 * Nfpow);
Nfpow *= Nf; /* now equals Nf**5) */
&nbsp;
x5frac = 1.0 / (120.0 * Nfpow * cf);
Nfpow *= Nf; /* now equals Nf**6) */
&nbsp;
x6frac = tf / (720.0 * Nfpow);
Nfpow *= Nf; /* now equals Nf**7) */
&nbsp;
x7frac = 1.0 / (5040.0 * Nfpow * cf);
Nfpow *= Nf; /* now equals Nf**8) */
&nbsp;
x8frac = tf / (40320.0 * Nfpow);
&nbsp;
/* Precalculate polynomial coefficients for x**n.
-- x**1 does not have a polynomial coefficient. */
&nbsp;
x2poly = -1.0 - nuf2;
&nbsp;
x3poly = -1.0 - 2 * tf2 - nuf2;
&nbsp;
x4poly = 5.0 + 3.0 * tf2 + 6.0 * nuf2 - 6.0 * tf2 * nuf2
- 3.0 * (nuf2 *nuf2) - 9.0 * tf2 * (nuf2 * nuf2);
&nbsp;
x5poly = 5.0 + 28.0 * tf2 + 24.0 * tf4 + 6.0 * nuf2 + 8.0 * tf2 * nuf2;
&nbsp;
x6poly = -61.0 - 90.0 * tf2 - 45.0 * tf4 - 107.0 * nuf2
+ 162.0 * tf2 * nuf2;
&nbsp;
x7poly = -61.0 - 662.0 * tf2 - 1320.0 * tf4 - 720.0 * (tf4 * tf2);
&nbsp;
x8poly = 1385.0 + 3633.0 * tf2 + 4095.0 * tf4 + 1575 * (tf4 * tf2);
&nbsp;
/* Calculate latitude */
philambda[0] = phif + x2frac * x2poly * (x * x)
+ x4frac * x4poly * Math.pow (x, 4.0)
+ x6frac * x6poly * Math.pow (x, 6.0)
+ x8frac * x8poly * Math.pow (x, 8.0);
&nbsp;
/* Calculate longitude */
philambda[1] = lambda0 + x1frac * x
+ x3frac * x3poly * Math.pow (x, 3.0)
+ x5frac * x5poly * Math.pow (x, 5.0)
+ x7frac * x7poly * Math.pow (x, 7.0);
&nbsp;
return;
}
&nbsp;
/*
* LatLonToUTMXY
*
* Converts a latitude/longitude pair to x and y coordinates in the
* Universal Transverse Mercator projection.
*
* Inputs:
* lat - Latitude of the point, in radians.
* lon - Longitude of the point, in radians.
* zone - UTM zone to be used for calculating values for x and y.
* If zone is less than 1 or greater than 60, the routine
* will determine the appropriate zone from the value of lon.
*
* Outputs:
* xy - A 2-element array where the UTM x and y values will be stored.
*
* Returns:
* The UTM zone used for calculating the values of x and y.
*
*/
&nbsp;
function LatLonToUTMXY (lat, lon, zone, xy)
{
MapLatLonToXY (lat, lon, UTMCentralMeridian (zone), xy);
&nbsp;
/* Adjust easting and northing for UTM system. */
xy[0] = xy[0] * UTMScaleFactor + 500000.0;
xy[1] = xy[1] * UTMScaleFactor;
&nbsp;
if (xy[1] &lt; 0.0)
xy[1] = xy[1] + 10000000.0;
&nbsp;
return zone;
&nbsp;
}
&nbsp;
/*
* UTMXYToLatLon
*
* Converts x and y coordinates in the Universal Transverse Mercator
* projection to a latitude/longitude pair.
*
* Inputs:
* x - The easting of the point, in meters.
* y - The northing of the point, in meters.
* zone - The UTM zone in which the point lies.
* southhemi - True if the point is in the southern hemisphere;
* false otherwise.
*
* Outputs:
* latlon - A 2-element array containing the latitude and
* longitude of the point, in radians.
*
* Returns:
* The function does not return a value.
*
*/
&nbsp;
function UTMXYToLatLon (x, y, zone, southhemi, latlon)
{
var cmeridian;
x -= 500000.0;
x /= UTMScaleFactor;
&nbsp;
/* If in southern hemisphere, adjust y accordingly. */
if (southhemi)
y -= 10000000.0;
y /= UTMScaleFactor;
&nbsp;
cmeridian = UTMCentralMeridian (zone);
MapXYToLatLon (x, y, cmeridian, latlon);
&nbsp;
return;
&nbsp;
}
&nbsp;
/*
* btnToUTM_onclick
*
* Called when the btnToUTM button is clicked.
*
*/
&nbsp;
function btnToUTM_onclick ()
{
var xy = new Array(2);
&nbsp;
if (isNaN (parseFloat (document.frmConverter.txtLongitude.value))) {
alert (&quot;Please enter a valid longitude in the lon field.&quot;);
&nbsp;
return false;
&nbsp;
}
&nbsp;
lon = parseFloat (document.frmConverter.txtLongitude.value);
&nbsp;
if ((lon &lt; -180.0) || (180.0 &lt;= lon)) {
&nbsp;
alert (&quot;The longitude you entered is out of range. &quot; +
&quot;Please enter a number in the range [-180, 180).&quot;);
&nbsp;
return false;
&nbsp;
}
&nbsp;
if (isNaN (parseFloat (document.frmConverter.txtLatitude.value))) {
&nbsp;
alert (&quot;Please enter a valid latitude in the lat field.&quot;);
&nbsp;
return false;
&nbsp;
}
&nbsp;
lat = parseFloat (document.frmConverter.txtLatitude.value);
&nbsp;
&nbsp;
if ((lat &lt; -90.0) || (90.0 &lt; lat)) {
	alert (&quot;The latitude you entered is out of range. &quot; +
&nbsp;
	&quot;Please enter a number in the range [-90, 90].&quot;);
&nbsp;
return false;
&nbsp;
}
&nbsp;
&nbsp;
// Compute the UTM zone.
zone = Math.floor ((lon + 180.0) / 6) + 1;
zone = LatLonToUTMXY (DegToRad (lat), DegToRad (lon), zone, xy);
&nbsp;
/* Set the output controls. */
document.frmConverter.txtX.value = xy[0];
document.frmConverter.txtY.value = xy[1];
document.frmConverter.txtZone.value = zone;
if (lat &lt; 0)
// Set the S button.
document.frmConverter.rbtnHemisphere[1].checked = true;
else
// Set the N button.
document.frmConverter.rbtnHemisphere[0].checked = true;
&nbsp;
return true;
&nbsp;
}
&nbsp;
/*
* btnToGeographic_onclick
*
* Called when the btnToGeographic button is clicked.
*
*/
&nbsp;
function btnToGeographic_onclick ()
{
latlon = new Array(2);
var x, y, zone, southhemi;
&nbsp;
if (isNaN (parseFloat (document.frmConverter.txtX.value))) {
	alert (&quot;Please enter a valid easting in the x field.&quot;);
&nbsp;
return false;
&nbsp;
}
&nbsp;
x = parseFloat (document.frmConverter.txtX.value);
if (isNaN (parseFloat (document.frmConverter.txtY.value))) {
	alert (&quot;Please enter a valid northing in the y field.&quot;);
&nbsp;
return false;
&nbsp;
}
&nbsp;
y = parseFloat (document.frmConverter.txtY.value);
if (isNaN (parseInt (document.frmConverter.txtZone.value))) {
	alert (&quot;Please enter a valid UTM zone in the zone field.&quot;);
&nbsp;
return false;
&nbsp;
}
zone = parseFloat (document.frmConverter.txtZone.value);
if ((zone &lt; 1) || (60 &lt; zone)) {
	alert (&quot;The UTM zone you entered is out of range. &quot; +
	&quot;Please enter a number in the range [1, 60].&quot;);
&nbsp;
return false;
&nbsp;
}
if (document.frmConverter.rbtnHemisphere[1].checked == true)
	southhemi = true;
else
	southhemi = false;
	UTMXYToLatLon (x, y, zone, southhemi, latlon);
	document.frmConverter.txtLongitude.value = RadToDeg (latlon[1]);
	document.frmConverter.txtLatitude.value = RadToDeg (latlon[0]);
&nbsp;
return true;
&nbsp;
}
&nbsp;
/*
* btnToGoogle_onclick
*
* Called when the btnToGooglebutton is clicked.
*
*/
&nbsp;
function btnToGoogle_onclick ()
{
latlon = new Array(2);
var x, y, zone, southhemi;
if (isNaN (parseFloat (document.frmConverter.txtX.value))) {
	alert (&quot;Please enter a valid easting in the x field.&quot;);
&nbsp;
return false;
&nbsp;
}
x = parseFloat (document.frmConverter.txtX.value);
if (isNaN (parseFloat (document.frmConverter.txtY.value))) {
	alert (&quot;Please enter a valid northing in the y field.&quot;);
&nbsp;
return false;
&nbsp;
}
y = parseFloat (document.frmConverter.txtY.value);
if (isNaN (parseInt (document.frmConverter.txtZone.value))) {
	alert (&quot;Please enter a valid UTM zone in the zone field.&quot;);
&nbsp;
return false;
&nbsp;
}
zone = parseFloat (document.frmConverter.txtZone.value);
if ((zone &lt; 1) || (60 &lt; zone)) {
	alert (&quot;The UTM zone you entered is out of range. &quot; +
	&quot;Please enter a number in the range [1, 60].&quot;);
&nbsp;
return false;
&nbsp;
}
if (document.frmConverter.rbtnHemisphere[1].checked == true)
	southhemi = true;
else
	southhemi = false;
&nbsp;
UTMXYToLatLon (x, y, zone, southhemi, latlon);
document.frmConverter.txtLongitude.value = RadToDeg (latlon[1]);
document.frmConverter.txtLatitude.value = RadToDeg (latlon[0]);
&nbsp;
output = latlon[1], latlon[0]
&nbsp;
return output;
&nbsp;
}
// --&gt;
&lt;/script&gt;
&lt;script src=&quot;http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=ABQIAAAAFJjf-mxSkkinNxdYBv6VpxQTBlyFpWfSu1-0eUDSrXLaoA7N0hQweHWdfaizu9bnb2sEHK_PkELp4g&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
var map;
var geocoder;
function initialize() {
	map = new GMap2(document.getElementById(&quot;map_canvas&quot;));
	map.setCenter(new GLatLng(36, -95), 3);
	geocoder = new GClientGeocoder();
	map.addControl(new GSmallMapControl());
	var mapControl = new GMapTypeControl();
	map.addControl(mapControl);
	map.addControl(new GOverviewMapControl());
	var mapControl = new GMapTypeControl();
	map.addControl(mapControl);
}
// addAddressToMap() is called when the geocoder returns an
// answer. It adds a marker to the map with an open info window
// showing the nicely formatted version of the address and the country code.
function addAddressToMap(response) {
	map.clearOverlays();
	if (!response || response.Status.code != 200) {
		alert(&quot;Sorry, we were unable to geocode that address&quot;);
} 	else {
		place = response.Placemark[0];
		point = new GLatLng(place.Point.coordinates[1],
		place.Point.coordinates[0]);
		marker = new GMarker(point);
		map.addOverlay(marker);
	}
}
// showLocation() is called when you click on the Search button
// in the form. It geocodes the address entered into the form
// and adds a marker to the map at that location.
function showLocation() {
	var address = document.forms[0].q.value;
	geocoder.getLocations(address, addAddressToMap);
}
// findLocation() is used to enter the sample addresses into the form.
function findLocation(address) {
	document.forms[0].q.value = address;
	showLocation();
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload=&quot;initialize()&quot; onunload=&quot;GUnload()&quot;&gt;
&lt;form NAME=&quot;frmConverter&quot; action=&quot;#&quot; onsubmit=&quot;showLocation(); return false;&quot;&gt;
&lt;table BORDER=0&gt;
&lt;!-- Header row --&gt;
&lt;tr&gt;
&lt;th COLSPAN=2 ALIGN=center&gt;Geographic&lt;br /&gt;(&lt;em&gt;decimal degrees&lt;/em&gt;)&lt;/th&gt;
&lt;th ALIGN=center&gt;To/From&lt;/th&gt;
&lt;th COLSPAN=2 ALIGN=center&gt;UTM&lt;/th&gt;
&lt;/tr&gt;
&lt;!-- The size attribute for the button input keeps the control
from looking too bad on browsers that don't support buttons
(even though the control is useless in this case).
The &amp;gt; code is used for browsers that will interpret the
first right angle bracket in the VALUE field as the tag
terminator. --&gt;
&lt;tr&gt;
&lt;td ALIGN=right&gt;lon&lt;/td&gt;
&lt;td&gt;&lt;input TYPE=text SIZE=20 NAME=&quot;txtLongitude&quot; VALUE=&quot;&quot; id=&quot;field_long&quot;/&gt;&lt;/td&gt;
&lt;td ALIGN=center&gt;&lt;input TYPE=button SIZE=4 NAME=btnToUTM VALUE=&quot;&amp;gt;&amp;gt;&quot; onclick=&quot;btnToUTM_onclick()&quot;/&gt; &lt;/td&gt;
&lt;td ALIGN=right&gt;x&lt;/td&gt;
&lt;td&gt;&lt;input TYPE=text SIZE=20 NAME=&quot;txtX&quot; VALUE=&quot;&quot;/&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;!-- Northing row (plus command button) --&gt;
&lt;tr&gt;
&lt;td ALIGN=right&gt;lat&lt;/td&gt;
&lt;td&gt;&lt;input TYPE=text SIZE=20 NAME=&quot;txtLatitude&quot; VALUE=&quot;&quot; id=&quot;field_lat&quot;/&gt;&lt;/td&gt;
&lt;td ALIGN=center&gt;&lt;input TYPE=button SIZE=4 NAME=btnToGeographic VALUE=&quot;&lt;&lt;&quot; onclick=&quot;btnToGeographic_onclick ()&quot;/&gt;&lt;/td&gt;
&lt;td ALIGN=right&gt;y&lt;/td&gt;
&lt;td&gt;&lt;input TYPE=text SIZE=20 NAME=&quot;txtY&quot; VALUE=&quot;&quot;/&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;!-- UTM zone row --&gt;
&lt;tr&gt;
&lt;td COLSPAN=3&gt;&lt;/td&gt;
&lt;td ALIGN=right&gt;zone&lt;/td&gt;
&lt;td&gt;&lt;input TYPE=text SIZE=4 NAME=&quot;txtZone&quot; VALUE=&quot;&quot;/&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;!-- Hemisphere row --&gt;
&lt;tr&gt;
&lt;td COLSPAN=3&gt;&lt;/td&gt;
&lt;td COLSPAN=2&gt;
hemisphere
&lt;!-- onclick properties circumvent a Netscape bug that reverses
the indices of the buttons --&gt;
&lt;input TYPE=radio NAME=&quot;rbtnHemisphere&quot; VALUE=&quot;N&quot; CHECKED onclick=&quot;0&quot;/&gt;N
&lt;input TYPE=radio NAME=&quot;rbtnHemisphere&quot; VALUE=&quot;S&quot; onclick=&quot;0&quot;/&gt;S
&lt;/td&gt;
&lt;/tr&gt;
&lt;!-- To Google --&gt;
&lt;tr&gt;
&lt;td COLSPAN=1&gt;&lt;input TYPE=hidden SIZE=20 VALUE=&quot;http://maps.google.com/maps?q=&quot; id=&quot;url&quot;/&gt; &lt;input TYPE=hidden SIZE=20 VALUE=&quot;, &quot; id=&quot;comma&quot;/&gt;&lt;/td&gt;
&lt;td COLSPAN=1 ALIGN=right&gt;Google Maps...&lt;/td&gt;
&lt;td ALIGN=left&gt;&lt;input TYPE=button SIZE=4 VALUE=&quot;Load&quot; onclick=&quot;document.getElementById('google').value=(document.getElementById('url').value) + (document.getElementById('field_lat').value) + (document.getElementById('comma').value) + (document.getElementById('field_long').value)&quot; /&gt;&lt;/td&gt;
&nbsp;
&lt;/tr&gt;
&lt;/table&gt;
&lt;!-- To Browser --&gt;
&lt;tr&gt;
&lt;td ALIGN=left&gt;&lt;input TYPE=text SIZE=80 NAME=output VALUE=&quot;&quot; id=&quot;google&quot; &lt;/TD/&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;div id=&quot;map_canvas&quot; style=&quot;width: 100%; height: 350px&quot;&gt;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;Click in the text box then map it!
&lt;input type=&quot;text&quot; name=&quot;q&quot; value=&quot;&quot; class=&quot;address_input&quot; id=&quot;search&quot; size=&quot;40&quot; onclick=&quot;document.getElementById('search').value=(document.getElementById('field_lat').value) + (document.getElementById('comma').value) + (document.getElementById('field_long').value)&quot;/&gt;
&lt;input type=&quot;submit&quot; name=&quot;find&quot; value=&quot;Go...&quot; /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;/tr&gt;
&lt;/form&gt;
&nbsp;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/PuuyMPoYeYU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/10/25/geographic-to-utm-converter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.adamestrada.com/2009/10/25/geographic-to-utm-converter/</feedburner:origLink></item>
		<item>
		<title>GDAL: the definitive FREE GIS software</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/XZ-v30Df_tU/</link>
		<comments>http://www.adamestrada.com/2009/10/05/gdal-the-definitiv-free-gis-software/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 01:07:57 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[GDAL]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=327</guid>
		<description><![CDATA[This field is growing and there are a lot of GIS software applications out there to choose from but I am learning that many of you really don&#8217;t understand how powerful GDAL/OGR and the FWTools suite really is. When duty calls and I need to do some heavy reprojecting, import/export, compression, etc&#8230;I usually always go [...]]]></description>
			<content:encoded><![CDATA[<p>This field is growing and there are a lot of GIS software applications out there to choose from but I am learning that many of you really don&#8217;t understand how powerful <a href="http://gdal.org/" target="_blank">GDAL/OGR</a> and the <a href="http://fwtools.maptools.org/" target="_blank">FWTools</a> suite really is. When duty calls and I need to do some heavy reprojecting, import/export, compression, etc&#8230;I usually always go to GDAL and FWTools to get the job done.</p>
<p><a rel="attachment wp-att-328" href="http://www.adamestrada.com/2009/10/05/gdal-the-definitiv-free-gis-software/200px-gdallogocolor-svg/"><img class="size-full wp-image-328  alignleft" src="http://www.adamestrada.com/wp-content/uploads/2009/10/200px-GDALLogoColor.svg.png" alt="GDAL" width="77" height="85" /></a></p>
<p>The following utility programs are distributed with GDAL and are among the most powerful command line GIS applications available today. I for one have beaten <a href="http://www.gdal.org/gdalwarp.html" target="_blank">gdalwarp</a> to death! I will include all that it can do in later posts. Until then, here is the list of what is included in the <a href="http://fwtools.maptools.org/" target="_blank">FWTools</a> installer for Windows and Linux.</p>
<blockquote>
<ul>
<li><a href="http://gdal.org/gdalinfo.html">gdalinfo</a> &#8211; report information about a file.</li>
<li> <a href="http://gdal.org/gdal_translate.html">gdal_translate</a> &#8211; Copy a raster file, with control of output format.</li>
<li> <a href="http://gdal.org/gdaladdo.html">gdaladdo</a> &#8211; Add overviews to a file.</li>
<li> <a href="http://gdal.org/gdalwarp.html">gdalwarp</a> &#8211; Warp an image into a new coordinate system.</li>
<li> <a href="http://gdal.org/gdaltindex.html">gdaltindex</a> &#8211; Build a MapServer raster tileindex.</li>
<li> <a href="http://gdal.org/gdalbuildvrt.html">gdalbuildvrt</a> &#8211; Build a VRT from a list of datasets.</li>
<li> <a href="http://gdal.org/gdal_contour.html">gdal_contour</a> &#8211; Contours from DEM.</li>
<li> <a href="http://gdal.org/gdaldem.html">gdaldem</a> &#8211; Tools to analyze and visualize DEMs.</li>
<li> <a href="http://gdal.org/rgb2pct.html">rgb2pct.py</a> &#8211; Convert a 24bit RGB image to 8bit paletted.</li>
<li> <a href="http://gdal.org/pct2rgb.html">pct2rgb.py</a> &#8211; Convert an 8bit paletted image to 24bit RGB.</li>
<li> <a href="http://gdal.org/gdal_merge.html">gdal_merge.py</a> &#8211; Build a quick mosaic from a set of images.</li>
<li> <a href="http://gdal.org/gdal2tiles.html">gdal2tiles.py</a> &#8211; Create a TMS tile structure, KML and simple web viewer.</li>
<li> <a href="http://gdal.org/gdal_rasterize.html">gdal_rasterize</a> &#8211; Rasterize vectors into raster file.</li>
<li> <a href="http://gdal.org/gdaltransform.html">gdaltransform</a> &#8211; Transform coordinates.</li>
<li> <a href="http://gdal.org/nearblack.html">nearblack</a> &#8211; Convert nearly black/white borders to exact value.</li>
<li> <a href="http://gdal.org/gdal_retile.html">gdal_retile.py</a> &#8211; Retiles a set of tiles and/or build tiled pyramid levels.</li>
<li> <a href="http://gdal.org/gdal_grid.html">gdal_grid</a> &#8211; Create raster from the scattered data.</li>
<li> <a href="http://gdal.org/gdal_proximity.html">gdal_proximity.py</a> &#8211; Compute a raster proximity map.</li>
<li> <a href="http://gdal.org/gdal_polygonize.html">gdal_polygonize.py</a> &#8211; Generate polygons from raster.</li>
<li> <a href="http://gdal.org/gdal_sieve.html">gdal_sieve.py</a> &#8211; Raster Sieve filter.</li>
<li> <a href="http://gdal.org/gdal_fillnodata.html">gdal_fillnodata.py</a> &#8211; Interpolate in nodata regions.</li>
<li> <a href="http://gdal.org/gdal-config.html">gdal-config</a> &#8211; Get options required to build software using GDAL.</li>
</ul>
</blockquote>
<p>Note that a lot of these apps are python scripts than can be run just about anywhere. I have done quite a bit of processing with FWTools apps, especially gdalwarp, gdal_translate and then gdal_contour. If you have a project that requires some serious processing power, check some of these out. You won&#8217;t be disappointed&#8230;<strong>Note: </strong>Most FOSS GIS applications available today use GDAL and OGR on the back end in some way, shape or form. See <a href="http://trac.osgeo.org/gdal/wiki/SoftwareUsingGdal" target="_blank">the list here</a>!</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/XZ-v30Df_tU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/10/05/gdal-the-definitiv-free-gis-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.adamestrada.com/2009/10/05/gdal-the-definitiv-free-gis-software/</feedburner:origLink></item>
		<item>
		<title>If you build it, they will come…</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/F_DcBy5edX8/</link>
		<comments>http://www.adamestrada.com/2009/10/02/if-you-build-it-they-will-come/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 19:06:40 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[Data]]></category>
		<category><![CDATA[GeoSpatial]]></category>
		<category><![CDATA[Services]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[WFS]]></category>
		<category><![CDATA[WMS]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=319</guid>
		<description><![CDATA[If you create a web service, no matter what, someone out there will use it! This is a fact and these days there is a web service for just about everything from the weather to where the most recent earthquakes are. There are private instances and publicly available ones that are designed to sell more [...]]]></description>
			<content:encoded><![CDATA[<p>If you create a web service, no matter what, someone out there will use it! This is a fact and these days there is a web service for just about everything from the <a href="http://nowcoast.noaa.gov/" target="_blank">weather</a> to where the <a href="http://earthquake.usgs.gov/eqcenter/catalogs/" target="_blank">most recent earthquakes</a> are. There are private instances and <a href="http://www.esri.com/software/arcgis/arcgisonline/map-services.html" target="_blank">publicly available</a> ones that are designed to sell more software licenses. There are also a <a href="http://www.geopole.org/wms" target="_blank">wide variety of free services</a> out there for you to choose from but all in all, my point is that with this whole Geoweb phenomenon I think the days of creating your own truly unique data sets will be coming to a slow halt. I foresee geo-minded folks utilizing what other people have created in their apps and why not? It saves time and money which is what really matters, huh?</p>
<p>The nature of our business and the data we use is so simple! We deal with pixels, points, lines and polygons that can be manipulated a million different ways through attribution and symbology. There are <a href="http://www.opengeospatial.org/" target="_blank">format-specific standards</a> to adhere to and models on how <a href="http://www.niem.gov/" target="_blank">store and disseminate</a> them so why not leverage what other people have created and published. I for one am constantly on the lookout for more data and software that will gobble it up. This is where applications (on the web) like <a href="http://www.geocommons.com" target="_blank">GeoCommons</a> and <a href="http://www.weogeo.com" target="_blank">WeoGeo</a> come in to play. They allow you to publish your data, do stuff with it and then open it up for anyone to reuse. WeoGeo&#8217;s model is pretty cool because they also allow you to monetize on other people using your data by selling it as the owner sees fit. GeoCommons has <a href="http://finder.geocommons.com/" target="_blank">Finder</a>! and <a href="http://maker.geocommons.com/" target="_blank">Maker</a>! which really help you upload or search for data and then create some cool maps but they have a model that is more like <a href="http://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> or <a href="http://cloudmade.com/" target="_blank">Cloudmade</a>. My opinion on this is that free data is good data <img src='http://www.adamestrada.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  If you&#8217;re self sufficient enough to have your own IT infrastructure and want to publish your data that way, look at ArcGIS Server or the two competing FOSS options <a href="http://geoserver.org/display/GEOS/Welcome" target="_blank">GeoServer</a> and <a href="http://mapserver.org/" target="_blank">MapServer</a>.</p>
<div class="wp-caption alignright" style="width: 70px"><a href="http://www.qgis.org/"><img title="QGIS" src="http://www.qgis.org/templates/qgis/images/blue/logo.png" alt="QGIS" width="60" height="60" /></a><p class="wp-caption-text">QGIS</p></div>
<p>I am a Mac user and use <a href="http://www.qgis.org/" target="_blank">QGIS</a> pretty extensively to read <a href="http://www.opengeospatial.org/standards/wms" target="_blank">WMS</a> and <a href="http://www.opengeospatial.org/standards/wfs" target="_blank">WFS</a> services that I come across over the web. I encourage anyone out there to do the same thing as the latest and greatest build of QGIS is REALLY nice! So I guess my question is, where are the services that you use the most?</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/F_DcBy5edX8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/10/02/if-you-build-it-they-will-come/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.adamestrada.com/2009/10/02/if-you-build-it-they-will-come/</feedburner:origLink></item>
		<item>
		<title>Selenium for Web Site testing</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/FJVIyix2Iao/</link>
		<comments>http://www.adamestrada.com/2009/09/25/selenium-for-web-site-testing/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 15:39:02 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[Automated Testing]]></category>
		<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=313</guid>
		<description><![CDATA[
Selenium is a FREE suite of tools to automate web app testing across many platforms. Click here to see a list of all the Selenium projects&#8230;I particularly like the Firefox plugin!
]]></description>
			<content:encoded><![CDATA[<p><a href="http://seleniumhq.org/" target="_blank"><img class="alignright" src="http://seleniumhq.org/images/big-logo.png" alt="Selenium Logo" width="200" height="181" /></a></p>
<p><strong>Selenium is a FREE suite of tools</strong> to automate web app testing across many platforms. <a href="http://seleniumhq.org/projects/" target="_blank">Click here</a> to see a list of all the Selenium projects&#8230;I particularly like the <a href="http://seleniumhq.org/projects/ide/" target="_blank">Firefox plugin</a>!</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/FJVIyix2Iao" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/09/25/selenium-for-web-site-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.adamestrada.com/2009/09/25/selenium-for-web-site-testing/</feedburner:origLink></item>
		<item>
		<title>Customizing config.xml in the ESRI FlexViewer</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/5ytxvR1h8Bw/</link>
		<comments>http://www.adamestrada.com/2009/09/24/customizing-config-xml-in-the-esri-flexviewer/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 03:47:43 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[ESRI]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[MXML]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=306</guid>
		<description><![CDATA[Customizing config.xml in the ESRI FlexViewer]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re relatively new to Flex (like me), you will have noticed that a lot of the functionality in this framework is geared towards WebServices and external XML calls. If you&#8217;re also a #geonerd and love <a href="http://www.adobe.com/products/flex/">Flex</a>, you&#8217;ve probably come across the FlexViewer example on <a href="http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&amp;scriptID=15905">ESRI&#8217;s website</a>. This is an awesome and very powerful example of all that Flex can give you right out of the box. The challenge here is that you have to learn how to weed though all the different classes and other bologna in order to understand exactly what is going on.</p>
<p>My latest challenge was deploying an application that referenced several .NET web services that were GOING to change once delivered to the customer. So, it made no sense what so ever to hard code the URL&#8217;s for the web services in the application it self. I decided to add them to config.xml which is at the root of the web application. This file behaves much in the same way as the web.config file that is created on-the-fly in your .NET web application. This one, however, holds things elements like URLs, queries, logo assignments and like in this example, paths to web services.</p>
<p>Once you figure out what is going on, this is relatively simple to do so I hope that this example helps to put things in to perspective for you.</p>
<p>First things first&#8230;You have to first grab the XML file and because this is a web application, you are able to use <a href="http://livedocs.adobe.com/flex/3/langref/mx/rpc/http/HTTPService.html" target="_blank">HTTPService()</a> to call you file on the server. My biggest &#8220;idiot&#8221; moment was caused because this file is at the root of the application while most of the &#8220;config&#8221; files that ride along with their corresponding .swf&#8217;s are in the same directory. No matter!  See the code below that will show you how to connect to your config.xml file.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p306code19'); return false;">View Code</a> ACTIONSCRIPT3</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p30619"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code" id="p306code19"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> doInit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
        <span style="color: #0033ff; font-weight: bold;">try</span> <span style="color: #000000;">&#123;</span>
	        <span style="color: #6699cc; font-weight: bold;">var</span> initService<span style="color: #000066; font-weight: bold;">:</span>HTTPService = <span style="color: #0033ff; font-weight: bold;">new</span> HTTPService<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	        initService<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">url</span> = <span style="color: #990000;">&quot;config.xml&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
		initService<span style="color: #000066; font-weight: bold;">.</span>resultFormat = <span style="color: #990000;">&quot;e4x&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
		initService<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>ResultEvent<span style="color: #000066; font-weight: bold;">.</span>RESULT<span style="color: #000066; font-weight: bold;">,</span> initResult<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		initService<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">send</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
		<span style="color: #0033ff; font-weight: bold;">catch</span><span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=error%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:error.html"><span style="color: #004993;">Error</span></a><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			showMessage<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">message</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Note that this function has an event lister (addEventListener) that calls another function which in this case is called &#8220;initResult&#8221;. Also note that with all Actionscript, it&#8217;s pretty good practice to use try/catch statements in all of your functions. Actually, isn&#8217;t this true in any programming language?</p>
<p>Now, on to the next function! This is the function that actually does the work and populates an &#8220;Object&#8221; with the data your specify from your XML file. Please note that I added an extra root node to config.xml called &lt;ServiceURL&gt;. Under that we have &lt;service&gt; and under that we&#8217;ve got &lt;url&gt; and &lt;name&gt;. I am merely trying to retrieve a URL based on a service name so if we do a query for &lt;name&gt;, the URL for that name will be returned.  w00t! The function called &#8220;initResult&#8221; is as follows.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p306code20'); return false;">View Code</a> ACTIONSCRIPT3</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p30620"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code" id="p306code20"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> initResult<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span>ResultEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">try</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> serviceArray<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a> = <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> serviceXML<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=xml%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:xml.html"><span style="color: #004993;">XML</span></a> = event<span style="color: #000066; font-weight: bold;">.</span>result <span style="color: #0033ff; font-weight: bold;">as</span> <a href="http://www.google.com/search?q=xml%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:xml.html"><span style="color: #004993;">XML</span></a><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> serviceList<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=xmllist%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:xmllist.html"><span style="color: #004993;">XMLList</span></a> = serviceXML<span style="color: #000066; font-weight: bold;">..</span>service<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span>i = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span> serviceList<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> = serviceList<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> = serviceList<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #6699cc; font-weight: bold;">var</span> serviceURL<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a> =
				<span style="color: #000000;">&#123;</span>
					<span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">,</span>
					<span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">url</span>
				<span style="color: #000000;">&#125;</span>
					<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">url</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
		serviceArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>serviceURL<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
			<span style="color: #0033ff; font-weight: bold;">catch</span> <span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=error%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:error.html"><span style="color: #004993;">Error</span></a><span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
    			    showMessage<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">message</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>You&#8217;ll first notice that I created an Array.</p>
<blockquote><p>var serviceArray:Array = [];</p></blockquote>
<p>I then grabbed the resulting event as XML from the event listener.</p>
<blockquote><p>var serviceXML:XML = event.result as XML;</p></blockquote>
<p>. From there I searched down through the XML file for the root node I was looking for which in this case was called &#8220;service&#8221; in the XML file:</p>
<blockquote><p>var serviceList:XMLList = serviceXML..service;</p></blockquote>
<p>. Finally, I looped through the file to find all the data in the  tags using a *for* loop.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p306code21'); return false;">View Code</a> ACTIONSCRIPT3</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p30621"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code" id="p306code21"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span>i = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span> serviceList<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> = serviceList<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> = serviceList<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> serviceURL<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a> =
		<span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">,</span>
			<span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">url</span>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">url</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
serviceArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>serviceURL<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div>

<p>There are a couple things to notice here.<br />
1. You can loop through anything in an XML file&#8230;you&#8217;ve just got to know what you&#8217;re looking for.<br />
2. It&#8217;s absolutely mandatory that you create an :Object and populate it using the .push command.</p>
<blockquote><p>serviceArray.push(serviceURL);</p></blockquote>
<p>What you&#8217;ve got now is an Object that has all of the information that you can readily reuse when the page/site loads.</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/5ytxvR1h8Bw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/09/24/customizing-config-xml-in-the-esri-flexviewer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.adamestrada.com/2009/09/24/customizing-config-xml-in-the-esri-flexviewer/</feedburner:origLink></item>
		<item>
		<title>Wordpress as a CMS</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/wPOQBHFbf_c/</link>
		<comments>http://www.adamestrada.com/2009/09/22/wordpress-as-a-cms/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 01:42:34 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[GIS]]></category>
		<category><![CDATA[GeoCommons]]></category>
		<category><![CDATA[GIS For Everyone!]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=273</guid>
		<description><![CDATA[GeoCommons, Wordpress to CMS and embedded maps!]]></description>
			<content:encoded><![CDATA[<p>We (my team and I) just finished a little prototype effort between <a href="http://www.zekiah.com/" target="_blank">Zekiah</a> and <a href="http://fortiusone.com/" target="_blank">FortiusOne</a> that required a private instance of <a href="http://www.geocommons.com/" target="_blank">GeoCommons</a> that meshed up nicely with a <a href="http://wordpress.org/" target="_blank">Wordpress</a> UI. The deal with Wordpress (if you don&#8217;t already know) is that it&#8217;s a pretty robust blogging platform which means that you can add your own content and syndicate it out as needed <strong><em>but </em></strong>the core software is pretty limited if you want to privatize the data you&#8217;re serving out.</p>
<p><strong>The Project:</strong></p>
<p><a href="http://maps.google.com/maps?oe=UTF-8&amp;q=Green+Mountain+Falls,+Colorado&amp;ie=UTF8&amp;hq=&amp;hnear=Green+Mountain+Falls,+CO&amp;gl=us&amp;ei=WnG5SsPxBoXO8QbA5uFi&amp;t=h&amp;z=13&amp;iwloc=A" target="_blank">Green Mountain Falls, Colorado</a> is a little municipality in the middle-of-nowhere Colorado but they do have a requirement to serve up their proprietary geospatial data to both the general public and then to those who really need it like their Fire and Police Departments.  I won&#8217;t go in to why the GMF data is private as certain <a href="http://highearthorbit.com/" target="_blank">geo-type people</a> go richter over the whole &#8220;my data is private&#8221; issue, but I will say that GMF does have their reasons. We begged and pleaded with the folks at FortiusOne to work with us on this endeavor because their core technology is absolutely what the doctor ordered. There are a lot of reasons why <a href="http://www.geocommons.com">GeoCommons</a> (GC) was the best solution so I will only elaborate on a few.</p>
<ol>
<li>GeoCommons is literally so easy <a href="http://www.youtube.com/watch?v=3F3qzfTCDG4" target="_blank">a cave man can do it</a>. With a private instance, we were able to upload our own data and show/hide it as needed in the final UI.</li>
<li>You can pick and choose from your own base maps so Google, Bing and <a href="http://www.openstreetmap.org/" target="_blank">OSM</a> are all options to use for your final compiled cartogram.</li>
<li>Cartography, cartography, cartography!!! You gotta give it to the F1 team&#8230;they&#8217;ve provided a robust desktop-like GIS symbolization and thematic mapping experience on the web and in this case all in a private instance of GC in <a href="http://aws.amazon.com/ec2/" target="_blank">the Cloud</a>.</li>
</ol>
<p><strong>The Problem:</strong></p>
<p>Green Mountain Falls has private data&#8230;These data are from their roads network and also in their unique way of representing parcels in the town. I&#8217;d have to refer to another source to fully explain this whole thing&#8230;Bottom line is that all of their geospatial data could not be 100% open to the rest of the world. Like I mentioned earlier, we stored it a private instance or GeoCommons and then applied some role-based authentication to the layers using the <a href="http://github.com/geocommons/api/">GeoCommons API</a> and a couple pieces of Wordpress magic.</p>
<p>Wordpress has literally thousands of <a href="http://wordpress.org/extend/plugins/" target="_blank">plugins</a> that you can pick and choose from to run and enhance your blog. We weren&#8217;t interested in <a href="http://en.wikipedia.org/wiki/Search_engine_optimization" target="_blank">SEO</a> or any of that other jazz that really helps your site get noticed! We were interested in safe-guarding the data. In Wordpress, there are two plugins in particular that will allow you to do this!</p>
<blockquote><p><a href="http://wordpress.org/extend/plugins/capsman/" target="_blank">Capability Manager</a> &#8211;  The Capability Manager plugin provides a simple way to manage role capabilities. Using it, you will be able to change the capabilities of any role, add new roles, copy existing roles into new ones, and add new capabilities to existing roles. You can also delegate capabilities management to other users. In this case, some restrictions apply to this users, as them can only set/unset the capabilities they have. With the Backup/Restore tool, you can save your Roles and Capabilities before making changes and revert them if something goes wrong. You&#8217;ll find it on the Tools menu. At the current version, you cannot manage capabilities at user level (only can be managed for roles). This will be included in next versions.</p></blockquote>
<p>The Capabilities Manager gave us an easy way to create and assign new roles to GMF users. I encourage everyone to check this plugin out!</p>
<blockquote><p><a href="http://wordpress.org/extend/plugins/user-access-manager/" target="_blank">User Access Manager</a> &#8211; With the &#8220;User Access Manager&#8221;-plugin you can manage the access to your posts, pages and files. You only create a user group, put registered users to this and set up the rights for this group. From now on the post/page is only accessible and writable for the specified group. This plugin is useful if you need a member area or a private section at your blog or you want that other people can write at your blog but not everywhere.</p></blockquote>
<p>With UAM, we were able to show and hide Wordpress pages so that only certain Users and User Groups could see them.</p>
<p><strong>How did you mashup your GeoCommons Maps?</strong></p>
<p>Simple! Just like Google, Bing and Yahoo, GeoCommons allows you to embed your map directly in to your own website! See the graphic below&#8230;Note: in the map you create, you can select the &#8220;Details&#8221; button in the top-right corner of the screen which will present you with the code to embed your map. Copy and paste and you&#8217;re set!</p>
<div id="attachment_274" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.gmf.geoiq.com"><img class="size-medium wp-image-274" title="geotagged flickr photos in asia and africa with crunchbase at GeoCommons Maker!-2" src="http://www.adamestrada.com/wp-content/uploads/2009/09/geotagged-flickr-photos-in-asia-and-africa-with-crunchbase-at-GeoCommons-Maker-2-300x142.jpg" alt="geotagged flickr photos in asia and africa with crunchbase at GeoCommons Maker!-2" width="300" height="142" /></a><p class="wp-caption-text">Embedding GeoCommons Maps!</p></div>
<p>Sample code to embed a GeoCommons map in to your own website is as follows&#8230;</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p273code22'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p27322"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code" id="p273code22"><pre class="javascript" style="font-family:monospace;">&lt;style&gt;#maker_map_1809 {width: 100%; height: 100%;}&lt;/style&gt;
  &lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot; src=&quot;http://maker.geocommons.com/javascripts/embed.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;
  Maker.maker_host='http://maker.geocommons.com';Maker.finder_host='http://finder.geocommons.com';Maker.core_host='http://core.geocommons.com';
  Maker.load_map(&quot;maker_map_1809&quot;, &quot;1809&quot;);
&lt;/script&gt;
&lt;div class=&quot;geocommons_map&quot; id=&quot;maker_map_1809&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;a class=&quot;geocommons_map_link&quot; id=&quot;maker_map_1809_link&quot; href=&quot;http://maker.geocommons.com/maps/1809&quot;&gt;View full map&lt;/a&gt;</pre></td></tr></table></div>

<p>I&#8217;d really like to thank <a href="http://www.maploser.com">Kate Chapman</a>, <a href="http://www.highearthorbit.com">Andrew Turner</a> and the folks on the Zekiah team (<a href="http://geobabble.wordpress.com">you know who you are</a>) for helping to put this proof of concept together! Wanna see the <a href="http://blog.gmf.geoiq.com">Green Mountain Falls site</a> in action? Geez&#8230;Click on the screen grab below to access it!<div id="attachment_283" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.adamestrada.com/2009/09/22/wordpress-as-a-cms/dock-1-3/" rel="attachment wp-att-283"><img src="http://www.adamestrada.com/wp-content/uploads/2009/09/Dock-12-300x213.jpg" alt="Green Mountain Falls, Colorado" title="Dock-1" width="300" height="213" class="size-medium wp-image-283" /></a><p class="wp-caption-text">Green Mountain Falls, Colorado</p></div></p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/wPOQBHFbf_c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/09/22/wordpress-as-a-cms/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<georss:point>38.940363 -105.013385</georss:point><geo:lat>38.940363</geo:lat><geo:long>-105.013385</geo:long>	<feedburner:origLink>http://www.adamestrada.com/2009/09/22/wordpress-as-a-cms/</feedburner:origLink></item>
		<item>
		<title>ESRI FlexViewer and Error: 1065</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/U-zhsfX8eaQ/</link>
		<comments>http://www.adamestrada.com/2009/09/08/esri-flexviewer-and-error-1065/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 13:12:51 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[ESRI]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[MXML]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[FlashBuilder]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=265</guid>
		<description><![CDATA[Flex, FlashBuilder, Error 1065]]></description>
			<content:encoded><![CDATA[<p>I am working on a project right now that I have been able to use the new <a href="http://labs.adobe.com/technologies/flashbuilder4/" target="_blank">FlashBuilder</a> beta to develop on. I chose this platform because Adobe has made it all too easy to integrate with .NET web services. You can literally just point to a <a href="http://www.w3.org/TR/wsdl" target="_blank">WSDL</a> and FlashBuilder will generate all the code behind for you. What is really cool and a huge time saver is that you can bind controls back to the pre-generated <a href="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete" target="_blank">CRUD</a> operations from the web service. I switch the page I&#8217;m working on to design mode and then drag a form on the canvas. A simple right click to access the &#8220;Bind&#8221; operation and voila! You&#8217;re ready to deploy! Not really&#8230;but man it gets you close.</p>
<p>Because I am also developing a mapping application using ESRI&#8217;s <a href="http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&amp;scriptID=15905" target="_blank">FlexViewer</a> framework, I have to integrate my CRUD forms in to the ESRI environment. Needless to say, this caused all kinds of problems! When I created a project outside of the FlexViewer project, everything worked perfectly! As soon as I tried to integrate it in to FlexVewer as a floating widget&#8230;Kaboom! I got the dreaded 1065 error. If you are reading this, it&#8217;s probably because you came across this error as well and found this page on the interwebs.</p>
<p><strong><code> Error #1065: Variable x is not defined.</code></strong></p>
<p>This error is a bit misleading because &#8220;Variable x&#8221; is actually a class that when integrated in to the FlexViewer framework get pushed out of scope or what some call, &#8220;Optimized out&#8221;. To get your code running in FlexViewer, you can&#8217;t just declare each variable/class as public! You have to declare each of them in Index.mxml which is the Application root. Please stick with the following syntax in order for your code to work properly.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p265code23'); return false;">View Code</a> ACTIONSCRIPT3</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p26523"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p265code23"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">d</span><span style="color: #000066; font-weight: bold;">:</span>services<span style="color: #000066; font-weight: bold;">.</span>distributionlist<span style="color: #000066; font-weight: bold;">.</span>RegionUser = <span style="color: #0033ff; font-weight: bold;">new</span> services<span style="color: #000066; font-weight: bold;">.</span>distributionlist<span style="color: #000066; font-weight: bold;">.</span>RegionUser<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div>

<p>Doing this in Index.mxml will make your class public enough to be used throughout the entire application and you won&#8217;t get the #1065 error any longer. I certainly can&#8217;t take all the credit for this. I have to Google the crap out of this and came across <a href="http://www.actionscript.org/forums/showthread.php3?t=177903">Simon&#8217;s post here</a>. Hats off to you Simon for helping me out!!!</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/U-zhsfX8eaQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/09/08/esri-flexviewer-and-error-1065/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<georss:point>38.881579 -77.103339</georss:point><geo:lat>38.881579</geo:lat><geo:long>-77.103339</geo:long>	<feedburner:origLink>http://www.adamestrada.com/2009/09/08/esri-flexviewer-and-error-1065/</feedburner:origLink></item>
		<item>
		<title>How to copy music from your iPod to your iPhone</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/FyWJ7KY1fZM/</link>
		<comments>http://www.adamestrada.com/2009/08/21/how-to-copy-music-from-your-ipod-to-your-iphone/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 19:54:54 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPod]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=258</guid>
		<description><![CDATA[A couple weeks ago, we got Allison an iPhone and put her on my AT&#38;T account. She also has an iPod that was originally synced up with an older PC and I found that there was no easy way to move files from the iPod to the iPhone without erasing everything on the iPod. I [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignright" style="width: 138px"><img title="iLinkPod" src="http://homepage.mac.com/giancarloerra/ilinkpod/logo.png" alt="iLinkPod" width="128" height="128" /><p class="wp-caption-text">iLinkPod</p></div>
<p>A couple weeks ago, we got Allison an iPhone and put her on my AT&amp;T account. She also has an iPod that was originally synced up with an older PC and I found that there was no easy way to move files from the iPod to the iPhone without erasing everything on the iPod. I did a little Googling and came across <a href="http://www.ilinkpod.com/" target="_blank">iLinkPod</a> which worked wonderfully and for free too! So how does it work??? Easy, it creates a shortcut folder on the desktop pointing to your iPod so that you can add files to your personal iTunes Library.</p>
<p><strong>Step 1:</strong> Download the application! <a href="http://homepage.mac.com/giancarloerra/ilinkpod/iLinkPod.dmg" target="_self">Get it here</a>&#8230;</p>
<p><strong>Step 2:</strong> Hook up your iPod (DO NOT SELECT THE ERASE AND SYNC OPTION in iTunes) and then launch iLinkPod. Select the first button to &#8220;Select your iPod&#8221;</p>
<div id="attachment_259" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.adamestrada.com/wp-content/uploads/2009/08/iLinkPod.jpg"><img class="size-medium wp-image-259 " title="iLinkPod" src="http://www.adamestrada.com/wp-content/uploads/2009/08/iLinkPod-300x168.jpg" alt="Select you iPod" width="300" height="168" /></a><p class="wp-caption-text">Select you iPod</p></div>
<p><strong>Step 3:</strong> Click the button that says, &#8220;iLinkPod!&#8221; and review the console to make sure it successfully connected and retrieved your files.</p>
<blockquote><p>Creating folder iLinkPodFolder on your desktop&#8230;OK</p>
<p>YOUR FILE LIST</p>
<p>&#8230;done&#8230;that&#8217;s all!</p></blockquote>
<p><strong>Step 4:</strong> Now open iTunes and browse to File | Add to Library&#8230;</p>
<div id="attachment_260" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.adamestrada.com/wp-content/uploads/2009/08/AddToLibrary.jpg"><img class="size-medium wp-image-260" title="AddToLibrary" src="http://www.adamestrada.com/wp-content/uploads/2009/08/AddToLibrary-300x195.jpg" alt="Add Files from iPod" width="300" height="195" /></a><p class="wp-caption-text">Add Files from iPod</p></div>
<p>And that&#8217;s it! Now your iPod songs are on your computer and can be synced with your iPhone the next time you plug it in!</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/FyWJ7KY1fZM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/08/21/how-to-copy-music-from-your-ipod-to-your-iphone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<georss:point>38.881579 -77.103339</georss:point><geo:lat>38.881579</geo:lat><geo:long>-77.103339</geo:long>	<feedburner:origLink>http://www.adamestrada.com/2009/08/21/how-to-copy-music-from-your-ipod-to-your-iphone/</feedburner:origLink></item>
		<item>
		<title>ESRI Flex Training</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/o5nUDAMtwPM/</link>
		<comments>http://www.adamestrada.com/2009/08/07/esri-flex-training/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 20:13:16 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[ESRI]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=251</guid>
		<description><![CDATA[Provide your feedback about what you would want to see in an ESRI Flex Training class!]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignright" style="width: 230px"><img class=" " title="ESRI Flex" src="http://upload.wikimedia.org/wikipedia/en/archive/3/3f/20070930023144!Esri-logo.png" alt="ESRI" width="220" height="280" /><p class="wp-caption-text">Flex Training?</p></div>
<p><a href="http://geobabble.wordpress.com/" target="_blank">Bill</a> asked the question the other day and it dawned on me that it would really behoove <a href="http://www.esri.com" target="_blank">ESRI</a> to provide training for their Flex and  Silverlight API&#8217;s. They have done an excellent job putting together the backend achitecture for both frameworks so why not train their users on how to properly use them? I for one, have used the <a href="http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&amp;scriptID=15905" target="_blank">Sample Flex Viewer</a> on several occasions but there is still sooo much that I don&#8217;t know about it or what it can do. So, I want to ask the general public what they would want to learn more about in regards to the ESRI Flex Framework. Would you want instructor lead training or would an online tutorial work for you? Are you more interested in how to code in <a href="http://en.wikipedia.org/wiki/ActionScript" target="_blank">Actionscript</a> or do you really just need to know how to implement all the bells and whistles for the framework. What about the <a href="http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&amp;scriptID=15905" target="_blank">Sample Flex Viewer</a>? Would you like a training class that is designed to demonstrate specifically how to extend that? There are a ton of options here and I am very interested to learn what other people are doing with this technology and what they might need to make the most of it. Please feel free to post a comment on what you would want to see from ESRI in a Flex training class!</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/o5nUDAMtwPM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/08/07/esri-flex-training/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<georss:point>34.050274 -117.171316</georss:point><geo:lat>34.050274</geo:lat><geo:long>-117.171316</geo:long>	<feedburner:origLink>http://www.adamestrada.com/2009/08/07/esri-flex-training/</feedburner:origLink></item>
		<item>
		<title>Jack Dangermond Facts…</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/a2VzblEQaxU/</link>
		<comments>http://www.adamestrada.com/2009/07/30/jack-dangermond-fact/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 14:41:43 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[ESRI]]></category>
		<category><![CDATA[Jokes]]></category>
		<category><![CDATA[Jacktatorship]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=244</guid>
		<description><![CDATA[A little GIS humor&#8230;

If you have five dollars and Jack Dangermond has five dollars, Jack Dangermond has more money than you.
There is no &#8216;ctrl&#8217; button on Jack Dangermond&#8217;s computer. Jack Dangermond is always in control.
Apple pays Jack Dangermond 99 cents every time he listens to a song.
Jack Dangermond can sneeze with his eyes open.
Jack Dangermond [...]]]></description>
			<content:encoded><![CDATA[<p>A little GIS humor&#8230;<img class="alignright size-full wp-image-245" title="jack_kool_aid" src="http://www.adamestrada.com/wp-content/uploads/2009/07/jack_kool_aid1.bmp" alt="Jack's Flavour" /></p>
<ol>
<li>If you have five dollars and Jack Dangermond has five dollars, Jack Dangermond has more money than you.</li>
<li>There is no &#8216;ctrl&#8217; button on Jack Dangermond&#8217;s computer. Jack Dangermond is always in control.</li>
<li>Apple pays Jack Dangermond 99 cents every time he listens to a song.</li>
<li>Jack Dangermond can sneeze with his eyes open.</li>
<li>Jack Dangermond can eat just one Lay&#8217;s potato chip.</li>
<li>Jack Dangermond is suing Myspace for taking the name of what he calls everything around you.</li>
<li>Jack Dangermond destroyed the periodic table, because he only recognizes the element of surprise.</li>
<li>Jack Dangermond can kill two stones with one bird.</li>
<li>When the Boogeyman goes to sleep every night, he checks his closet for Jack Dangermond.</li>
<li>Jack Dangermond doesn&#8217;t read books. He stares them down until he gets the information he wants.</li>
<li>There is no theory of evolution. Just a list of creatures Jack Dangermond has allowed to live.</li>
<li>Outer space exists because it&#8217;s afraid to be on the same planet with Jack Dangermond.</li>
<li>Jack Dangermond does not sleep. He waits.</li>
<li>Jack Dangermond is currently suing NBC, claiming Law and Order are trademarked names for his left and right legs.</li>
<li>Jack Dangermond is the reason why Waldo is hiding.</li>
<li>Jack Dangermond counted to infinity &#8211; twice.</li>
<li>There is no chin behind Jack Dangermond’ beard. There is only another fist.</li>
<li>When Jack Dangermond does a pushup, he isn’t lifting himself up, he’s pushing the Earth down.</li>
<li>Jack Dangermond is so fast, he can run around the world and punch himself in the back of the head.</li>
<li>Jack Dangermond’s hand is the only hand that can beat a Royal Flush.</li>
<li>Jack Dangermond can lead a horse to water AND make it drink.</li>
<li>Jack Dangermond doesn’t wear a watch, HE decides what time it is.</li>
<li>Jack Dangermond can slam a revolving door.</li>
<li>Jack Dangermond does not get frostbite. Jack Dangermond bites frost</li>
<li>Jack Dangermond can divide by zero.</li>
</ol>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/a2VzblEQaxU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/07/30/jack-dangermond-fact/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	<georss:point>34.050274 -117.171316</georss:point><geo:lat>34.050274</geo:lat><geo:long>-117.171316</geo:long>	<feedburner:origLink>http://www.adamestrada.com/2009/07/30/jack-dangermond-fact/</feedburner:origLink></item>
		<item>
		<title>Building your Open Source Infrastructure</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/0FIYSrWZnL4/</link>
		<comments>http://www.adamestrada.com/2009/07/26/building-your-open-source-infrastructure/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 16:21:29 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Redmine]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[VisualSVN]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=232</guid>
		<description><![CDATA[There are countless free and/or open source applications that can be installed on just about any platform. The hardest part about dealing with a lot of different applications is getting them configured to run properly. For example, I recently evaluated a lot of different bug tracking applications that would also integrate nicely with VisualSVN. In [...]]]></description>
			<content:encoded><![CDATA[<p>There are countless free and/or open source applications that can be installed on just about any platform. The hardest part about dealing with a lot of different applications is getting them configured to run properly. For example, I recently evaluated a lot of different bug tracking applications that would also integrate nicely with <a href="http://www.visualsvn.com/server/" target="_blank">VisualSVN</a>. In case you don&#8217;t already know, VisualSVN server is a stack that installs and configures the SVN source control tools for you. And, it does it all without any thinking on your part which is huge when you are in a hurry. From the VisualSVN Website:</p>
<blockquote><p>VisualSVN Server is a package that contains everything you need to install, configure and manage Subversion server for your team on Windows platform. It includes Subversion, Apache and a management console.</p></blockquote>
<p>So now you&#8217;ve got source control! Next you&#8217;ll need a bug tracking system that integrates nicely with SVN. I went through <a href="http://en.wikipedia.org/wiki/Comparison_of_issue_tracking_systems" target="_blank">this list</a> and pretty much determined that they are all either too expensive or too much for what me and my small team need. I came across <a href="http://www.redmine.org/" target="_blank">Redmine</a> after getting a heads up from <a href="http://geobabble.wordpress.com" target="_blank">Bill Dollins</a>. I gotta say that the features that this software has right out of the box are amazing! Check out their website for how they <a href="http://www.redmine.org/projects/redmine/repository" target="_blank">integrate with SVN too</a>!</p>
<p>The problem I had was that it was really difficult to get it configured because 1. I am not all that familiar with a <a href="http://rubyonrails.org/" target="_blank">Ruby on Rails</a> application and 2. SVN installs on an entirely different server (Apache) which I thought might be an issue. Wrong! I came across <a href="http://bitnami.org/" target="_blank">Bitnami.org</a> which is a group that specializes in Open Source Software stack dissemination. After a <a href="http://bitnami.org/stack/redmine" target="_blank">quick download</a> and an even faster install, I had Ruby on Rails, Redmine, <a href="http://mongrel.rubyforge.org/" target="_blank">Mongrel</a> and MySQL set up and ready to go!  Note how many stacks the Bitnami group gives you&#8230;there is something for everyone! I am having issues getting Redmine without SSL to play nicely with VisualSVN with SSL so when I figure it out I will post how I fixed it.</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/0FIYSrWZnL4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/07/26/building-your-open-source-infrastructure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.adamestrada.com/2009/07/26/building-your-open-source-infrastructure/</feedburner:origLink></item>
		<item>
		<title>GeoDC Kickoff…</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/WxSsvG4Ia8E/</link>
		<comments>http://www.adamestrada.com/2009/07/16/geodc-kickoff/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 03:20:52 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[GeoDC]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=223</guid>
		<description><![CDATA[
It looks like GeoDC is going to take place on random Thursdays for now on. Thanks to Kate and the FortiusOne folks for putting it all together! If you live in the DC area and are in to Geospatial Technology, I encourage you to register at the Ning group. It&#8217;s a great way to connect with [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-224" title="dcgeo" src="http://www.adamestrada.com/wp-content/uploads/2009/07/dcgeo.png" alt="dcgeo" width="180" height="180" /></p>
<p>It looks like <a href="http://geo-dc.ning.com/" target="_blank">GeoDC</a> is going to take place on random Thursdays for now on. Thanks to <a href="http://www.maploser.com" target="_blank">Kate</a> and the <a href="http://www.fortiusone.com" target="_blank">FortiusOne</a> folks for putting it all together! If you live in the DC area and are in to Geospatial Technology, I encourage you to register at the <a href="http://geo-dc.ning.com/" target="_blank">Ning group</a>. It&#8217;s a great way to connect with other GeoNerds in the area and learn about all the cool stuff they are working on. There seems to be a lot of influence from the open source crowd which in this day and age is just what the doctor ordered. I&#8217;ve gotten in to OSM since my first OSM Mapping Party last month so I&#8217;m glad to see the start of a semi-active group in the area.</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/WxSsvG4Ia8E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/07/16/geodc-kickoff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<georss:point>38.892091 -77.024055</georss:point><geo:lat>38.892091</geo:lat><geo:long>-77.024055</geo:long>	<feedburner:origLink>http://www.adamestrada.com/2009/07/16/geodc-kickoff/</feedburner:origLink></item>
		<item>
		<title>C# KML Generator</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/gVYFJJg8KEI/</link>
		<comments>http://www.adamestrada.com/2009/06/29/c-kml-generator/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 01:40:55 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[GeoSpatial]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[DataSet]]></category>
		<category><![CDATA[DataTable]]></category>
		<category><![CDATA[KML]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=214</guid>
		<description><![CDATA[If you&#8217;re anything like me, you probably generate a ton of KML so I wanted to pass along a quick little method that generates a KML file from data in a C# DataSet. The real cool part about this is that it never writes anything to disc and it will always generate a unique file [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re anything like me, you probably generate a ton of KML so I wanted to pass along a quick little method that generates a KML file from data in a C# <a href="http://msdn.microsoft.com/en-us/library/system.data.dataset(VS.71).aspx">DataSet</a>. The real cool part about this is that it never writes anything to disc and it will always generate a unique file (based on a GUID). It&#8217;s also important to note that the icon path is set in the web.config file so it can be configured after the application is deployed.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p214code25'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p21425"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
</pre></td><td class="code" id="p214code25"><pre class="csharp" style="font-family:monospace;"> <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> kmlFile<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
&nbsp;
            DataTable tbl <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span>DataTable<span style="color: #008000;">&#41;</span>Session<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;DataTable&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #008080; font-style: italic;">// Create a temporary file name using a GUID and start writing the File</span>
            <span style="color: #6666cc; font-weight: bold;">object</span> tempGUID <span style="color: #008000;">=</span> <span style="color: #000000;">System</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Guid</span><span style="color: #008000;">.</span><span style="color: #0000FF;">NewGuid</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #008080; font-style: italic;">// Grab the icon path in the web.confg file.</span>
            <span style="color: #6666cc; font-weight: bold;">object</span> iconPath<span style="color: #008000;">;</span>
            iconPath <span style="color: #008000;">=</span> ConfigurationManager<span style="color: #008000;">.</span><span style="color: #0000FF;">AppSettings</span><span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;kmlIcon&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #008080; font-style: italic;">// Start writing the KML    </span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;kml xmlns=<span style="color: #008080; font-weight: bold;">\&quot;</span>http://www.opengis.net/kml/2.2<span style="color: #008080; font-weight: bold;">\&quot;</span>&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;Document&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;name&gt;My KML&lt;/name&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;Style id=<span style="color: #008080; font-weight: bold;">\&quot;</span>pushpin<span style="color: #008080; font-weight: bold;">\&quot;</span>&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;IconStyle&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;Icon&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;href&gt;&quot;</span> <span style="color: #008000;">+</span> iconPath <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;/href&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/Icon&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/IconStyle&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/Style&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;LookAt&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;longitude&gt;-96.1501026686213&lt;/longitude&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;latitude&gt;37.95371359340249&lt;/latitude&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;altitude&gt;0&lt;/altitude&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;range&gt;4429395.882870826&lt;/range&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;tilt&gt;0&lt;/tilt&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/LookAt&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #008080; font-style: italic;">// Loop through the dataset and populate the placemarks.</span>
            <span style="color: #6666cc; font-weight: bold;">string</span> Name <span style="color: #008000;">=</span> <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Empty</span><span style="color: #008000;">;</span>
            <span style="color: #6666cc; font-weight: bold;">string</span> owner <span style="color: #008000;">=</span> <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Empty</span><span style="color: #008000;">;</span>
            <span style="color: #6666cc; font-weight: bold;">string</span> <span style="color: #6666cc; font-weight: bold;">class</span> <span style="color: #008000;">=</span> <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Empty</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #0600FF; font-weight: bold;">foreach</span> <span style="color: #008000;">&#40;</span>DataRow dr <span style="color: #0600FF; font-weight: bold;">in</span> tbl<span style="color: #008000;">.</span><span style="color: #0000FF;">Rows</span><span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
&nbsp;
                <span style="color: #008080; font-style: italic;">// Replace bad characters with good ones.</span>
                Name <span style="color: #008000;">=</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;Name&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Name <span style="color: #008000;">=</span> Name<span style="color: #008000;">.</span><span style="color: #0000FF;">Replace</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&amp;&quot;</span>, <span style="color: #666666;">&quot;&amp;amp;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Name <span style="color: #008000;">=</span> Name<span style="color: #008000;">.</span><span style="color: #0000FF;">Replace</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\\</span>&quot;</span>, <span style="color: #666666;">&quot;&amp;quot;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Name <span style="color: #008000;">=</span> Name<span style="color: #008000;">.</span><span style="color: #0000FF;">Replace</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;&quot;</span>, <span style="color: #666666;">&quot;&amp;lt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Name <span style="color: #008000;">=</span> Name<span style="color: #008000;">.</span><span style="color: #0000FF;">Replace</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&gt;&quot;</span>, <span style="color: #666666;">&quot;&amp;gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                owner <span style="color: #008000;">=</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;Owner&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                owner <span style="color: #008000;">=</span> owner<span style="color: #008000;">.</span><span style="color: #0000FF;">Replace</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&amp;&quot;</span>, <span style="color: #666666;">&quot;&amp;amp;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                owner <span style="color: #008000;">=</span> owner<span style="color: #008000;">.</span><span style="color: #0000FF;">Replace</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\\</span>&quot;</span>, <span style="color: #666666;">&quot;&amp;quot;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                owner <span style="color: #008000;">=</span> owner<span style="color: #008000;">.</span><span style="color: #0000FF;">Replace</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;&quot;</span>, <span style="color: #666666;">&quot;&amp;lt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                owner <span style="color: #008000;">=</span> owner<span style="color: #008000;">.</span><span style="color: #0000FF;">Replace</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&gt;&quot;</span>, <span style="color: #666666;">&quot;&amp;gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
                <span style="color: #008080; font-style: italic;">// Continue writing the KML</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;Placemark&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;name&gt;&quot;</span> <span style="color: #008000;">+</span> Name <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;/name&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;styleUrl&gt;#pushpin&lt;/styleUrl&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;description&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;![CDATA[<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;html&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;head&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;title&gt;My KML&lt;/title&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/head&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;body&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;h3 align=<span style="color: #008080; font-weight: bold;">\&quot;</span>center<span style="color: #008080; font-weight: bold;">\&quot;</span>&gt;&lt;FONT COLOR=<span style="color: #008080; font-weight: bold;">\&quot;</span>#FF0000<span style="color: #008080; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #008000;">+</span> <span style="color: #6666cc; font-weight: bold;">class</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;/FONT&gt;&lt;/h3&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;hr&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;b&gt;Name:&lt;/b&gt; &quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;Name&quot;</span><span style="color: #008000;">&#93;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;br&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;b&gt;Owner:&lt;/b&gt; &quot;</span> <span style="color: #008000;">+</span> owner <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;br&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;b&gt;Latitude:&lt;/b&gt; &quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;Latitude&quot;</span><span style="color: #008000;">&#93;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;br&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;b&gt;Longitide:&lt;/b&gt; &quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;Longitude&quot;</span><span style="color: #008000;">&#93;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;br&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;hr&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;h3 align=<span style="color: #008080; font-weight: bold;">\&quot;</span>center<span style="color: #008080; font-weight: bold;">\&quot;</span>&gt;&lt;FONT COLOR=<span style="color: #008080; font-weight: bold;">\&quot;</span>#FF0000<span style="color: #008080; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #008000;">+</span> <span style="color: #6666cc; font-weight: bold;">class</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;/FONT&gt;&lt;/h3&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/body&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/html&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;]]&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/description&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;Point&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;coordinates&gt;&quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;Longitude&quot;</span><span style="color: #008000;">&#93;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;, &quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;Latitude&quot;</span><span style="color: #008000;">&#93;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;/coordinates&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/Point&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/Placemark&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #008000;">&#125;</span>
&nbsp;
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/Document&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/kml&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #008080; font-style: italic;">// Response.Write the data with the Encoding &quot;KML&quot;. This will force the default KML</span>
            <span style="color: #008080; font-style: italic;">// reader to launch when the file is done writing.</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">AddHeader</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;content-disposition&quot;</span>, <span style="color: #666666;">&quot;attachment; filename=&quot;</span> <span style="color: #008000;">+</span> tempGUID <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;.kml&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> 
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">ContentType</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;application/kml&quot;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">AppendHeader</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Content-Encoding&quot;</span>, <span style="color: #666666;">&quot;kml&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>      
        <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>Enjoy!</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/gVYFJJg8KEI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/06/29/c-kml-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.adamestrada.com/2009/06/29/c-kml-generator/</feedburner:origLink></item>
		<item>
		<title>Open Street Map (take 1)</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/zM3gxVTFtwU/</link>
		<comments>http://www.adamestrada.com/2009/06/22/open-street-map-take-1/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 00:26:53 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[OSM]]></category>
		<category><![CDATA[CloudMade]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=204</guid>
		<description><![CDATA[I went to my first Open Street Map mapping party this past weekend and gotta say that I am impressed with the effort the Cloudmade/OSM folks are putting forth to making a better Geoweb. I didn&#8217;t really know all that much about OSM prior to this weekend&#8217;s event other than it being another &#8220;slippy&#8221; map [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_205" class="wp-caption alignright" style="width: 160px"><a href="http://www.adamestrada.com/wp-content/uploads/2009/06/200px-CM_logo.svg.png"><img class="size-thumbnail wp-image-205" title="200px-CM_logo.svg" src="http://www.adamestrada.com/wp-content/uploads/2009/06/200px-CM_logo.svg-150x150.png" alt="OSM Logo" width="150" height="150" /></a><p class="wp-caption-text">CloudMade/OSM</p></div>
<p>I went to my first <a href="http://www.adamestrada.com/2009/06/13/washington-dc-mapping-party/">Open Street Map mapping party</a> this past weekend and gotta say that I am impressed with the effort the <a href="http://www.cloudmade.com" target="_blank">Cloudmade/OSM</a> folks are putting forth to making a better <a href="http://en.wikipedia.org/wiki/Geoweb" target="_blank">Geoweb</a>. I didn&#8217;t really know all that much about OSM prior to this weekend&#8217;s event other than it being another &#8220;slippy&#8221; map that folks can use as a backdrop in their mapping applications. It is true that it is another slippy map but it&#8217;s much more than that to the untrained eye. I automatically see the potential in OSM in that anyone with the proper know-how can edit it with their own data to make it better. For example, if I am forester working in a remote location in Alaska and need to reference a map to help me make better decisions the chances of there being quality data already available is slim. I can, however, collect data from my hand held GPS device while out in the field and then upload it to OSM at the end of the day.</p>
<p>This does several things for us.</p>
<ol>
<li>Provides quality base data that is as accurate as our GPS device.</li>
<li>Permanently archives the road network for that area so that others can use it.</li>
</ol>
<p>The cool thing about OSM is that it&#8217;s completely free and open to use where as <a href="http://maps.google.com" target="_blank">Google </a>and <a href="http://www.bing.com:80/maps/" target="_blank">Microsoft</a> have restrictions that might prohibit the widespread use of their data. In fact, Cloudmade/OSM encourages that everyone use their data in hopes of getting people to create more of it. The idea behind Cloudmade is simple and really pretty cool&#8230;</p>
<blockquote>
<p style="margin-top: 0px; margin-bottom: 15px; font-size: 14px;">CloudMade helps you make the most of map data. We source our maps from OpenStreetMap, the community mapping project which is making a free map of the world. Our aim is to continue the democratization of geo data and to expand access to open geo data through a range of simple yet powerful tools and <abbr title="Application Programming Interface">APIs</abbr>.</p>
<p style="margin-top: 0px; margin-bottom: 15px; font-size: 14px;">Our tools and <abbr title="Application Programming Interface">APIs</abbr> allow developers to create rich interactive experiences on the web and mobile.</p>
</blockquote>
<p>I think that one of the things that bothers me the most about the Googles and Microsofts of the world is that you can&#8217;t take their data with you unless you&#8217;ve got some serious $$$. With Open Street Map you can literally download a snapshot of the available <a href="http://wiki.openstreetmap.org/wiki/Planet.osm" target="_blank">OSM Planet</a> and use it completely disconnected from the world wide web if needbe.</p>
<p>The thing I liked the most about the Mapping Party was the fact that <a href="http://www.twitter.com/russ_osm" target="_blank">Russ</a> took the time to show us how to make edits to the map. There are a few ways to do this and I am going to use my personal blog as a way to share with other folks how to do it! Please stay tuned for more posts on how to do this!!!</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/zM3gxVTFtwU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/06/22/open-street-map-take-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<georss:point>52.931949 -1.29496</georss:point><geo:lat>52.931949</geo:lat><geo:long>-1.29496</geo:long>	<feedburner:origLink>http://www.adamestrada.com/2009/06/22/open-street-map-take-1/</feedburner:origLink></item>
		<item>
		<title>GeoNames and GeoRSS</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/tAtMHJWVa3c/</link>
		<comments>http://www.adamestrada.com/2009/06/16/geoname-and-georss/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 20:47:09 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[GeoSpatial]]></category>
		<category><![CDATA[Geonames]]></category>
		<category><![CDATA[GeoRSS]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=191</guid>
		<description><![CDATA[I don&#8217;t know how many of you are aware of this, but GeoNames.org has a pretty killer way of geocoding your RSS feed! This is particularly useful for converting your RSS feed to GeoRSS to be used in other products.
The way they do it is clever and very simple. Pass your feed&#8217;s URL in as [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know how many of you are aware of this, but <a href="http://www.geonames.org" target="_blank">GeoNames.org</a> has a pretty killer way of <a href="http://www.geonames.org/rss-to-georss-converter.html" target="_blank">geocoding your RSS feed</a>! This is particularly useful for converting your RSS feed to GeoRSS to be used in other products.</p>
<p>The way they do it is clever and very simple. Pass your feed&#8217;s URL in as a parameter to theirs and specify what type of output you want.</p>
<blockquote>
<table border="0">
<tbody>
<tr>
<td>feedUrl</td>
<td>string (required)</td>
<td>The url of the RSS feed to search locations for and to convert to GeoRSS. The feed has to be syntactically correct, i.e. wellformed xml and valid rss/atom.<br />
Note : the feed url needs to be &#8216;<a href="http://www.adamestrada.com/wp-admin/#urlEncoding">url encoded</a>&#8216;.</td>
</tr>
<tr>
<td>feedLanguage</td>
<td>string (optional) <em>en</em>,<em>de</em>,<em>fr</em>,<em>it</em>,<em>es</em></td>
<td>The language of the feed, this information is needed by the geonames search engine to find relevant locations. Default : <em>No value</em> = automatic language detection.</td>
</tr>
<tr>
<td>type</td>
<td>string (optional) <em>rss_0.9</em>, <em>rss_0.91</em>, <em>rss_0.92</em>, <em>rss_0.93</em>,<em> rss_0.94</em>, <em>rss_1.0</em>, <em>rss_2.0</em>, <em>atom_0.3</em>, <em>atom_1.0</em><em>kml</em></td>
<td>The output RSS dialect of the conversion. Default : same RSS dialect as input feed.With type=kml the output will be in GoogleEarth kml format.</td>
</tr>
<tr>
<td>geoRSS</td>
<td>string <em>simple</em>,<em>gml</em>,<em>w3cGeo</em> (optional)</td>
<td>The GeoRSS output encoding used for lat/lng. See <a href="http://www.georss.org/">www.georss.org</a> for details. Default is w3cGeo.</td>
</tr>
<tr>
<td>addUngeocodedItems</td>
<td>true</td>
<td>Items that could not be geocoded are removed from the response document. Setting the parameter addUngeocodedItems=true will include the ungeocoded items in the response.</td>
</tr>
<tr>
<td>country</td>
<td>string (optional) two-letter iso country code</td>
<td>Restrict geocoding to a given country. This parameter may improve the results of the geocoder for feeds focusing on a single country.</td>
</tr>
</tbody>
</table>
</blockquote>
<p>I did a quick test using FEMA data and was able to display the data over a Google Map. The URL I passed in to Google is as follows.<br />
<blockquote>http://ws.geonames.org/rssToGeoRSS?feedUrl=http://www.fema.gov/news/disasters_rss.fema&amp;type=rss_2.0</p></blockquote>
<p> Note that all I did was pass my feed URL in and then assign it as type rss_2.0. GeoNames geocoded everything for me and produced a valid GeoRSS feed that Google Maps understands. Piece of cake!</p>
<p><iframe width="600" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=http:%2F%2Fws.geonames.org%2FrssToGeoRSS%3FfeedUrl%3Dhttp:%2F%2Fwww.fema.gov%2Fnews%2Fdisasters_rss.fema%26type%3Drss_2.0&amp;ie=UTF8&amp;ll=37.370157,-98.173828&amp;spn=24.3679,54.931641&amp;z=5&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=http:%2F%2Fws.geonames.org%2FrssToGeoRSS%3FfeedUrl%3Dhttp:%2F%2Fwww.fema.gov%2Fnews%2Fdisasters_rss.fema%26type%3Drss_2.0&amp;ie=UTF8&amp;ll=37.370157,-98.173828&amp;spn=24.3679,54.931641&amp;z=5" style="color:#0000FF;text-align:left">View Larger Map</a></small></p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/tAtMHJWVa3c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/06/16/geoname-and-georss/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.adamestrada.com/2009/06/16/geoname-and-georss/</feedburner:origLink></item>
		<item>
		<title>jQuery Cascading Dropdown Menus</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/pxpvRVEOUHg/</link>
		<comments>http://www.adamestrada.com/2009/06/15/jquery-cascading-dropdown-menus/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 00:40:36 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Dropdown Menus]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=169</guid>
		<description><![CDATA[jQuery Dropdown Menus]]></description>
			<content:encoded><![CDATA[<p>One of the trickiest things to do gracefully on a website is create drop-down menus that are dependent on each other (also called cascading drop down menus). There are several ways to do this, of course, but I&#8217;ve seen that the most elegant/Web 2.0ish way to go about it is using AJAX calls to a web service or other exterior files. Ajax is a great way to grab data off your server because you DO NOT have to refresh the page once it&#8217;s loaded. I stumbled across this script on the <a href="http://dev.chayachronicles.com/jquery/cascade/index.html" target="_blank">jQuery examples page</a> and expanded upon it to make it work the way I needed it to. Note the different types of cascading drop down menus on that site. The idea here is that a particular value in the first menu is selected and the script calls data sitting on the server and does an ad-hoc query to find related items from the <a href="http://www.json.org/" target="_blank">JSON-formatted</a> list.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p169code26'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p16926"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p169code26"><pre class="javascript" style="font-family:monospace;">[{&quot;When&quot;:&quot;Level_1&quot;,&quot;Value&quot;:&quot;Level_2&quot;,&quot;Text&quot;:&quot;Level_2&quot;}]</pre></td></tr></table></div>

<p>Note how &#8220;Level_2&#8243; is only activated when &#8220;Level_1&#8243; is selected in the main script.</p>
<div>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p169code27'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p16927"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code" id="p169code27"><pre class="javascript" style="font-family:monospace;">&lt;script src=&quot;js/cascade/jquery.cascade.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;js/cascade/jquery.cascade.ext.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/cascade/jquery.templating.js&quot; &gt;&lt;/script&gt;
&nbsp;
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
        jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>   
	     jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#level_2&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">cascade</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#level_1&quot;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#123;</span>                   
                ajax<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'js/level_2.js'</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> 
                template<span style="color: #339933;">:</span> commonTemplate<span style="color: #339933;">,</span>
                match<span style="color: #339933;">:</span> commonMatch<span style="color: #339933;">,</span> 
			timeout<span style="color: #339933;">:</span> <span style="color: #CC0000;">250</span> <span style="color: #006600; font-style: italic;">//just to show loading indicator</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#level_3&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">cascade</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#level_2&quot;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#123;</span>                   
                ajax<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'js/level_3.js'</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> 
                template<span style="color: #339933;">:</span> commonTemplate<span style="color: #339933;">,</span>
                match<span style="color: #339933;">:</span> commonMatch<span style="color: #339933;">,</span> 
	        timeout<span style="color: #339933;">:</span> <span style="color: #CC0000;">250</span> <span style="color: #006600; font-style: italic;">//just to show loading indicator</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

</div>
<p>In the above example, you&#8217;ll note that &#8220;Level_3&#8243; is dependent on &#8220;Level_2 and &#8220;Level_2&#8243; is dependent on &#8220;Level_1&#8243; which is the cascading effect we were going for.  It doesn&#8217;t get much easier than that! As long as the JSON formatted string reflects what you are querying for, i.e. &#8220;Level_2&#8243; is dependent on &#8220;Level_1&#8243; you&#8217;ll be good to go and this script will work like a charm. I&#8217;ve managed to get it to work on 6 different cascading levels without any problems at all. The author even added a cool little graphic that displays while the script is loading.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p169code28'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p16928"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p169code28"><pre class="css" style="font-family:monospace;">&lt;style type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #00AA00;">&gt;</span>
<span style="color: #6666ff;">.cascade-loading</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">transparent</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;graphics/indicator.gif&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&lt;/style<span style="color: #00AA00;">&gt;</span></pre></td></tr></table></div>

<p>There are many, many ways to do this but if you need a data-driven set of cascading drop down menus, I&#8217;ve found that this way is incredibly easy to implement and looks nice as well.</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/pxpvRVEOUHg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/06/15/jquery-cascading-dropdown-menus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<georss:point>38.881579 -77.103339</georss:point><geo:lat>38.881579</geo:lat><geo:long>-77.103339</geo:long>	<feedburner:origLink>http://www.adamestrada.com/2009/06/15/jquery-cascading-dropdown-menus/</feedburner:origLink></item>
		<item>
		<title>How to Load a Shapefile in to Oracle Spatial</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/g0dfLCq_bxo/</link>
		<comments>http://www.adamestrada.com/2009/06/14/how-to-load-a-shapefile-in-to-oracle-spatial/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 17:16:54 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Oracle Spatial]]></category>
		<category><![CDATA[shp2sdo]]></category>
		<category><![CDATA[SQL*Loader]]></category>
		<category><![CDATA[SQLPlus]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=163</guid>
		<description><![CDATA[Please note that you cannot just insert a Shapefile in to Oracle and expect the geometries to be stored and indexed properly! Therefore, you&#8217;ve got to use a set of &#8220;special&#8221; tools to insert the data in to Oracle Spatial. Oracle does provide you with 2 very easy to use utilities that can be downloaded [...]]]></description>
			<content:encoded><![CDATA[<p>Please note that you cannot just insert a <a href="http://en.wikipedia.org/wiki/Shapefile" target="_blank">Shapefile</a> in to Oracle and expect the geometries to be stored and indexed properly! Therefore, you&#8217;ve got to use a set of &#8220;special&#8221; tools to insert the data in to Oracle Spatial. Oracle does provide you with 2 very easy to use utilities that can be downloaded for free. The first is called <em><a href="http://www.oracle.com/technology/software/products/spatial/index.html" target="_blank">shp2sdo</a></em> which is a command line tool that basically converts your Shapefile in to a SQL Script that will be used insert your data in to Oracle. We&#8217;ve seen similar command line utilities used with other applications like <a href="http://postgis.refractions.net/" target="_blank">PostGIS</a>. The usage for shp2sdo is as follows.</p>
<div>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p163code33'); return false;">View Code</a> DOS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p16333"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
</pre></td><td class="code" id="p163code33"><pre class="dos" style="font-family:monospace;">USAGE: shp2sdo <span style="color: #66cc66;">&#91;</span>-o<span style="color: #66cc66;">&#93;</span>
-g
-i  -n  -p -d
-x <span style="color: #66cc66;">&#40;</span>xmin,xmax<span style="color: #66cc66;">&#41;</span> -y <span style="color: #66cc66;">&#40;</span>ymin,ymax<span style="color: #66cc66;">&#41;</span> -s
or
shp2sdo -r   -c  -n  -a -d
-x <span style="color: #66cc66;">&#40;</span>xmin,xmax<span style="color: #66cc66;">&#41;</span> -y <span style="color: #66cc66;">&#40;</span>ymin,ymax<span style="color: #66cc66;">&#41;</span>
shapefile           - name of input shape file
<span style="color: #66cc66;">&#40;</span><a href="http://www.ss64.com/nt/do.html"><span style="color: #00b100; font-weight: bold;">Do</span></a> <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> include suffix .shp .dbf or .shx<span style="color: #66cc66;">&#41;</span>
tablename           - spatial table name
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> specified: same as input file name
Generic options:
-o                  - Convert to object/relational format <span style="color: #66cc66;">&#40;</span>default<span style="color: #66cc66;">&#41;</span>
-r                  - Convert to the relational format
-d                  - store data <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> the control file
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> specified: keep data <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> separate files
-x                  - bounds <a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> the X dimension
-y                  - bounds <a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> the Y dimension
-v                  - verbose output
-h or -?            - print this message
Options valid <a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> the object model only:
-g geometry column  - Name of the column used <a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> the SDO_GEOMETRY object
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> specified: GEOM
-i id_column        - Name of the column used <a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> numbering the geometries
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> specified, no key column will be generated
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> specified without name, use ID
-n start_id         - Start number <a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> IDs
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> specified, start at <span style="color: #cc66cc;">1</span>
-p                  - Store points <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> the SDO_ORDINATES array
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> specified, store <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> SDO_POINT
-s                  - Load SRID field <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> geometry and metadata
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> specified, SRID field is NULL
-t                  - Load tolerance fields <span style="color: #66cc66;">&#40;</span>x and y<span style="color: #66cc66;">&#41;</span> <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> metadata
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> specified, tolerance fields are <span style="color: #cc66cc;">0.00000005</span>
-<span style="color: #cc66cc;">8</span>                  - Write control file <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> 8i format
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> specified, file written <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> 9i format
-f                  - Write geometry data with <span style="color: #cc66cc;">10</span> digits of precision
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> specified, <span style="color: #cc66cc;">6</span> digits of precision is used
Options valid <a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> the relational model only:
-c ordcount         - Number of ordinates <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> _SDOGOEM table
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> specified: <span style="color: #cc66cc;">16</span> ordinates</pre></td></tr></table></div>

</div>
<p>This application creates the following files.</p>
<ul>
<li>SQL Script which is used to define the schema for each geometry</li>
<li>Control (CTL) file that defines the data to be loaded</li>
<li>Data (DAT) file which holds your spatial data.</li>
</ul>
<p>Now that your data are converted to a SQL Script you need to load it in to the database, right? Right&#8230;so you&#8217;ll need to use <a href="http://www.oracle.com/technology/docs/tech/sql_plus/index.html" target="_blank">SQLPlus</a> to do this! If you use Oracle and don&#8217;t know what SQLPlus is, you&#8217;re in for a real treat! Command line goodness&#8230;</p>
<p>Anyway, using SQLPlus you &#8216;ll need to run the output SQL file from shp2sdo. This will create the schema that will hold your data in the database. I usually just create a DOS batch script that will launch SQLPlus and load the data in a single step.</p>
<div>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p163code34'); return false;">View Code</a> DOS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p16334"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p163code34"><pre class="dos" style="font-family:monospace;">sqlplus username/password<span style="color: #33cc33;">@</span>10.11.18.41:<span style="color: #cc66cc;">1521</span>/mydb
<span style="color: #33cc33;">@</span>&quot;C:\Agriculture\Data\AnimalBusinesses.SQL&quot;</pre></td></tr></table></div>

</div>
<p>Now your schema is created and you&#8217;re good to go with loading the actual data part of the dataset. To do this, you&#8217;ll need to use another command line tool called <a href="http://www.oracleutilities.com/OSUtil/sqlldr.html" target="_blank">SQL*Loader</a>. The command line options for using SQL*Loader are pretty extensive but I only use (or need to use) the bare bones functionality. See the command line options below.</p>
<div>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p163code35'); return false;">View Code</a> DOS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p16335"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p163code35"><pre class="dos" style="font-family:monospace;">sqlldr username/password<span style="color: #33cc33;">@</span>10.11.18.41:<span style="color: #cc66cc;">1521</span>/mydb C:\pathtofile\file.ctl</pre></td></tr></table></div>

</div>
<p>There you have it! The only thing you&#8217;re missing is the index which in Oracle is really easy to create.</p>
<div>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p163code36'); return false;">View Code</a> DOS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p16336"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p163code36"><pre class="dos" style="font-family:monospace;">CREATE INDEX MyIndex_idx ON MyTable <span style="color: #66cc66;">&#40;</span>geom<span style="color: #66cc66;">&#41;</span>
INDEXTYPE IS MDSYS.SPATIAL_INDEX;</pre></td></tr></table></div>

</div>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/g0dfLCq_bxo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/06/14/how-to-load-a-shapefile-in-to-oracle-spatial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<georss:point>37.5364134 -122.2455364</georss:point><geo:lat>37.5364134</geo:lat><geo:long>-122.2455364</geo:long>	<feedburner:origLink>http://www.adamestrada.com/2009/06/14/how-to-load-a-shapefile-in-to-oracle-spatial/</feedburner:origLink></item>
		<item>
		<title>ASP and FileSystemObjects</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/vXTlPRAx0vo/</link>
		<comments>http://www.adamestrada.com/2009/06/14/asp-and-filesystemobjects/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 16:31:52 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[GeoSpatial]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[ERDAS]]></category>
		<category><![CDATA[FileSystemObject]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=157</guid>
		<description><![CDATA[Everyone has a script that they go back and refer to over and over again&#8230; While I was at ERDAS, I created this particular script to write the entire Imagine Developers&#8217; Toolkit API to file so that I could compile it as a single CHM. I had the default.asp page scheduled to run on the [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone has a script that they go back and refer to over and over again&#8230; While I was at <a href="http://www.erdas.com" target="_blank">ERDAS</a>, I created this particular script to write the entire <a href="http://developer.lggi.com" target="_blank">Imagine Developers&#8217; Toolkit API</a> to file so that I could compile it as a single CHM. I had the default.asp page scheduled to run on the server every night to ensure that the documentation was as up to date as possible and at the time, that was a pretty high-tech way of accomplishing this task.</p>
<p>I initially used <a href="http://www.adobe.com/products/dreamweaver/" target="_blank">Dreamweaver</a> and classic ASP to do this because Dreamwaver makes it <strong><em>VERY</em></strong> easy to connect to a database and pull data to your web page. In my humble opinion, easy is always better! You&#8217;ll notice in the script below that I used <a href="http://msdn.microsoft.com/en-us/library/6kxy1a51(VS.85).aspx" target="_blank">FileSystemObject</a> to create my html files on the server. I tend to use FSOs a lot with classic ASP because it&#8217;s really freaking easy (again with the easy) to create and manipulate files on the server!  Anway, here is my ole faithful asp script so please expect to see numerous variations of it on this site&#8230;</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p157code38'); return false;">View Code</a> ASP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p15738"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
</pre></td><td class="code" id="p157code38"><pre class="asp" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;%</span><span style="color: #006600; font-weight: bold;">@</span>LANGUAGE<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VBSCRIPT&quot;</span> CODEPAGE<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;1252&quot;</span><span style="color: #000000; font-weight: bold;">%&gt;</span>
&lt;!--#include file=&quot;Connections/DBExport.asp&quot; --&gt;
<span style="color: #000000; font-weight: bold;">&lt;%</span>
<span style="color: #990099; font-weight: bold;">Dim</span> rs
<span style="color: #990099; font-weight: bold;">Dim</span> rs_numRows
&nbsp;
<span style="color: #990099; font-weight: bold;">Set</span> rs <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">Server</span>.<span style="color: #330066;">CreateObject</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;ADODB.Recordset&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
rs.<span style="color: #9900cc;">ActiveConnection</span> <span style="color: #006600; font-weight: bold;">=</span> MM_DBExport_STRING
rs.<span style="color: #9900cc;">Source</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;SELECT * FROM dbo.Functions&quot;</span>
rs.<span style="color: #9900cc;">CursorType</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">0</span>
rs.<span style="color: #9900cc;">CursorLocation</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">2</span>
rs.<span style="color: #9900cc;">LockType</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">1</span>
rs.<span style="color: #330066;">Open</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">%&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;%</span>
<span style="color: #990099; font-weight: bold;">Dim</span> types
<span style="color: #990099; font-weight: bold;">Dim</span> types_numRows
&nbsp;
<span style="color: #990099; font-weight: bold;">Set</span> types <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">Server</span>.<span style="color: #330066;">CreateObject</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;ADODB.Recordset&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
types.<span style="color: #9900cc;">ActiveConnection</span> <span style="color: #006600; font-weight: bold;">=</span> MM_DBExport_STRING
types.<span style="color: #9900cc;">Source</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;SELECT * FROM dbo.DataTypes&quot;</span>
types.<span style="color: #9900cc;">CursorType</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">0</span>
types.<span style="color: #9900cc;">CursorLocation</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">2</span>
types.<span style="color: #9900cc;">LockType</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">1</span>
types.<span style="color: #330066;">Open</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">%&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;%</span>
   <span style="color: #990099; font-weight: bold;">Server</span>.<span style="color: #9900cc;">ScriptTimeout</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">10000</span> 
&nbsp;
   <span style="color: #008000;">'Set file I/O constants...</span>
   <span style="color: #990099; font-weight: bold;">Const</span> ForReading   <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">1</span>
   <span style="color: #990099; font-weight: bold;">Const</span> ForWriting   <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">2</span>
   <span style="color: #990099; font-weight: bold;">Const</span> ForAppending <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">8</span>
&nbsp;
   rs.<span style="color: #330066;">MoveFirst</span>
		<span style="color: #990099; font-weight: bold;">Do</span> Until rs.<span style="color: #0000ff; font-weight: bold;">EOF</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">True</span>   
   <span style="color: #008000;">'Map to the Requested HTML File...</span>
   filename <span style="color: #006600; font-weight: bold;">=</span> rs<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;FunctionName&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;.html&quot;</span>
   indexfilename <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;index.html&quot;</span>
   argname <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #006600; font-weight:bold;">&#40;</span>rs<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;FunctionName&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
   datatypes <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #006600; font-weight:bold;">&#40;</span>types<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;DataTypeName&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
   path <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">Server</span>.<span style="color: #330066;">MapPath</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;.&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;\Functions\&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> filename
   indexpath <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">Server</span>.<span style="color: #330066;">MapPath</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;.&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;\&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> indexfilename
   datatypename <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">Server</span>.<span style="color: #330066;">MapPath</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;.&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;\DataTypes\&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> datatypes
&nbsp;
   <span style="color: #008000;">'Call the funtion that will write the content...</span>
   <span style="color: #008000;">'CreateIndex(indexpath)</span>
   CreateFile<span style="color: #006600; font-weight:bold;">&#40;</span>path<span style="color: #006600; font-weight:bold;">&#41;</span>
   <span style="color: #008000;">'CreateType(datatypename)</span>
   <span style="color: #990099; font-weight: bold;">response</span>.<span style="color: #330066;">Write</span> <span style="color: #006600; font-weight:bold;">&#40;</span>rs<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;FunctionName&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight:bold;">&#41;</span> + <span style="color: #cc0000;">&quot;&lt;/BR&gt;&quot;</span>
   rs.<span style="color: #330066;">MoveNext</span>   
   <span style="color: #990099; font-weight: bold;">Loop</span>
<span style="color: #000000; font-weight: bold;">%&gt;</span>
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;HEAD&gt;
&lt;title&gt;DB Export&lt;/title&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
  &lt;tr&gt; 
    &lt;td width=&quot;30%&quot;&gt;&amp;nbsp;&lt;/td&gt;
    &lt;td width=&quot;70%&quot;&gt;&amp;nbsp;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
<span style="color: #000000; font-weight: bold;">&lt;%</span> <span style="color: #0000ff; font-weight: bold;">sub</span> CreateIndex<span style="color: #006600; font-weight:bold;">&#40;</span>indexpath<span style="color: #006600; font-weight:bold;">&#41;</span>
    <span style="color: #990099; font-weight: bold;">dim</span> fs, <span style="color: #990099; font-weight: bold;">file</span>
    <span style="color: #990099; font-weight: bold;">set</span> fs <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #330066;">CreateObject</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;Scripting.FileSystemObject&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
       <span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #330066;">Write</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;Creating &quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> indexfilename <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;.&lt;/BR&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
       <span style="color: #990099; font-weight: bold;">set</span> <span style="color: #990099; font-weight: bold;">file</span> <span style="color: #006600; font-weight: bold;">=</span> fs.<span style="color: #9900cc;">CreateTextFile</span><span style="color: #006600; font-weight:bold;">&#40;</span>indexpath<span style="color: #006600; font-weight:bold;">&#41;</span>         
       <span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #330066;">Write</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;Writing data to &quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> indexfilename <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;...&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/BR&gt;&lt;/BR&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #330066;">Write</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;HR&gt;&lt;/BR&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
       <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;HTML&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TITLE&gt;Table Of Contents&lt;/TITLE&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
       <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;BODY&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #008000;">' Write Out the Actual Syntax for Each Function</span>
		<span style="color: #990099; font-weight: bold;">Dim</span> TOC
		<span style="color: #990099; font-weight: bold;">Dim</span> TOC_numRows
&nbsp;
		<span style="color: #990099; font-weight: bold;">Set</span> TOC <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">Server</span>.<span style="color: #330066;">CreateObject</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;ADODB.Recordset&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
		TOC.<span style="color: #9900cc;">ActiveConnection</span> <span style="color: #006600; font-weight: bold;">=</span> MM_DBExport_STRING
		TOC.<span style="color: #9900cc;">Source</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;SELECT * FROM dbo.Functions ORDER BY FunctionName ASC &quot;</span>
		TOC.<span style="color: #9900cc;">CursorType</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">0</span>
		TOC.<span style="color: #9900cc;">CursorLocation</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">2</span>
		TOC.<span style="color: #9900cc;">LockType</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">1</span>
		TOC.<span style="color: #330066;">Open</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
		<span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #330066;">Write</span><span style="color: #006600; font-weight:bold;">&#40;</span> <span style="color: #cc0000;">&quot;Please Scroll to the Bottom of the Page..&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
		   <span style="color: #990099; font-weight: bold;">Do</span> <span style="color: #990099; font-weight: bold;">While</span> <span style="color: #990099; font-weight: bold;">NOT</span> TOC.<span style="color: #0000ff; font-weight: bold;">EOF</span>
			  <span style="color: #008000;">' If (trim(argname) = trim(rs(&quot;FunctionName&quot;)) ) then</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TABLE WIDTH=600 BORDER=0 CELLPADDING=0 CELLSPACING=0&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TR BGCOLOR=#E6E6E6&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TD WIDTH=66 HEIGHT=18&gt;&lt;/TD&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;A HREF=Functions/&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>TOC.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;FunctioNname&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;.html&gt;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>TOC.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;FunctioNname&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/TD&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/TR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/TABLE&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #008000;">'else</span>
						<span style="color: #008000;">'Do Nothing!</span>
						<span style="color: #008000;">'end if						</span>
						<span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #330066;">Write</span><span style="color: #006600; font-weight:bold;">&#40;</span>TOC.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;FunctioNname&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;.html&quot;</span> + <span style="color: #cc0000;">&quot;&lt;BR&gt;&quot;</span>
					TOC.<span style="color: #330066;">MoveNext</span>					
				<span style="color: #990099; font-weight: bold;">Loop</span> 
&nbsp;
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/BODY&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/HTML&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
       <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #330066;">Close</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
	   				TOC.<span style="color: #330066;">Close</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
				<span style="color: #990099; font-weight: bold;">Set</span> TOC <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">Nothing</span>	  
		<span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #330066;">Write</span><span style="color: #006600; font-weight:bold;">&#40;</span> <span style="color: #cc0000;">&quot;&lt;A HREF=Index.html&gt;Click here for the Index Page...&lt;/A&gt;&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
 <span style="color: #990099; font-weight: bold;">end</span> <span style="color: #0000ff; font-weight: bold;">sub</span>
<span style="color: #000000; font-weight: bold;">%&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;%</span> <span style="color: #0000ff; font-weight: bold;">sub</span> CreateFile<span style="color: #006600; font-weight:bold;">&#40;</span>path<span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
    <span style="color: #990099; font-weight: bold;">dim</span> fs, <span style="color: #990099; font-weight: bold;">file</span>
    <span style="color: #990099; font-weight: bold;">set</span> fs <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #330066;">CreateObject</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;Scripting.FileSystemObject&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
       <span style="color: #008000;">'Response.Write(&quot;Creating &quot; &amp; filename &amp; &quot;.&lt;/BR&gt;&quot;)</span>
       <span style="color: #990099; font-weight: bold;">set</span> <span style="color: #990099; font-weight: bold;">file</span> <span style="color: #006600; font-weight: bold;">=</span> fs.<span style="color: #9900cc;">CreateTextFile</span><span style="color: #006600; font-weight:bold;">&#40;</span>path<span style="color: #006600; font-weight:bold;">&#41;</span>         
       <span style="color: #008000;">'Response.Write(&quot;Writing data to &quot; &amp; (rs.Fields.Item(&quot;FunctionName&quot;).Value) &amp; &quot;...&quot; &amp; &quot;&lt;/BR&gt;&lt;/BR&gt;&quot;)</span>
	   <span style="color: #008000;">'Response.Write(&quot;&lt;HR&gt;&lt;/BR&gt;&quot;)</span>
       <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;HTML&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TITLE&gt;&quot;</span>  <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>rs.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;FunctionName&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/TITLE&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
       <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;BODY&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TR&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
       <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TD WIDTH=66&gt;&lt;STRONG&gt;&lt;FONT COLOR=RED SIZE=&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;4&gt;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>rs.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;FunctionName&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/BR&gt;&lt;/BR&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TD ALIGN=RIGHT VALIGN=TOP&gt;&lt;A HREF=../Index.html&gt;Go Back&lt;/A&gt;&lt;/TD&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/TR&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/TABLE&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;HR&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
       <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;STRONG&gt;Summary: &quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/STRONG&gt;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&amp;nbsp;&amp;nbsp;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>rs.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;Summary&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/BR&gt;&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;STRONG&gt;Header File: &quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/STRONG&gt;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
       <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&amp;nbsp;&amp;nbsp;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>rs.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;Header&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/BR&gt;&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;STRONG&gt;Library Name:&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/STRONG&gt;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
       <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&amp;nbsp;&amp;nbsp;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span>  <span style="color: #006600; font-weight:bold;">&#40;</span>rs.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;LibName&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/BR&gt;&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
		<span style="color: #008000;">' Write Out the Actual Syntax for Each Function</span>
		<span style="color: #990099; font-weight: bold;">Dim</span> rs2
		<span style="color: #990099; font-weight: bold;">Dim</span> rs2_numRows
&nbsp;
		<span style="color: #990099; font-weight: bold;">Set</span> rs2 <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">Server</span>.<span style="color: #330066;">CreateObject</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;ADODB.Recordset&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
		rs2.<span style="color: #9900cc;">ActiveConnection</span> <span style="color: #006600; font-weight: bold;">=</span> MM_DBExport_STRING
		rs2.<span style="color: #9900cc;">Source</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;SELECT * FROM dbo.FunctionArguments WHERE FunctionName = '&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span>  rs<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;functionName&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;' ORDER BY ID, SortOrder ASC  &quot;</span>
		rs2.<span style="color: #9900cc;">CursorType</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">0</span>
		rs2.<span style="color: #9900cc;">CursorLocation</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">2</span>
		rs2.<span style="color: #9900cc;">LockType</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">1</span>
		rs2.<span style="color: #330066;">Open</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TABLE WIDTH=600 BORDER=0 CELLPADDING=0 CELLSPACING=0&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TR BGCOLOR=#E6E6E6&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TD WIDTH=66&gt;&lt;/TD&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #006600; font-weight:bold;">&#40;</span>rs.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;ReturnType&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>rs.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;ReturnPointerType&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span><span style="color: #006600; font-weight:bold;">&#40;</span>rs.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;FunctionName&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&amp;nbsp;&amp;nbsp;(&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/TD&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/TR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/TABLE&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
			   <span style="color: #990099; font-weight: bold;">Do</span> <span style="color: #990099; font-weight: bold;">While</span> <span style="color: #990099; font-weight: bold;">NOT</span> rs2.<span style="color: #0000ff; font-weight: bold;">EOF</span>
			   <span style="color: #990099; font-weight: bold;">If</span> <span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #330066;">trim</span><span style="color: #006600; font-weight:bold;">&#40;</span>argname<span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #330066;">trim</span><span style="color: #006600; font-weight:bold;">&#40;</span>rs<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;FunctionName&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #990099; font-weight: bold;">then</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TABLE WIDTH=600 BORDER=0 CELLPADDING=0 CELLSPACING=0&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TR BGCOLOR=#E6E6E6&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TD WIDTH=66&gt;&lt;/TD&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>rs2.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;ArgumentType&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>rs2.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;ArgumentPointerType&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>rs2.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;ArgumentName&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;,&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/TD&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/TR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/TABLE&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">else</span>
						<span style="color: #008000;">'Do Nothing!</span>
						<span style="color: #990099; font-weight: bold;">end</span> <span style="color: #990099; font-weight: bold;">if</span>
&nbsp;
					rs2.<span style="color: #330066;">MoveNext</span>
				<span style="color: #990099; font-weight: bold;">Loop</span>
				rs2.<span style="color: #330066;">Close</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
				<span style="color: #990099; font-weight: bold;">Set</span> rs2 <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">Nothing</span>	  
&nbsp;
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TABLE WIDTH=600 HEIGHT=18 BORDER=0 CELLPADDING=0 CELLSPACING=0&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;TR BGCOLOR=#E6E6E6&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&amp;nbsp;&amp;nbsp;)&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/TR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/TABLE&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
		<span style="color: #008000;">'Write out the Function Argument</span>
		<span style="color: #990099; font-weight: bold;">Dim</span> rs3
		<span style="color: #990099; font-weight: bold;">Dim</span> rs3_numRows
&nbsp;
		<span style="color: #990099; font-weight: bold;">Set</span> rs3 <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">Server</span>.<span style="color: #330066;">CreateObject</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;ADODB.Recordset&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
		rs3.<span style="color: #9900cc;">ActiveConnection</span> <span style="color: #006600; font-weight: bold;">=</span> MM_DBExport_STRING
		rs3.<span style="color: #9900cc;">Source</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;SELECT * FROM dbo.FunctionArguments WHERE FunctionName = '&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span>  rs<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;functionName&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;' ORDER BY SortOrder ASC&quot;</span>
		rs3.<span style="color: #9900cc;">CursorType</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">0</span>
		rs3.<span style="color: #9900cc;">CursorLocation</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">2</span>
		rs3.<span style="color: #9900cc;">LockType</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">1</span>
		rs3.<span style="color: #330066;">Open</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
			   <span style="color: #990099; font-weight: bold;">Do</span> <span style="color: #990099; font-weight: bold;">While</span> <span style="color: #990099; font-weight: bold;">NOT</span> rs3.<span style="color: #0000ff; font-weight: bold;">EOF</span>
			   <span style="color: #990099; font-weight: bold;">If</span> <span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #330066;">trim</span><span style="color: #006600; font-weight:bold;">&#40;</span>argname<span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #330066;">trim</span><span style="color: #006600; font-weight:bold;">&#40;</span>rs<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;FunctionName&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #990099; font-weight: bold;">then</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;STRONG&gt;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>rs3.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;ArgumentName&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/STRONG&gt;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;I&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>rs3.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;Description&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/I&gt;&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
						<span style="color: #990099; font-weight: bold;">else</span>
						<span style="color: #008000;">'Do Nothing!</span>
						<span style="color: #990099; font-weight: bold;">end</span> <span style="color: #990099; font-weight: bold;">if</span>
					rs3.<span style="color: #330066;">MoveNext</span>
				<span style="color: #990099; font-weight: bold;">Loop</span>
			rs3.<span style="color: #330066;">Close</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
			<span style="color: #990099; font-weight: bold;">Set</span> rs3 <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">Nothing</span>	  
&nbsp;
       <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/BR&gt;&lt;STRONG&gt;Description: &quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/STRONG&gt;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&amp;nbsp;&amp;nbsp;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>rs.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;Description&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/BR&gt;&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
       <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;STRONG&gt;Notes: &quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/STRONG&gt;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&amp;nbsp;&amp;nbsp;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>rs.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;Notes&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/BR&gt;&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;STRONG&gt;Return Description: &quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/STRONG&gt;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
   	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&amp;nbsp;&amp;nbsp;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>rs.<span style="color: #330066;">Fields</span>.<span style="color: #9900cc;">Item</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;ReturnDescription&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>.<span style="color: #9900cc;">Value</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&lt;/BR&gt;&lt;/BR&gt;&quot;</span> <span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/BODY&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
	   <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #9900cc;">WriteLine</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&lt;/HTML&gt;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
       <span style="color: #990099; font-weight: bold;">file</span>.<span style="color: #330066;">Close</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
	   <span style="color: #008000;">' Now create the Table of Contents!</span>
&nbsp;
 <span style="color: #990099; font-weight: bold;">end</span> <span style="color: #0000ff; font-weight: bold;">sub</span>
  <span style="color: #008000;">'CreateIndex(indexpath)</span>
<span style="color: #000000; font-weight: bold;">%&gt;</span>
&lt;/BODY&gt;
&lt;/HTML&gt;
<span style="color: #000000; font-weight: bold;">&lt;%</span>
rs.<span style="color: #330066;">Close</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #990099; font-weight: bold;">Set</span> rs <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">Nothing</span>
<span style="color: #000000; font-weight: bold;">%&gt;</span></pre></td></tr></table></div>

<p>The output from this script can be <a href="http://developer.lggi.com/html/Index.html" target="_blank">viewed here</a>&#8230;</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/vXTlPRAx0vo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/06/14/asp-and-filesystemobjects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<georss:point>33.976936 -84.211695</georss:point><geo:lat>33.976936</geo:lat><geo:long>-84.211695</geo:long>	<feedburner:origLink>http://www.adamestrada.com/2009/06/14/asp-and-filesystemobjects/</feedburner:origLink></item>
		<item>
		<title>SpatiaLite and Smart Phones</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/iSQU03ugzE8/</link>
		<comments>http://www.adamestrada.com/2009/06/14/spatialite-and-smart-phones/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 13:59:43 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[GeoSpatial]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[SpatiaLite]]></category>
		<category><![CDATA[Windows Mobile]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=144</guid>
		<description><![CDATA[I started the SpatiaLite Google Group a little over a year ago and since then, it&#8217;s grown a lot! I&#8217;m really glad to see such an interest in this awesome technology and one day I hope to see it as a strong and viable alternative for the personal GeoDatabase. I know that there is demand [...]]]></description>
			<content:encoded><![CDATA[<p>I started the <a href="http://groups.google.com/group/spatialite-users" target="_blank">SpatiaLite Google Group</a> a little over a year ago and since then, it&#8217;s grown a lot! I&#8217;m really glad to see such an interest in this awesome technology and one day I hope to see it as a strong and viable alternative for the personal <a href="http://www.esri.com/software/arcgis/geodatabase/index.html" target="_blank">GeoDatabase</a>. I know that there is demand for SpatiaLite because once upon a time I posted something on the <a href="http://geopdf.blogspot.com/2008/07/spatialite-alternative-spatial-database.html" target="_blank">GeoPDF blog</a> and more traffic came to the site because of that post than the actual GeoPDF.</p>
<p>We are dead smack in the middle of the smart phone revolution which means that most if not all cell phones that you can purchase these days also do a multitude of other tasks. These tasks can range from a simple calendar that links to your Google account to a full blown video game that you can interact with other smart phones through.</p>
<p>My interest, of course, is in the advantage of being able to use a phone as a light-weight mapping device. iPhone, Android, and Windows Mobile all have pretty nifty mapping applications from both Open Source and COTS sources. I&#8217;ve seen on the SpatiaLite Group that users have successfully deployed this database technology on the <a href="http://groups.google.com/group/spatialite-users/browse_thread/thread/f3b5941da7eded8d" target="_blank">iPhone </a>and most recently on the <a href="http://groups.google.com/group/spatialite-users/browse_thread/thread/fdc0dd434b8d5248" target="_blank">Windows Mobile platform</a>. Please see the excerpt below&#8230;</p>
<blockquote><p>Firstly, I love this open source spatial DBMS and thanks Alessandro<br />
for developing this marvelous program. I would like to contribute my<br />
personal effort by sharing a set of workable Spatialite DLLs for<br />
Windows Mobile 5 smart device. The binary files have been installed<br />
and test with a number of VB2005/8 smart device applications.</p>
<p>I have produced two sets of binary files (one set is compiled with<br />
Proj 4.6.1 only and the other set is compiled with Proj 4.6.1 and GEOS<br />
3.1.0. The link http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.0.html<br />
illustrated the differences). It took me quite a lot of time to figure<br />
out how to make and compile GEOS for WM5 environment. The DLLs are<br />
compiled with Microsoft VS 2008 Professional and the target device is<br />
WM5 with .NET Compact Framework 3.5.</p>
<p>The Mateusz Loskot (http://mateusz.loskot.net/) blog is a good<br />
reference site to consult when compiling Proj4 and GEOS 3.<br />
System.Data.SQLite is a good SQLite ADO.NET data provider to work on<br />
when developing your own .NET database application both for desktops<br />
and smart devices. Thanks Robert.</p>
<p>At the moment, I only have time to share the binaries without<br />
explaining the make and build procedures. Once I finish the tidying<br />
and cleanup, I will share the modified/edited sources with Microsoft<br />
VS solution and projects.</p>
<p>The link for downloading the pre-complied DLLs is http://myweb.polyu.edu.hk/~lsykshea/public</p></blockquote>
<p>Let&#8217;s face it&#8230;our cell phones are now more powerful than our first computers were and they are getting much, much better all the time so why not push to do more than just view your spatial data on them. Why not start to ask questions from your data while on? We *can* do this without dropping a lot of coin on COTS solutions&#8230;</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/iSQU03ugzE8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/06/14/spatialite-and-smart-phones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<georss:point>41.87194 12.56738</georss:point><geo:lat>41.87194</geo:lat><geo:long>12.56738</geo:long>	<feedburner:origLink>http://www.adamestrada.com/2009/06/14/spatialite-and-smart-phones/</feedburner:origLink></item>
		<item>
		<title>GeoRSS from C#</title>
		<link>http://feedproxy.google.com/~r/AdamEstrada/~3/nTcOL8KSgUg/</link>
		<comments>http://www.adamestrada.com/2009/06/13/georss-from-c/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 23:14:02 +0000</pubDate>
		<dc:creator>Adam Estrada</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[GeoSpatial]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[GeoRSS]]></category>

		<guid isPermaLink="false">http://www.adamestrada.com/?p=124</guid>
		<description><![CDATA[I wrote a little web page that creates an ATOM feed to return records as they were read from a database. I have my reasons why I published my data as GeoRSS rather than a standard XML feed so we&#8217;ll leave it at that. Let&#8217;s just say that most of the ESRI Flex applications I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote a little web page that creates an ATOM feed to return records as they were read from a database. I have my reasons why I published my data as <a href="http://georss.org/Main_Page" target="_blank">GeoRSS</a> rather than a standard XML feed so we&#8217;ll leave it at that. Let&#8217;s just say that most of the ESRI Flex applications I&#8217;ve worked with do a pretty good job of handling GeoRSS data and you get 2 for 1 because your users can also view the data in their favorite RSS Reader! Here is my code&#8230;It doesn&#8217;t get much easier than this but if you do have a better way to publish an ATOM feed, I&#8217;d love to see it because I really don&#8217;t know how to do it!</p>
<div>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p124code40'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p12440"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
</pre></td><td class="code" id="p124code40"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> ProcessRequest<span style="color: #008000;">&#40;</span>HttpContext context<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            SqlConnection conn <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> SqlConnection<span style="color: #008000;">&#40;</span>ConfigurationManager<span style="color: #008000;">.</span><span style="color: #0000FF;">ConnectionStrings</span><span style="color: #008000;">&#91;</span>MyConnectionString<span style="color: #666666;">&quot;].ConnectionString);
&nbsp;
            conn.Open();
&nbsp;
            SqlDataReader rss = null;
            SqlCommand rss_cmd = new SqlCommand(&quot;</span><span style="color: #0600FF; font-weight: bold;">SELECT</span> TOP <span style="color: #FF0000;">100</span> <span style="color: #0600FF; font-weight: bold;">FROM</span> MyDB ORDER BY Updated DESC<span style="color: #666666;">&quot;, conn);
            rss = rss_cmd.ExecuteReader();
&nbsp;
            Response.Write(&quot;</span><span style="color: #008000;">&lt;?</span>xml version<span style="color: #008000;">=</span>\<span style="color: #666666;">&quot;1.0<span style="color: #008080; font-weight: bold;">\&quot;</span> encoding=<span style="color: #008080; font-weight: bold;">\&quot;</span>utf-8<span style="color: #008080; font-weight: bold;">\&quot;</span> ?&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;feed xmlns=<span style="color: #008080; font-weight: bold;">\&quot;</span>http://www.w3.org/2005/Atom<span style="color: #008080; font-weight: bold;">\&quot;</span> xmlns:georss=<span style="color: #008080; font-weight: bold;">\&quot;</span>http://www.georss.org/georss<span style="color: #008080; font-weight: bold;">\&quot;</span>&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;title&gt;Site Name&lt;/title&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;link href=<span style="color: #008080; font-weight: bold;">\&quot;</span>http://www.yoururl.com<span style="color: #008080; font-weight: bold;">\&quot;</span> /&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;updated&gt;&quot;</span> <span style="color: #008000;">+</span> DateTime<span style="color: #008000;">.</span><span style="color: #0000FF;">Now</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;/updated&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;author&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;name&gt;Adam con Carne&lt;/name&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;url&gt;href=<span style="color: #008080; font-weight: bold;">\&quot;</span>http://www.yoururl.com&quot;</span><span style="color: #008000;">&lt;/</span>url<span style="color: #008000;">&gt;</span>\n<span style="color: #666666;">&quot;);
            Response.Write(&quot;</span><span style="color: #008000;">&lt;/</span>author<span style="color: #008000;">&gt;</span>\n<span style="color: #666666;">&quot;);
            Response.Write(&quot;</span><span style="color: #008000;">&lt;</span>id<span style="color: #008000;">&gt;</span>urn<span style="color: #008000;">:</span>uuid<span style="color: #008000;">:</span><span style="color: #666666;">&quot; + System.Guid.NewGuid() + &quot;</span><span style="color: #008000;">&lt;/</span>id<span style="color: #008000;">&gt;</span>\n<span style="color: #666666;">&quot;);
&nbsp;
            string title = string.Empty;
            while (Name.Read())
            {
                title = dr[&quot;</span>Title<span style="color: #666666;">&quot;].ToString();
                title = title.Replace(&quot;</span><span style="color: #008000;">&amp;</span><span style="color: #666666;">&quot;, &quot;</span><span style="color: #008000;">&amp;</span>amp<span style="color: #008000;">;</span><span style="color: #666666;">&quot;);
                title = title.Replace(&quot;</span>\\<span style="color: #666666;">&quot;, &quot;</span><span style="color: #008000;">&amp;</span>quot<span style="color: #008000;">;</span><span style="color: #666666;">&quot;);
                title = title.Replace(&quot;</span><span style="color: #008000;">&lt;</span><span style="color: #666666;">&quot;, &quot;</span><span style="color: #008000;">&amp;</span>lt<span style="color: #008000;">;</span><span style="color: #666666;">&quot;);
                title = title.Replace(&quot;</span><span style="color: #008000;">&gt;</span><span style="color: #666666;">&quot;, &quot;</span><span style="color: #008000;">&amp;</span>gt<span style="color: #008000;">;</span><span style="color: #666666;">&quot;);
&nbsp;
                Response.Write(&quot;</span><span style="color: #008000;">&lt;</span>entry<span style="color: #008000;">&gt;</span>\n<span style="color: #666666;">&quot;);
                Response.Write(&quot;</span><span style="color: #008000;">&lt;</span>title<span style="color: #008000;">&gt;</span><span style="color: #666666;">&quot; + title + &quot;</span><span style="color: #008000;">&lt;/</span>title<span style="color: #008000;">&gt;</span>\n<span style="color: #666666;">&quot;);
                Response.Write(&quot;</span><span style="color: #008000;">&lt;</span>link href<span style="color: #008000;">=</span>\<span style="color: #666666;">&quot;default.aspx?article=&quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;ID&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\&quot;</span>/&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;id&gt;urn:uuid:&quot;</span> <span style="color: #008000;">+</span> <span style="color: #000000;">System</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Guid</span><span style="color: #008000;">.</span><span style="color: #0000FF;">NewGuid</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;/id&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;summary&gt;Asset ID: &quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;Asset_ID&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;/summary&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;updated&gt;&quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;Updated&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;/updated&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>         
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;georss:point&gt;&quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;Latitude&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot; &quot;</span> <span style="color: #008000;">+</span> dr<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;Longitude&quot;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;/georss:point&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/entry&gt;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
&nbsp;
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;&lt;/feed&gt;&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">ContentType</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;application/ATOM+XML&quot;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">AppendHeader</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Content-Encoding&quot;</span>, <span style="color: #666666;">&quot;ATOM&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Response<span style="color: #008000;">.</span><span style="color: #0000FF;">Clear</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            conn<span style="color: #008000;">.</span><span style="color: #0000FF;">Close</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

</div>
<p>Again, the GeoRSS-ATOM formatted feed that is produced here can be used several different ways which means that less really *is* more! I will post more on this in future posts&#8230;</p>
<img src="http://feeds.feedburner.com/~r/AdamEstrada/~4/nTcOL8KSgUg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.adamestrada.com/2009/06/13/georss-from-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.adamestrada.com/2009/06/13/georss-from-c/</feedburner:origLink></item>
	</channel>
</rss>
