diff --git a/server/lib/python/cartodb_services/cartodb_services/mapzen/routing.py b/server/lib/python/cartodb_services/cartodb_services/mapzen/routing.py index 2b08d46..be9aaff 100644 --- a/server/lib/python/cartodb_services/cartodb_services/mapzen/routing.py +++ b/server/lib/python/cartodb_services/cartodb_services/mapzen/routing.py @@ -1,10 +1,9 @@ import requests import json import re -from polyline.codec import PolylineCodec from exceptions import WrongParams -from cartodb_services.tools import Coordinate +from cartodb_services.tools import Coordinate, PolyLine class MapzenRouting: @@ -74,7 +73,7 @@ class MapzenRouting: try: parsed_json_response = json.loads(response) legs = parsed_json_response['trip']['legs'][0] - shape = PolylineCodec().decode(legs['shape']) + shape = PolyLine().decode(legs['shape']) length = legs['summary']['length'] duration = legs['summary']['time'] routing_response = MapzenRoutingResponse(shape, length, duration) diff --git a/server/lib/python/cartodb_services/requirements.txt b/server/lib/python/cartodb_services/requirements.txt index 1363d69..17e41c8 100644 --- a/server/lib/python/cartodb_services/requirements.txt +++ b/server/lib/python/cartodb_services/requirements.txt @@ -5,7 +5,6 @@ python-dateutil==2.2 googlemaps==2.4.2 # Dependency for googlemaps package requests<=2.9.1 -polyline==1.1 # Test mock==1.3.0 diff --git a/server/lib/python/cartodb_services/setup.py b/server/lib/python/cartodb_services/setup.py index 408f147..550bfbd 100644 --- a/server/lib/python/cartodb_services/setup.py +++ b/server/lib/python/cartodb_services/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages setup( name='cartodb_services', - version='0.3.0', + version='0.3.1', description='CartoDB Services API Python Library',