Since the 0.3.4 release of both Maps and Semantic Maps, I’ve been putting the little free time I have to use by working on the to-do’s for the next release. Originally this would have been 0.3.5, but I’ve added several things to it, that made me decide to make it 0.4 recently, since it involved some relatively big changes for the users. Here are a few of the most noteworthy changes that are planned for 0.4. Some of them are already completed, while still have to start on the others. For a list of changes I’ve made since 0.3.4, view revisions 57704, 57585 and 56614 (newest first).
New Features
- A new display_map parser function. This will enable you to simply display a map without any coordinates indicated on it. Since none of the marker related code will be used, this will be a more efficient and clean way of displaying maps. The main reason I’m implementing this is cause it’s a requirement for getting Maps suitable for Wikimedia Foundation usage.
- An OSM mapping service, which uses OL, but only allows OSM layers and is optimized for OSM. This is an other to-do that got prioritized by the WF usage requirements.
- Parsing of marker-specific title and label values. I actually marked the lack of this feature a bug a while ago, which I changed at the point where I remembered I simply did not add such a thing yet, and only map-wide title and label value’s got parsed.
Refactoring
- A new hook system for the parser functions, allowing the adding or removing of additional parser function support. Each mapping service will now have one class for handling on specific parser function.
- Change the geocoding functionality into a true feature hook element, so it can be easily removed. This is not easy to do, since the geocoding functionality is currently used at various points by the parser functions. So before I can start making it a feature hook element, the parser function code will have to be restructured.
- Create service hook for the geocoding feature – separate from the mapping services hook. This will allow adding and removing support for a specific geocoding service.
- Restructure parser functions: change display_point(s) and display_address(es) to display_point(s), with auto detect to see if the provided value are coordinates or addresses. Retain display_address(es) for backward compatibility, but remove from docs.
Bug Fixes
- Fix a major bug in the initialization method causing hook code to get executed at a probably wrong moment. This bug can be the cause of some weird problems that surfaced since 0.3.3.
- Fix a rather annoying issue with size of popups in Google Maps. They did not stretch far enough vertically for large contents. I’m happy I got this fixed now, since I’ve been aware of it for quite a while now, but simply could not find a solution. Yaron pointed me to a helpful blog where a certain post set me on the right track. The solution was ridiculously simple, and one line (in the JS code) long.
After the actual release, I’ll post a complete list of changes. In any case, these changes will force me to make a heap of changes to the docs, and also to the powerpoint’s of the presentations related to Maps and SM I’m giving.
Dear me of 8 years ago: please stop adding unneeded complexity to the code. Hooks and global state do not make it more flexible and efficient. For that you want to be using dependency injection. And for the love of god, start writing tests already.