Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Surface is deprecated
Browse files Browse the repository at this point in the history
The docs are hidden. The service warns when it is called.

Resolves #221
  • Loading branch information
Sean C. Gillies committed May 4, 2018
1 parent a823d77 commit 0cee35d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
8 changes: 0 additions & 8 deletions docs/api/mapbox.services.rst
Expand Up @@ -84,14 +84,6 @@ mapbox.services.static\_style module
:undoc-members:
:show-inheritance:

mapbox.services.surface module
------------------------------

.. automodule:: mapbox.services.surface
:members:
:undoc-members:
:show-inheritance:

mapbox.services.uploads module
------------------------------

Expand Down
6 changes: 1 addition & 5 deletions docs/index.rst
Expand Up @@ -47,10 +47,7 @@ Services
- Render with GeoJSON overlays
- Adjust pitch and bearing, decimal zoom levels

- **Surface V4** `examples <./docs/surface.md#surface>`__, `website <https://www.mapbox.com/developers/api/surface/>`__

- Interpolates values along lines. Useful for elevation traces.

- **Surface V4** **DEPRECATED**
- **Uploads V1** `examples <./docs/uploads.md#uploads>`__, `website <https://www.mapbox.com/api-documentation/?language=Python#uploads>`__

- Upload data to be processed and hosted by Mapbox.
Expand Down Expand Up @@ -100,7 +97,6 @@ Documentation
datasets.md
geocoding.md
matrix.md
surface.md
directions.md
input_features.md
static.md
Expand Down
9 changes: 8 additions & 1 deletion mapbox/services/surface.py
@@ -1,11 +1,14 @@
import warnings

from uritemplate import URITemplate

from mapbox.encoding import encode_waypoints, encode_polyline
from mapbox.errors import MapboxDeprecationWarning
from mapbox.services.base import Service


class Surface(Service):
"""Access to the Surface API V4"""
"""Access to the Surface API V4 **DEPRECATED**"""

api_name = 'surface'
api_version = 'v4'
Expand All @@ -25,6 +28,10 @@ def surface(self,
interpolate=None,
zoom=None):

warnings.warn(
"The surface module will be removed in the next version. "
"It has no replacement.", MapboxDeprecationWarning)

params = {
'layer': layer,
'fields': ','.join(fields),
Expand Down

0 comments on commit 0cee35d

Please sign in to comment.