Virtual Earth Map Control v6 Released

by Nate 17. October 2007 05:54

As I'm sure most of you already know, Microsoft's recent (October 15th) release of their new version of Live Maps is getting a lot of attention. While I'm as excited as everyone else about the new features, I'm much more interested in getting at these features through Virtual Earth's JavaScript map control. Well, I decided to take some time today to update one of my web map applications to the new version of the map control. Here's a rundown of my experience, including what I'm most excited about:

After switching to the v6 map control (http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6), the first thing I noticed was the new control. It's the same one that Live Maps uses. I must say that I really like it; It takes up less space, has nice transparency, and the ability to contract and expand it adds a lot to the overall experience.

ve5_1

However, immediately after noticing this I noticed a couple of problems with my application that required my attention:

  • None of my GeoRSS data were showing up. After looking into this, though, I realized that my JavaScript was incorrect (due to a hack), and - after a few simple changes - everything was back up and running. It's strange that the v5 map control let my errors slide, but I'm assuming that there must have been a fix in the underlying JavaScript that invalidated my code.
  • My custom icons were not displaying. This was, again, because of a workaround that I implemented in v5 of the map control. After going back and correcting a couple of things (read: making them conform to standards), this problem was taken care of.

And that's it! Those were the only problems that I ran into with the switch to the new map control, and both were necessary because of workarounds that I had to implement in v5 of the map control. I must say that I'm impressed with how easy it was. The upgrade from v4 to v5 was much more painful, but it looks like those painful changes are starting to pay off in time and effort saved now.

Some fixes that I've already noticed:

  • The SetCenterAndZoom method seems to be working correctly now. In v5 of the map control, it was inconsistent and I had to revert back to setting the center and then zooming to a point with two different methods.
  • Like in Live Maps, the 3D map control works *much better than it did in the v5 release. The overall experience is much smoother (especially in Firefox), and the data are looking better than ever.
  • It looks like the CSS has been touched up a bit, as well. With the v5 map control (and a couple of map control releases before it) the info boxes often showed up unattached to a particular point when hovering over the point in Internet Explorer. My workaround required creating my own custom info boxes and turning off Virtual Earth's. Hopefully I'll be able to abandon this workaround now.

Some enhancements to the SDK that I'm excited about (for a complete list, see the version changelist):

  • VEAltitude Enumeration - Gives developers the ability to find the altitude of any point on the globe.
  • VEMap.GetDirections Method - Allows for multi-point routing. This is a great addition.
  • VEMapStyle Enumeration - Added the "Shaded" value. It was possible to get to this in v5 of the map control, but it is now accessible through the LoadMap and SetMapStyle methods.
  • VEMatchConfidence Enumeration - Gives developers access to the accuracy of a returned geocode. This is an extremely useful feature that Google's geocode service has had since its 2.59 release. Microsoft still isn't as far along as Google on this one though; they only return three possible values (High, Medium, and Low), whereas Google returns nine values (0 being the least accurate (unknown) and 8 being the most accurate(address level)) and even gives developers access to "failure reasons", making it possible to let the user know why his/her geocode failed. That said, with this VEMatchConfidence Enumeration and the VEMatchCode Enumeration, Microsoft is moving in the right direction.
  • VERouteOptimize Enumeration - Allows developers to specify how a route is optimized. The options include Default (no route optimization is done), MinimizeTime, and MinimizeDistance.
  • There are also a handful of new 3D methods. It makes a lot of sense for Microsoft to continue to focus its resources on furthering Virtual Earth's 3D capabilities, as these capabilities are what really set it apart from the rest of the pack.

A random observation:

  • It looks like disambiguation is now turned off by default for the geocode service. When I searched for "Denver", I was taken straight to Denver with no other options presented to me. With v5 of the map control, I was always asked if I meant "Denver" the city or "Denver" the county.

All in all, I'm very impressed with this release. There are enough new features to get me excited, but I'm just as excited about some of the fixes. As I continue to work with this new version of the map control, I'll post about my experiences here.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Javascript | Microsoft Virtual Earth

BumpTop

by Nate 6. October 2007 19:54

As you can probably tell by now, I try to keep up with developments in technology. I find that doing so helps me perform better, and I'm constantly finding new tools to help me be more productive. One of the best places that I've found to keep up with not only developments in technology but also developments in thinking is TED. TED (Technology, Entertainment, and Design) is a conference that "brings together the world's most fascinating thinkers and doers" and challenges them to "give the talk of their lives (in 18 minutes)". These talks are made available on the web.

I recently randomly ran into a presentation on TED given by the co-creator of BumpTop. While I'm not sure that BumpTop is going to help me be more productive (although there certainly is a possibility that it could), I do know that it's very cool.

BumpTop is an overhaul of the standard desktop environment that we've all come to know and love. It allows you to store files in a more intuitive and "natural" way, piling them up, throwing them around, putting them on shelves, and crumpling them up and tossing them into the trash can. The interface runs on an environment that is physics-enabled, so it behaves much like you would expect it to in the real world. It supports all of the operations that we use everyday when managing our files on our current desktop, but in what appears to be a much more intuitive way.

That's really all the info that's available for now. I'm going to keep an eye on BumpTop as it is developed (and am trying to get on the beta), and will post about what I find out here.

In the meantime, here's a video presentation of the BumpTop prototype:

If you're reading this in an RSS reader and can't see the video, here's the link: http://www.youtube.com/watch?v=M0ODskdEPnQ.

And here's the video of the presentation that Anand Agarawala gave at TED:

Again, if you're reading this in an RSS reader and can't see the video, here's the link: http://www.ted.com/talks/view/id/131.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Applications

Setting Up a Windows Ruby on Rails Development Environment

by Nate 6. October 2007 18:55

Rails

I just recently decided to start working with Ruby on Rails, as I'm interested in seeing why it has become all the rage these days. Before I could start learning Ruby on Rails, I, of course, first needed to setup a development environment on my Windows desktop to help get me started. Well, there's a ton of documentation and help available online to aid us helpless Windows users, but I was unable to find a comprehensive walk through or discussion. It seems there really is no single definitive solution (there is no real IDE like Visual Studio in the Ruby world and there are myriad ways to do things). Through quite a bit of research, however, I was finally able to make a (somewhat) informed decision on what I wanted my environment to look like. This post will detail the setup that I chose, with instructions on getting it up and running on your own Windows desktop.

First, a couple of quick notes about the technologies:

e - Text Editor: Although I mentioned that there doesn't seem to be agreement as to what the best way to setup a Ruby on Rails development environment (on the Windows platform) is, there is definitely consensus among the masses as to what the best editor for programming in Ruby is: TextMate. Unfortunately, however, TextMate is Mac only, so for those of us who use Windows, we'll have to settle for something else. Well, after much reading and going back and forth, I decided to go with e - Text Editor. It is supposed to be the closest thing to TextMate that you can get on a PC; it even supports TextMate command and snippets. I have a little bit of experience with e, as I used it through many of its initial betas. But as soon as it came out of beta I had to either pay up or move on to something else. Well, at the time I chose to stick with good 'ole Notepad++, as it's open source and meets most of my needs. After reading all of e's recent praises, however, I've decided to give it another try, and this time I'll dig deep to see what kind of advantages it offers. At first glance it does seem incredibly powerful, and its integrated packages make it ideal for developing in a number of languages.

Cygwin: Most of you Windows users probably already have some experience with Cygwin, but for those who don't, here's a quick rundown. Cygwin is "a Linux-like environment for Windows" that allows Windows users to take advantage of the power of a lot of the Linux tools without actually running Linux.

PostgreSQL: I've used PostgreSQL in the past, and will be using it on a new project that I'm working on, so I thought I'd give it a spin. That said, there are many databases out there, so you should choose the one that best meets your needs. If you want to use a different database and need help on the installation, however, you'll have to find it somewhere else, as I'll be covering installation of and connection to PostgreSQL in this post.

Before I go on, a few disclaimers:

  • I set this environment up on a Windows Vista Ultimate x64 box, and haven't tested it on any other operating systems.
  • I do have both the "standalone Windows" and Cygwin environments installed on my machine, but have read in *numerous places that this can cause problems. I haven't had any issues as of yet, but am definitely living on the edge. You may not want to.

Note: Other than trying to figure out for yourself which environment best meets your needs, there is really no reason to install both the "standalone Windows" and Cygwin environments on your machine. So unless you like to experiment and play around with different configurations and tools, you'll probably want to choose one or the other.

Setting Up a Standalone Windows Environment

I decided to setup a standalone Windows environment in addition to the Cygwin environment, as I read in a couple of places that Ruby on Rails on Cygwin doesn't perform all that well. That said, I haven't had any major performance issues with the Cygwin environment up to this point.

1. Install e - Text Editor - There is a 30 day free full-featured trial available. If you like it, though, you'll have to pay $34.95 for a license.

2. Install Ruby via the Windows Installer.

3. Install RubyGems.

4. Install Rails:

  1. In the command prompt, type gem install rails --include-dependencies.
  2. If this doesn't work, you've likely got RubyGems problems. You can download the stand-alone package for Rails and install from there, but you'll likely want to take care of your RubyGems issues before moving on.

5. Create a Rails Application:

  1. In the command prompt, use cd to get to the directory where you want to create an application.
  2. In the command prompt, type rails ApplicationName and hit enter.

6. Install PostgreSQL:

  1. Download the latest win32 version of PostgreSQL (64-bit is not currently supported on Windows systems).
  2. Initiate the installer and walk through the wizard. A couple of potential "gotcha" spots:
    1. Let the installer create a new Windows account so PostgreSQL can run as a service (I accepted the default postgres account and specified my own password).
    2. Let the database initialize a cluster for you.
  3. Install postgres-pr gem, which is a Ruby driver for PostgreSQL:
    1. Command line: gem install postgres-pr.
    2. Using the pgAdminIII gui that is installed by default with PostgreSQL, create your application databases. Follow the Ruby on Rails naming convention of ApplicationName_development, ApplicationName_test, ApplicationName_production when naming them.
  4. Configure your application to connect to the database(s):
    1. Open up your config/database.yml file and enter the following information for, at the very least, the development database:
      1. adapter: postgresql
      2. database: your_database
      3. username: postgres
      4. password: YourPassword
      5. host: localhost (assuming that you're running PostgreSQL locally)
  5. Test your database connectivity:
    1. From the top level of your Rails application, type the following at a command prompt: rake db:migrate.
    2. If you get a response similar to this: (in c:/dev/YourWebApplication), you are good to go. If you get an error message, walk through the steps again, double-checking your configuration and fixing any mistakes (a Google search of the error is probably the best place to start).

Setting Up a Cygwin Environment

1. Install e - Text Editor - There is a 30 day free full-featured trial available. If you like it, though, you'll have to pay $34.95 for a license.

2. Install Cygwin:

  1. Download the Cygwin Setup.exe and double-click it to initiate the install.
  2. Step through the install wizard, accepting the defaults until you get to the "Select Packages" dialog.
  3. In the "Select Packages" dialog, make sure that Ruby and Subversion are installed.

3. Install Ruby Gems:

  1. Download the latest version.
  2. From a Cygwin prompt, type: ruby "pathtorubygemsdownloaddirectory\setup.rb"

4. Install Console - This isn't required, but it's pretty nifty. Note that I had issues with a couple of the Console versions on Vista Ultimate x64. I finally found a version that has worked well for me. It is 2.00.125. See credit for this discovery in the links at the end of this post.

5. Setup e - Text Editor to open from Cygwin:

  1. Setup a Windows Path variable to point to C:\Program Files (x86)\e
  2. Open up your Cygwin .bashrc (if per user, it's located at C:\Cygwin\Home\UserName) and add "alias e='cygstart e'" under the "Aliases" section.

Helpful Resources That Guided Me in the Right Direction:

  • A Mac-esque Rails Development Environment on Windows - A very helpful blog entry that details setting up a Rails development environment on Cygwin. Through this entry, I discovered Console, the sweet command line utility that I mentioned in the "Setting Up a Cygwin Environment" section above, and how to setup e - Text Editor to open from within Cygwin.
  • So far, it's RoR blog - A general Ruby on Rails (on Windows) blog that contains some useful information.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

PostgreSQL | Ruby on Rails

Virtual Earth Map Control v6 Coming Soon

by Nate 3. October 2007 18:17

It looks like Microsoft is looking to release version 6 of its Virtual Earth map control around the middle of this month. This version includes both new features and enhancements to existing features. So far, they've disclosed that the following new features and enhancements will be included in this release:

  • Enhanced geocoding
  • Multipoint routing
  • Safari browser support
  • Localized driving directions

I'm especially excited about the multipoint routing and support for Safari.

There have also been rumors of KML support, though I haven't heard any official word about this.

It's safe (I think) to assume that this new version of the map control will also provide some fixes in Virtual Earth's 3d capability. I certainly hope so, at least, as we have some projects that really need to utilize 3d in the browser, but have held off on moving too far with them, as there are still some critical issues with the browser (especially Firefox) plugin.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Microsoft Virtual Earth

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen
GeoURL