Semantic Maps – Google Maps query printer

Here you have a small summary of what I worked on today.

I started with improving some of the JavaScript created in the Google Maps query printer. The centre and zoom of the map are now calculated client-side via the Google Maps API instead of server-side via PHP code in the extension itself. After this I added some new functionality to the Query Printer that was not present yet. I added the properties type (map type), control (map control) and autozoom. Sounds familiar? Haven’t I done this before? I thought so yes, and therefore rewrote some code in Maps to be able to use the same data and functions in Semantic Maps. Following the same principle I also rewrote the mechanism that was responsible for the assignment of default map parameters in the QP, I added one function of a couple of lines to the Maps utilities file and reduced a whole page of code to a single line in SMGoogleMaps (the QP for Google Maps).

The JS bug that annoyed me yesterday apparently only occurs when putting one or more QP generated maps and one or more parser functions generated maps on one page. This is annoying, and I’ve not been able t trace the exact cause. However, since this bug is not a priority, and probably is even present in Semantic Google Maps ATM, I’ll just ignore it until the first release of my two MediaWiki extensions.

I’m happy all this is done now. It’s the first completed peace of semantic code so far. The current code will enable me to very easily create a Query Printer for Yahoo! Maps, on which I will work tomorrow.

Here you have another example of a Google Map with the same queried data as in my last post.

Semantic Maps showing a Google Maps with queried coordinate data

{{#ask:[[Category:Locations]]|?Has coordinates|format=googlemap|width=610|height=500|autozoom=off|type=hybrid}}

1 thought on “Semantic Maps – Google Maps query printer”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.