refactors zoom extent restricting a bit. Also, adds WMS support. Adds check for map extent being not null to publishPosition method when spatial_querying is enabled.