distance query: buggy behavior in SM 1.0.5 (& 1.1a)
Revisited this topic today: I thought that the cause was that the wiki query was not being generated correctly since 'format=debug' did not print it correctly. However, the underlying issue seems to be that a map (at least a SMW query map) cannot be displayed on the same page as a Form Input map (as would happen from within Special:RunQuery).
In my example, I am asking for coordinates to be input from query form. The query form's template is running a distance query and displaying the map. When the response is returned, the form input map at the bottom displays fine; however, the expected map containing the distance query is not. Browser inspection shows that there is a ReferenceError to 'mwmaps' (possibly resource namespace is not resolving).
I have confirmed buggy behavior on Referata scratchpad wiki and mimicked on: