Leaflet.js & Angular.js mapping tool for finding entities based on your location.
Mundus Meus allows you to plot the locations of entities. It then allows the end user to specify their location (with optional auto-detection), and it then maps places of interest close to them.
In the example we're using Tescos. If you specify your location, the application will notify you of Tescos within close proximity to you.
The REALLY good thing about Mundus Meus is that it's written for developers to extend! It's written in beautiful OOP – PHP5 and AngularJS, and therefore is crying out to be extended in any way a developer sees fit. However, for those wanting to get started quickly, all you need to do is clone the example and style as necessary.
Mundus Meus defines two API routes:
api/Geolocate/Nottingham– Discovers the latitude/longitude for Nottingham;
api/Search/52.95385025/-1.1698803748747/10– Searches for entities around the lat/long – optional radius in miles.
Please note: the aforementioned routes require
MOD_REWRITE to be enabled –
AllowOverride also needs to be set to
All in order for the routes to resolve correctly.
- Angular.js: Utilised for the front-end example and API;
- Nominatim API: For resolving places to latitude/longitude values;
- PHP Router: Laravel inspired PHP router;
- LESS: Preprocessor for more organised stylesheets;
- Leaflet.js: For all of the mapping functionality;
Installing Mundus Meus' dependencies requires npm – running
npm install will install all dependencies as taken from the
If you wish to create a build yourself then you'll need to install Grunt.js – you can create a build by issuing the
As you're probably not wanting to map Tescos stores, Mundus Meus allows you to add your very own services very easily. Please follow the step-by-step guide:
- Create a new service class in
api/Service– call it
- Change the
$_mapproperty to map the properties from the API to
longitude, et cetera...;
- Modify the
API_URLconstant to the Halfords store location URL (database interface coming shortly);
- Implement the
_parseDatahook which allows you to parse the idiosyncratic response from the API;
Default.phpand change the
getServicemethod to the name (without prefix) of your new service –
Mundus Meus uses the template method pattern and therefore if you're overwriting methods from the abstract and then calling
super, you're doing something wrong.
You're probably wondering, so we'll spill the beans! Mundus Meus is Latin for My World. We considered calling it Meus Mundus Parvus (My Little World), but frankly, that's a little too long for comfort.