Bing Maps Tip of the Week: Shift-click and Right click

Tell the truth: how many times have you wanted to quickly zoom in to a
specific part of the map, and found it tedious to continually press the zoom in
button and re-center the map to get what you want? If you’re familiar with our
handy click-zoom feature, you already know that there’s a better way (but
continue reading—we’ve made some changes). And if you’ve never heard of it, read
on—I think you’ll love this timesaving tip!

With “click-zoom”, you can quickly and precisely zoom and center the map
exactly where you want it by clicking and dragging a rectangle around your
desired view. In past releases of Bing Maps, you could initiate this by holding
the CONTROL button down while left-clicking on the map. This had one
unfortunate side-effect on Macs: Control + click is the shortcut for
right-click—and that behavior overrode our click-zoom functionality.

To allow all Bing Maps users equal access to the click-zoom functionality,
and keep our keyboard shortcuts consistent across all browsers, we have recently
changed the key combination required to SHIFT and click. Beyond that, it
works exactly the same as before.

Let’s try an example: say you’re looking at a zoomed out view of the San
Francisco Bay Area, and you want to quickly zoom in to downtown San Francisco.
The fastest way to do so is to press and hold the SHIFT key on your
keyboard, and then left click with your mouse and drag a rectangle around the
area you want to zoom to.

As soon as you release your mouse, voilà, you’re now looking at exactly what you selected. Compare that to 5 clicks of the zoom-in button (in this example), and you can see this is quite a timesaver!

While we’re talking about timesaving tips, did you also know you could quickly zoom by right-clicking anywhere on the map? The right-click menu (accessible via your right mouse button, or Control + click on a Mac) contains options that make it easy to get directions to/from a specific point, add a custom pushpin (which can be saved to “My places”), zoom to either region or city level, and finally, center the map on the selected point.

So next time you’re staring at the world map and want to zoom in closely and quickly, just remember: SHIFT + click will take you there!

MapIconMaker 1.0: The Easy Way to Make Your Markers Meaningful

Posted by Pamela Fox, Maps API Team

In the talk I gave last fall about Maps Mashups Usability, I mentioned that one way to make your map more informative at first glance is to use the color and size of a marker to indicate categorical or density information. Previously, that would mean using an image editing program or server-side image generation script to create all the various marker icons needed. Now, with the introduction of MapIconMaker v1.0 into the open-source utility library, all that’s needed is a Javascript include and a bit of code. For example, the simple demo shows how the following line of code creates a GIcon that’s 64 by 64 pixels and has a green fill.

var newIcon = MapIconMaker.createMarkerIcon({width: 64, height: 64, primaryColor: "#00ff00"});

Behind the scenes, that line of code constructs the URLs for the various GIcon properties by using a special output of the Chart API to generate marker icon images. But don’t worry about that – just use our nifty MarkerIconOptions wizard to preview various settings, and then copy the generated code into your own mashup.

We loved the dynamic icons so much that we couldn’t wait to start using them – so some of you might have already seen them in use for Google’s Decision 2008 mapplet/map (screenshot below). At the zoomed out view, the map contains dynamically sized and colored markers for each state. The color represents the candidate that got the most votes, and the size represents the relative number of votes that candidate received. When you zoom into the state, the map then contains markers for each voting precinct representing the same data. It’s a great way to quickly understand the population density and voting habits of a region.

We hope you enjoy MapIconMaker as much as we do. Please look through the reference and examples, and let us know if you have any questions in the forum.