Skip to content

Commit c3d09a4

Browse files
committed
feat(tiles): Better lf-tiles documentation
1 parent a8697f1 commit c3d09a4

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

doc/lf-maxbounds.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
This sub-directive needs the **leaflet** main directive, so it is normally used as an attribute of the *leaflet* tag, like this:
55

66
```
7-
<leaflet maxbounds="maxbounds"></leaflet>
7+
<leaflet lf-maxbounds="maxbounds"></leaflet>
88
```
99

1010
The functionality will be to limit the panning of the rendered map to the bounds set inside the _maxbounds_ object. It's not a bidirectional relationship, only the changes made to our _maxbounds_ object on the controller scope will affect the map, but no vice versa.

doc/lf-tiles.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
'tiles' Attribute Documentation
2-
===================================
1+
'lf-tiles' Documentation
2+
========================
33

44
This sub-directive needs the **leaflet** main directive, so it is normally used as an attribute of the *leaflet* tag, like this:
55

66
```
7-
<leaflet tiles="tiles"></leaflet>
7+
&lt;leaflet lf-tiles="tiles">&lt;/leaflet>
88
```
99

10-
It will map an object _tiles_ of our controller scope with the corresponding object on our leaflet directive isolated scope. It's not a bidirectional relationship, only the changes made to our _tiles_ object on the controller scope will affect the map, but no vice versa.
10+
We will use this object to set the basic tiles of our map. If you need more complex functionality you need to take a look at the _lf-layers_ sub-directive. It's not a bi-directional object. Changes to the scope object will affect the map tiles rendered on screen.
11+
12+
Take a look first at the [leaflet tilelayer API call](http://leafletjs.com/reference.html#tilelayer) if you don't know nothing about it, but let's see its basic properties.
1113

12-
This object is basically composed of two attributes: **url** and **options**. Let's see them in an example definition:
1314
```
1415
$scope.tiles = {
1516
url: "http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png",
@@ -19,10 +20,9 @@ $scope.tiles = {
1920
}
2021
```
2122

22-
The options passed to this object could have a lot of attributes, and are the same passed to the leaflet tile object, documented [here](http://leafletjs.com/reference.html#tilelayer-options).
23-
23+
The options passed to this object can be set with a lot of attributes, and are the same passed to the leaflet tile object, documented [here](http://leafletjs.com/reference.html#tilelayer-options).
2424

25-
And that's all, we can see how the map is affected when we change the _tiles_ scope object values, like these examples:
25+
And that's all, we can see how the map is affected when we change the _tiles_ scope object values in these examples:
2626

27-
* [tiles-example.html](http://tombatossals.github.io/angular-leaflet-directive/examples/tiles-example.html).
28-
* [tiles-zoom-changer-example.html](http://tombatossals.github.io/angular-leaflet-directive/examples/tiles-zoom-changer-example.html).
27+
* [Tiles basic example](http://tombatossals.github.io/angular-leaflet-directive/examples/0107-basic-tiles-example.html).
28+
* [Change tiles with zoom example](http://tombatossals.github.io/angular-leaflet-directive/examples/0108-basic-tiles-zoom-changer-example.html).

0 commit comments

Comments
 (0)