News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

OpenShift Blog:
Open Source Mapping with PHP and MongoDB
November 06, 2013 @ 13:47:38

On the OpenShift blog Ryan Jarvinen has a new tutorial showing you how to use MongoDB and Silex to create a basic mapping service. It takes advantage of the MongoDB spatial data and query functionality to help locate and map items from the dataset.

Whether your goals are civic-minded or otherwise, PHP can help you craft solutions that are every bit as simple and elegant as what you might expect to see from modern Python, Ruby, or JavaScript frameworks. This particular example is intended to serve as a reusable template for folks who are interested in producing their own mapping applications - substituting in their own collection of map points or other spatial data.

He starts with a look at the datastore - the MongoDB - and the kind of data it will contain. He's shared the dataset (and complete example code too) over on Github and includes the command to import it. He then starts in on the PHP side of things, showing you how to get Silex installed and add in some basic routes and CSS. He then uses the Leaflet.js library to import the data and drop it into an Openstreetmap-based map. The full code and data can be found in this repository over on Github.

0 comments voice your opinion now!
mapping mongodb leafletjs tutorial openstreetmap

Link: https://www.openshift.com/blogs/open-source-mapping-with-php-and-mongodb

blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Search Engine Friendly Websites with the Zend Framework

The Shadow Fox Network: Create Dynamic URLs With Mod_Rewrite and PHP Functions

Nefarious Designs: Object-Oriented PHP Part 1: Definition

Gonzalo Ayuso: Enqueue Symfony’s process components with PHP and ZeroMQ

PHPBuilder.com: Using XML, Part 5 - SOAP and WSDL


Community Events

Don't see your event here?
Let us know!


php7 release framework extension wordpress language list version introduction laravel5 interview laravel api library community opinion voicesoftheelephpant podcast unittest series

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework