<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>mikejuniper.com &#187; Virtual Earth</title>
	<atom:link href="http://www.mikejuniper.com/category/virtual-earth/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikejuniper.com</link>
	<description>Thoughts on GIS software development and life.</description>
	<lastBuildDate>Fri, 09 Dec 2011 20:17:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>My first Virtual Earth post</title>
		<link>http://www.mikejuniper.com/2008/08/my-first-virtual-earth-post/</link>
		<comments>http://www.mikejuniper.com/2008/08/my-first-virtual-earth-post/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 20:43:26 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Virtual Earth]]></category>

		<guid isPermaLink="false">http://www.mikejuniper.com/?p=4</guid>
		<description><![CDATA[So I&#8217;ve got a page with a virtual earth map into which I load a bunch of shapes. When the user mouses over a shape, I wanted the fill color to change and the infobox to popup. My initial plan was to use onmouseover and onmouseout but I found that when you mouse over the [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve got a page with a virtual earth map into which I load a bunch of shapes. When the user mouses over a shape, I wanted the fill color to change and the infobox to popup. My initial plan was to use onmouseover and onmouseout but I found that when you mouse over the infobox, the onmouseout event fires. So instead of using the onmouseover and onmouseout events, I handled everything in onmousemove and keep track of my &#8216;current&#8217; shape (_currentWatershed). I also check to see whether the shape the mouse is over is the same as the _currentWatershed and if so, I don&#8217;t do anything.</p>
<p><code>
<pre>
function mouseMoveHandler(e)
{
    if (e.elementID == null)
    {   //if we moused off all features
        //and there was a _currentWatershed set
        if (_currentWatershed != null)
        {
            _currentWatershed.SetFillColor(_watershedsFillColor);
            _map.HideInfoBox(_currentWatershed);
            _currentWatershed = null;
        }
    }
    else
    {
        var shape = _map.GetShapeByID(e.elementID);
        if (shape != null &#038;&#038;
            shape.GetShapeLayer() == _watershedsLayer &#038;&#038;
                shape != _currentWatershed)
        {
            if (_currentWatershed != null)
                _currentWatershed.SetFillColor(_watershedsFillColor);

            _currentWatershed = shape;
            _currentWatershed.SetFillColor(_watershedsHoverFillColor);
            _map.HideInfoBox();

            //shows the infobox at the mouse position when this event fires
            _map.ShowInfoBox(_currentWatershed, new VEPixel(e.mapX, e.mapY));
        }
    }
}
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikejuniper.com/2008/08/my-first-virtual-earth-post/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

