Generated by BlogIt
BlogIt - Auto Blogging Software for YOU!








Due to the usage of non-latin characters in languages like Russian, and our decision to label countries and cities in their native tongue, I've always found browsing foreign countries in Google Maps to be quite the educational experience. How else would I have discovered that other languages have such pretty swirly letters? Unfortunately, it's also quite a frustrating experience when you're actually trying to find some place in those countries ("Tokyo! SHOW ME TOKYO!! aRrrgghghH!"). Well, thankfully the Google Maps team has now made it easier to have both an educational and satisfying experience with the recent introduction of transliterated tiles for Russia, Greece, Japan, and Thailand.
For users with a browser setting for the native languages of those countries, they'll continue seeing the tiles with just the labels in that language. But for everyone else, they'll see tiles with both the labels in the native character set and in the latin character set below it. You can trust the language setting to get that effect in the Maps API, or if you'd like, you can force a particular output in both the Javascript and Static Maps API by appending the"hl" parameter to the script src or image src with the desired language value. Experiment with the various language/country combinations in the example below to see this in action in both the Static and Javascript APIs:


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.


When we launched the map editing tools in Google Maps, the reaction of developers was "This is cool, but how can I use it on my own site?" As someone who was originally drawn to Google in part because of the Maps API and the great developer community around it, I committed to making the My Maps tools useful for developers on their own sites.
Today, I'm pleased to announce that our user interface functionality for editable polylines and polygons is now part of the Maps API.
Say, for example, that you have a GPolygon you want users to be able to edit. Simply call GPolygon.enableEditing() and the poly will have draggable edit control vertices when the user mouses over it. To later make it non-editable, call GPolygon.disableEditing().
We've also exposed additional events for GPolygon and GPolyline so that you can easily mimic the MyMaps behavior (in mashups or Mapplets) by calling enableEditing on "mouseover" and disableEditing on "mouseout". To find out when the user makes an edit, listen for the "lineupdated" event. And if you want users to be able to draw a new GPolyline completely from scratch, just use enableDrawing as shown below:
var polyline = new GPolyline([]);
map.addOverlay(polyline);
polyline.enableDrawing();
Every click on the map will add a new vertex to the polyline until the user double-clicks or clicks again on the last vertex. You can also call enableDrawing to lets users append vertices to either end of an existing polyline. And just because everyone likes pretty colors, we exposed methods to let you change the style of a polyline or polygon: setStrokeStyle and setFillStyle. Have fun, and let us know what you think in the forum.







