Skip to content

Commit

Permalink
README updates for 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetazzoni committed Jan 12, 2017
1 parent 18c8163 commit af865de
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,24 @@ information.
Usage
-----

Usage is very simple. Let's consider we have a Leaflet map:
Usage is very simple. First, include the Leaflet.js and Leaflet-GPX
scripts in your HTML page:

```html
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.2/leaflet.css" />
<!-- ... -->
</head>
<body>
<!-- ... -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.2/leaflet.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-gpx/1.2.0/gpx.min.js"></script>
</body>
</html>
```

Now, let's consider we have a Leaflet map:

```javascript
var map = L.map('map');
Expand All @@ -40,7 +57,7 @@ L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
}).addTo(map);
```

Displaying the GPX track is as easy as:
Displaying a GPX track on it is as easy as:

```javascript
var gpx = '...'; // URL to your GPX file or the GPX itself
Expand Down
2 changes: 1 addition & 1 deletion gpx.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Copyright (C) 2011-2012 Pavel Shramov
* Copyright (C) 2013 Maxime Petazzoni <[email protected]>
* Copyright (C) 2013-2017 Maxime Petazzoni <[email protected]>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down

0 comments on commit af865de

Please sign in to comment.