This repository has been archived by the owner on Sep 12, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from umap-project/tms
Add TileLayer.tms
- Loading branch information
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11 on 2017-04-26 12:58 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('leaflet_storage', '0003_auto_20160910_0624'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='tilelayer', | ||
name='tms', | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import pytest | ||
|
||
from .base import TileLayerFactory | ||
|
||
pytestmark = pytest.mark.django_db | ||
|
||
|
||
def test_tilelayer_json(): | ||
tilelayer = TileLayerFactory(attribution='Attribution', maxZoom=19, | ||
minZoom=0, name='Name', rank=1, tms=True, | ||
url_template='http://{s}.x.fr/{z}/{x}/{y}') | ||
assert tilelayer.json == { | ||
'attribution': 'Attribution', | ||
'id': tilelayer.id, | ||
'maxZoom': 19, | ||
'minZoom': 0, | ||
'name': 'Name', | ||
'rank': 1, | ||
'tms': True, | ||
'url_template': 'http://{s}.x.fr/{z}/{x}/{y}' | ||
} |