Archive

Posts Tagged ‘virtual earth’

Create an Animated GPS Like Driving Direction with Virtual Earth Map

September 6th, 2007 No comments

Link: Animated 3D Driving Direction

Reading map isn’t always an easy job for lots of people.  In Friends TV show, Joey put a paper map on the gound and step on it in order to get a sense which direction is right.  Though that’s a little bit of a extreme case, it illustrates the challenge.  Many people need more intuitive online maps too and especially the driving directions, so that they don’t have to put the computer monitor on the ground and step on it :)   Some GPS devices like TomTom came up with really nice 3D UI to show the driving directions in a much more intuitive way.

tomtom.jpg

Live Virtual Earth Map provides a rich set of APIs with which interesting map applications could be developed, even in 3D and birds eye view.  As an example, I built an animated driving direction that kind of simulates TomTom.  Turn by turn the map will move as if you are driving and what you see is a view of 45 degree looking down from above your "car" and you can see clearly what road and intersection is ahead of you.

3Ddriving.jpg

The basic idea is to call the routing API to get the itinerary with all segments of the driving direction.  For each segment, the map orientation will be adjusted so that the next point is right ahead and then pan to the next point while showing the textual turn by turn instruction. Some suggestion for the API is that the panning APIs are mostly asynchronized so that the calls return immediately while the actually panning is done a while later.  This causes a little bit trouble in showing the textual turn by turn driving direction in sync with the map animation.  Map events help to some degree, but still some work needs to be done to keep the map and text in sync, because events are generic and there doesn’t seem to be a way to assign per event instance parameters.  Also the detailed road of each segment is not available, so when the road between 2 points is not straight we can’t follow the curve of the road in order to simulate the exact driving experience.

Categories: Web Tags: ,

Live Maps launches new version with Firefox support for 3D

April 3rd, 2007 No comments

clipped from liveside.net

A new major revision of Live Maps was released today, with a number of new features and enhancements. At the top of the list is Firefox (v 1.5 or later) support for 3D mapping. In addition, memory management and cache performance has been improved for the IE version. 3D support is now also included for the Space Navigator, a 3D controller made by 3dConnexion, a Logitech company.

  powered by clipmarks blog it

This release really has a few very desired new features. Not being compatible with Firefox is a popular complaint about Microsoft’s web services products. This is a good answer. Hopefully, the browser compatibility issues could be addressed at the very beginning of the future new product release, so that the public image of being IE-biased can be wiped off and gain more traction over the net.

This new release also enables inserting maps and driving directions into the emails and meeting appointments created in outlook. It is even considerate to block the driving time for the meeting too.

A feature that I have been longing for is the organization of scratch pad. However, still doesn’t seem easy to move the push pins over to a different collection.

InfoNow switches to Microsoft’s Virtual Earth

March 29th, 2007 No comments

This is an important step of Microsoft’s Virtual Earth improving its branding awareness and could also potentially lead to more value added features to live local search. Virtual Earth comes later than MapQuest, Yahoo maps, and Google Maps, but it does has some nice features like 3-D view, 3-D building model, birds eye view, and my favorite feature Scratch Pad where you can store your favorite locations of restaurants, stores, and so on under different categories. This way you don’t have to type in addresses you may check on the map from time to time and you can also conveniently share interesting locations with your friends through email or blog posts. It also showes real time traffic data and road incidents, which could be viewed on your cell phone or GPS to optimize your driving. The push pin is a cute tool too to enable you to mark any location where there is no valid address. There are lots of aspects that Virtual Earth maps needs to improve too though. For example, once I check the driving direction. The route Virtual Earth gave me looks optimal and shorter than the the one I got from Google maps, however in reality the shorter route is mostly through very narrow streets with lots of stop signs. Obviously, the "convenience" of the the streets that are picked for the routing is not weighted enough in Virtual Earth. By the way, if you are interested you can try out the Virtual Earth plugin for MovableType. It’s fun to play with the 3D map on your blog.

read more | digg story

Categories: Web Tags: , , , ,

Movable Type plugin of Virtual Earth maps

March 18th, 2007 No comments

There are some great map plug-ins from Nick Punter and Stefan Dembowski.  I implemented this new one based on Virtual Earth.  Some new features in this plug-in are:

Give it a try at the map test page.
Screen Shot:

Download:

VirtualEarthMaps-0.6.zip

Installations and Instructions:

# Virtual Earth Maps
# (Movable Type Plub-In of Virtual Earth http://maps.live.com/)
#
# Author: Stanley Yao (http://stanblog.jojoyao.com)
# Created: March 10, 2007

Files in this plugin package
============================
-+
 +–plugins
 |   +–VirtualEarthMaps
 |       +–VirtualEarthMaps.pl
 +–mt-static
     +–plugins
         +–VirtualEarthMaps
             +–js
                 +–virtual_earth.js

Installation
============
* Copy the VirtualEarthMaps.pl file into <MTROOT>/plugins/VirtualEarthMaps/
  Create sub-directories as necessary.
  <MTROOT> is where your Movable Type software is installed.
* Copy the virtual_earth.js file into <MT_STATIC_ROOT>/plugins/VirtualEarthMaps/
  Create sub-directories as necessary.
  Here the <MT_STATIC_ROOT> (usually named "mt-static") is not necessarily
  inside your <MTROOT> directory.

Tags to be used to insert maps in your blog
===========================================
<$MTVirtualEarthMaps address="<ADDRESS>"
                     latitude="<LAT>"
                     longitude="<LONG>"
                     info="<INFORMATION>"
                     zoom="<ZOOM>"
                     style="<STYLE>"                     mode="<MODE>"
                     width="<WIDTH>"
                     height="<HEIGHT>"$>

"address" OR ("latitude", "longitude") specifies the location you want to map.
"info" is the extra description (e.g., restaurant name)
"zoom" is how detail the map is.  It can be from 1 through 19, the bigger the more detail.  Default is 15.
"style" can be "r" – "road view", "a" – aerial view, "h" – hybrid view, and "o" bird’s eye view.  Default is "r".
"mode" can be "2D" or "3D".  "3D" requires IE.  Default is "2D".
"width" and "height" specifies how big the map is.  Default is 300px by 300px.

Examples:
<$MTVirtualEarthMaps address="525 Bellevue Sq, Bellevue, WA"$>
<$MTVirtualEarthMaps address="525 Bellevue Sq, Bellevue, WA" info="P F Chang" zoom="16" style="r" width="500" height="400"$>
<$MTVirtualEarthMaps latitude="47.604439" longitude="-122.330081" style="r" zoom="15" width="400" height="400"$>
<$MTVirtualEarthMaps latitude="47.620858" longitude="-122.348891" info="Space Needle" style="h" mode="3D" zoom="15" width="500" height="400"$>

Showing maps in your blog entries
=================================
You need "Process Tags" plugin http://kalsey.com/2002/08/process_tags_plugin/.
See more details in Stefan Dembowski’s explaination http://www.sixapart.com/pronet/plugins/plugin/mtyahoomaps.html.

Thank:

The following resources have been very helpful:


Bug Report:

You can report bugs by either comment on this entry or send me email at email.GIF .

Categories: Web Tags: , , ,

Test my new Virtual Earth Maps plugin

March 18th, 2007 2 comments

This is a road-view 2D map:
<$MTVirtualEarthMaps address="525 Bellevue Sq, Bellevue, WA" info="P F Chang" zoom="16" style="r" width="500" height="400"$>

This is a hybrid 3D map of Space Needle viewing at 35 degree angle:
<$MTVirtualEarthMaps latitude="47.620858" longitude="-122.348891" info="Space Needle" style="h" mode="3D" zoom="15" width="500" height="400"$>

Categories: Web Tags: , ,

Display multiple virtual earth maps on the same web page

March 12th, 2007 No comments

Playing with mapping service API is a lot of fun, especially the Virtual Earth 3D maps, on which you can adjust altitude, heading, pitch and so on and pan through the city downtown over the skyscrapers.  Google map and Microsoft Virtual Earth has similar JavaScript/AJAX interfaces.  Tried the MTGoogleMaps plug-in and it’s quite good and easy to use.  There is one problem though when displaying, on IE, multiple maps by using multiple template tags on the same page.  The problem the tag will generate the same script-lets each time it appears on a page.  So there are multiple pairs of <div id="map"> and <script> in the resulting page, and the element ID of them are all the same – "map".  Although the element IDs are supposed to be unique across the page, but the browser will still try to render the page when there are ID collision.  However the result is not consistent on IE and Firefox.  Look at this example:

Element ID Collision
    <div id="Div1" style="width: 100px; height: 100px">d1</div>
<script type="text/javascript">
var v = document.getElementById("Div1");
alert(v.innerHTML);
</script>

    <div id="Div1" style="width: 100px; height: 100px">d2</div>
<script type="text/javascript">
var v = document.getElementById("Div1");
alert(v.innerHTML);
</script>

The above script-let will show "d1" and then "d2" on firefox, which suggests the space locality.  The closer element is picked when there are multiple elements with the same ID.  But on IE, "d1" will show up twice.

To fix this issue, firstly we need to move the <div> tag (hosting the map) generation into the client script so that we can generate tags with different IDs.  Secondly, use an array to keep track of all the map objects in case we need them later to further manipulate the maps.

Dynamic Map Object Generation without ID Collision
function CreateMap(width, height)
{
    // If there is no maps on this page at all, initilize the map array
    if (!maps)
    {
        maps = new Array();
        mapId = 0;
    }
   
    // Create a new map and append it to the array
    var nextIdx = maps.length;
    var nextDivId = "mapDiv" + nextIdx;
    document.writeln(‘<div id="’ + nextDivId + ‘" style="position:relative; width:’ + width + ‘; height:’ + height + ‘;"></div>’);
    var map = new VEMap(nextDivId);
    maps[nextIdx] = map;
    ++ nextIdx;
   
    return map;
}

function GetMapByCoordinates(latitude, longitude)
{
    // …
    map = CreateMap(width, height);
    map.LoadMap(new VELatLong(latitude, longitude));
    // …
}

Categories: Web Tags: , , ,