PHPackages                             joomla/openstreetmap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. joomla/openstreetmap

AbandonedArchivedJoomla-package[Framework](/categories/framework)

joomla/openstreetmap
====================

Joomla OpenStreetMap Package

1.1.0(7y ago)41285GPL-2.0-or-laterPHPPHP ^5.3.10|~7.0CI failing

Since May 21Pushed 4y ago16 watchersCompare

[ Source](https://github.com/joomla-framework/openstreetmap-api)[ Packagist](https://packagist.org/packages/joomla/openstreetmap)[ Docs](https://github.com/joomla-framework/openstreetmap-api)[ RSS](/packages/joomla-openstreetmap/feed)WikiDiscussions 2.0-dev Synced 3d ago

READMEChangelogDependencies (7)Versions (4)Used By (0)

The OpenStreetMap Package [![Build Status](https://camo.githubusercontent.com/f98e129e7fb67d60e1a10e81e8d7d8b9ca118bf2abfcdba701b28db048359802/68747470733a2f2f7472617669732d63692e6f72672f6a6f6f6d6c612d6672616d65776f726b2f6f70656e7374726565746d61702d6170692e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/joomla-framework/openstreetmap-api)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#the-openstreetmap-package-)

### Deprecated

[](#deprecated)

The `joomla/openstreetmap` package is deprecated with no further updates planned.

### Using the OpenStreetMap Package

[](#using-the-openstreetmap-package)

The intention of the OpenStreetMap package is to provide an easy straightforward interface to work with OpenStreetMap. This is based on version 0.6 of the OpenStreetMap API. You can find more information about the OpenStreetMap API at [https://wiki.openstreetmap.org/wiki/API\_v0.6](https://wiki.openstreetmap.org/wiki/API_v0.6). The OpenStreetMap package is built upon the `Joomla\OAuth1` package which provides OAuth 1.0 security infrastructure for the communications. The `Joomla\Http` package is also used as an easy way for the non-secure information exchanges.

### Initiating the OpenStreetMap class

[](#initiating-the-openstreetmap-class)

Initiating OpenStreetMap is just a couple lines of code:

```
use Joomla\OpenStreetMap\OpenStreetMap;

$osm = new OpenStreetMap;
```

This creates basic OpenStreetMap object which can access publically available GET methods. But when you want to send data or get private data, you need to use the `Joomla\OpenStreetMap\OAuth` object too.

To initialise the `Joomla\OpenStreetMap\OAuth` object, you must supply an options array, a `Joomla\Http\Http` instance for HTTP requests, a `Joomla\Input\Input` instance to process request data from OAuth requests, and a `Joomla\Application\AbstractWebApplication` instance to handle OAuth requests.

```
use Joomla\Http\Http;
use Joomla\OpenStreetMap\OAuth;
use Joomla\OpenStreetMap\OpenStreetMap;

$key    = 'your_key';
$secret = 'your_secret';

$options = array('consumer_key' => $key, 'consumer_secret' => $secret, 'sendheaders' => true);

$client = new Http;

$application = $this->getApplication();

$oauth = new OAuth($options, $client, $application->input, $application);
$oauth->authenticate();

$osm = new OpenStreetMap($oauth);
```

To obtain a key and secret, you have to obtain an account at OpenStreetMap. Through your account you need to [register](https://www.openstreetmap.org/user/username/oauth_clients/new) your application along with a callback URL.

### Accessing OpenStreetMap API

[](#accessing-openstreetmap-api)

This API will do all types of interactions with OpenStreetMap API. This has been categorized in to 5 main sections: Changeset, Element, GPS, Info and User. All those inherit from `Joomla\OpenStreetMap\OpenStreetMapObject` and can be initiated through the magic `__get` method of the OpenStreetMap class. Methods contained in each type of object are closely related to the OpenStreetMap API calls.

### General Usage

[](#general-usage)

For an example, to get an element with a known identifier you need to just add following two lines additionally after creating `$osm` .

```
$element = $osm->elements;
$result = $element->readElement('node', 123);

// To view the \SimpleXMLElement object
print_r($result);
```

For sending information to server you must use OAuth authentication. Following is a complete sample application of creating a new changeset. Later you can use your own changeset to add elements you want.

```
use Joomla\Http\Http;
use Joomla\OpenStreetMap\OAuth;
use Joomla\OpenStreetMap\OpenStreetMap;

$key    = 'your_key';
$secret = 'your_secret';

$options = array('consumer_key' => $key, 'consumer_secret' => $secret, 'sendheaders' => true);

$client = new Http;

$application = $this->getApplication();

$oauth = new OAuth($options, $client, $application->input, $application);
$oauth->authenticate();

$osm = new OpenStreetMap($oauth);

$changeset = $osm->changesets;

$changesets = array(
	'comment'    => 'My First Changeset',
	'created_by' => 'JoomlaOpenStreetMap'
);

$result = $changeset->createChangeset($changesets);

// Returned value contains the identifier of new changeset
print_r($result);
```

### More Information

[](#more-information)

Following resources contain more information: [OpenStreetMap API](https://wiki.openstreetmap.org/wiki/API)

### Installation via Composer

[](#installation-via-composer)

Add `"joomla/openstreetmap": "2.0.*@dev"` to the require block in your composer.json and then run `composer install`.

```
{
	"require": {
		"joomla/openstreetmap": "2.0.*@dev"
	}
}
```

Alternatively, you can simply run the following from the command line:

```
composer require joomla/openstreetmap "2.0.*@dev"
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 85.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1464 days

Total

2

Last Release

2911d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.3.10

1.1.0PHP ^5.3.10|~7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/305a2164440014dcef9ac681c139fe5e8a1ce1d7a8c3b3cfb828497729a4c70e?d=identicon)[wilsonge](/maintainers/wilsonge)

![](https://www.gravatar.com/avatar/875ac11cae02f9a855c88ee1db2f654b87cea1211c109c700748dce7d54e594f?d=identicon)[release-joomla](/maintainers/release-joomla)

---

Top Contributors

[![mbabker](https://avatars.githubusercontent.com/u/368545?v=4)](https://github.com/mbabker "mbabker (41 commits)")[![Buddhima](https://avatars.githubusercontent.com/u/1543384?v=4)](https://github.com/Buddhima "Buddhima (2 commits)")[![wilsonge](https://avatars.githubusercontent.com/u/1986000?v=4)](https://github.com/wilsonge "wilsonge (2 commits)")[![grischard](https://avatars.githubusercontent.com/u/1556567?v=4)](https://github.com/grischard "grischard (1 commits)")[![nibra](https://avatars.githubusercontent.com/u/827605?v=4)](https://github.com/nibra "nibra (1 commits)")[![PhilETaylor](https://avatars.githubusercontent.com/u/400092?v=4)](https://github.com/PhilETaylor "PhilETaylor (1 commits)")

---

Tags

joomlajoomla-frameworkopenstreetmapphpframeworkjoomlaOpenStreetMap

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/joomla-openstreetmap/health.svg)

```
[![Health](https://phpackages.com/badges/joomla-openstreetmap/health.svg)](https://phpackages.com/packages/joomla-openstreetmap)
```

###  Alternatives

[joomla/oauth2

Joomla OAuth2 Package

10303.1k2](/packages/joomla-oauth2)[joomla/github

Joomla Github Package

2863.3k2](/packages/joomla-github)[joomla/filter

Joomla Filter Package

151.4M8](/packages/joomla-filter)[joomla/application

Joomla Application Package

23404.8k11](/packages/joomla-application)[joomla/http

Joomla HTTP Package

17674.4k12](/packages/joomla-http)[joomla/registry

Joomla Registry Package

16468.6k20](/packages/joomla-registry)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
