title: Why would Bing Maps' VEMap.Find be failing silently?
body: <p>I'm doing some research on using Bing Maps for a proposed application and I've run into a wall. The general idea is that I want to show the locations of various items we have within X distance to a location. The start point is the US map and we're using the user's click to get lat/long, and using that to pick the nearest city. We'll center the map there and then load in pushpins for each of our items within the prescribed distance.</p>
  
  <p>In the way of building a demo, I've written the following. The problem I'm running into is that the call to landMap.Find in plotZipcode is failing silently. There's no error message and the console output both before and after the landMap.Find is displaying as expected, but plotPushpin is never executed.</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script charset="UTF-8" type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2&amp;mkt=en-us"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      var landMap = null;
  
      function getLatLong(evt) {
          var latLong = landMap.PixelToLatLong(new VEPixel(evt.mapX, evt.mapY));
          // This looks up the nearest city from the lat/long
          // and returns something like "EAGLE CREEK, IN"
          $.ajax({
              url: '/cfc/bing.cfc',
              data: {
                  method: 'findCity',
                  Latitude: latLong.Latitude,
                  Longitude: latLong.Longitude
              },
              success: plotZipcode
          });
      }
  
      function plotPushpin(layer, results, places, expectMore, errorMessage) {
          console.log('Executing plotPushpin...');
          if (landMap &amp;&amp; places &amp;&amp; places.length &gt;= 1) {
              var pushpin = new VEShape(VEShapeType.Pushpin, places[0].LatLong);
              pushpin.SetTitle('Available Repos Near '+places[0].Name);
              landMap.AddShape(pushpin);
          }
      }
  
      function plotZipcode(data, textStatus, XMLHttpRequest) {
          console.log('Executing plotZipcode...');
          if (landMap &amp;&amp; data.length &gt; 0) {
              console.log(data);
              landMap.Clear();
              console.log('Calling VEMap.Find...');
              landMap.Find(null, data, null, null, null, null, null, null, null, null, plotPushpin);
              //landMap.Find(null, data); // This doesn't work either.'
              console.log('Called VEMap.Find!');
          }
      }
  
      $(document).ready(function() {
          landMap = new VEMap('landLocation');
          landMap.LoadMap();
          landMap.ShowDisambiguationDialog(false);
          landMap.AttachEvent('onclick', getLatLong);
      });
  &lt;/script&gt;
  &lt;div id='landLocation' style="position:absolute; width:600px; height:400px;"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>The particularly frustrating thing is that if I use Firebug to manually execute the following, it behaves exactly as expected:</p>
  
  <pre><code>landMap.Find(null, "EAGLE CREEK, IN", null, null, null, null, null, null, null, null, plotPushpin);
  </code></pre>
  
  <p>Any insight into why VEMap.Find is simply doing nothing from within my AJAX callback would be greatly appreciated.</p>