Whats Nearby is a small extension that adds geolocation (HTML5) detection information
to templates in order for #ask
distance queries to generate adaptive content.
This extension can be used to:
detectLocation
,
watchLocation
)@@radius
) from a page view that rely on static coordinates#ask
listsPrivacy: This extension makes actively use of the HTML5 geolocation feature in case the
nolocation
parameter is not used.
The recommended way to install WhatsNearby is by using Composer with
an entry in MediaWiki's composer.json
.
{
"require": {
"mediawiki/whats-nearby": "~1.0"
}
}
composer require mediawiki/whats-nearby:~1.0
Add a #nearby
parser function to a page where the content is expected to be
displayed for a geolocation.
{{#nearby:
|querytemplate=Local libraries,Point of interest
|coordinates=47° 37' 13.9368'' N,122° 20' 56.8860'' W
|radius=300 m
|interval=450
|max=10000
|format=googlemaps
|detectLocation=true
|watchLocation=false
|localCache=300
|controls=slider
|class=extra-nearby-location
}}
Detailed information about the #nearby
parser function and how to make use of templates
can be found here.
If you want to contribute work to the project please subscribe to the developers mailing list and have a look at the contribution guideline.
This extension provides unit and integration tests that are run by a continues integration platform
but can also be executed using composer phpunit
from the extension base directory.