Like promised in my previous post about Maps and Semantic Maps 0.3, I’ll give you an overview of the most important new features in this new release.
Multi location parser functions
Two completely new parser functions have been added that allow the displaying of multiple points on a map. To avoid confusion, this is a feature in Maps, and has nothing to do with the semantic coordinate aggregation of Semantic Maps, which obviously already has multi coordinate capabilities. The new parser functions are display_points and display_addresses, acting as multi coordinate variants of display_point and display_address, respectively. This feature adds endless new usage options for Maps, from marking the locations you’ve been on holiday to, to a list of restaurants in a city. It will also be extremely useful to use together with the upcoming custom base layers and overlays feature for OpenLayers. An example of such usage is displaying markers with some pop-up contents on an anatomy chart. Note that a form input will likely be added to Semantic Maps to simplify such a task, by making the need to manually find and enter all coordinates obsolete.
Separate title and label for each point
This feature could actually be viewed as part of the multi location parser functions, but I like to keep them separate. Since 0.2, Maps allows you to optionally display a title and label together with the marker representing the provided coordinates or address. Logically, this should be extended to encompass multiple locations when you can put more then one on a single map. This feature has not been implemented yet, cause of some uncertainty about the correct wiki syntax. The current idea is to use something like #display_points:points=55.7557860, 37.6176330~title~label; 1,1~title; 12,34. Such a syntax’s would not allow any ‘;’ or ‘~’ to be displayed into the pop-up.
Configurable map types
In Maps 0.2, an improvement causing the ‘physical’ map type, for Google Maps, to be displayed in the map type control when this map type was set as default was made. This caused me to wonder why the whole control was not made configurable, so that users could specify the map types they want, and the order in which they want them. This is exactly what I’ve done in Maps 0.3, for both Google Maps and Yahoo! Maps. The user can now set the map types present in the map type control with the types parameter. When not set, types will be set to the (new) setting holding the default types for the relevant service. The parameter type does still precisely the same, with the addition that the provided value will be added to types when it’s not present in it yet.
While adding this new feature, I also had a close look at the available map types in the latest (sub)version of the Google Maps v2 API. It turned out to be really easy to add support for moon, Mars and sky maps (all 2D). The underneath screenshot shows a map with all the available map types for Google Maps in Maps 0.3. It also demonstrates the new multi location functionality.
The two interesting parameters in the wiki code that is responsible for this map are:
- addresses=Moscow, Russia; New York; London – This is the replacement of address in display_address.
- types=normal,satellite,hybrid,physical,earth,moon,mars,mars-elevation,mars-infrared,sky – The new types parameter that allows users to choose the available map types.
This change now makes both Google Maps and Yahoo! Maps usage more similar to the one of OpenLayers, with the difference that with OpenLayers, types is called layers, and type is called baselayer (althoguh the baselayer is not activated cause of some problems with it).
More to come
Several more new features will be added, and I still have some refactoring to-do’s on my list to tackle before the 0.3 release. I’ll post about those issues as soon as I have more news about them. The new release is coming closer and closer – I estimate it’ll be there in less then a week 🙂
Here you have my latest committed changes for both Maps and Semantic Maps.
wow, that’s cool man… i guess… xD