Overview

  • SERVICE DESCRIPTION

This service provides integration with the Mapbox platform through the GHUBEE interface. It enables interactive map rendering with multiple points, custom marker visualization, route display, and geocoding search capabilities for location-based services.

  • INTEGRATION SPECIFICATION
  • Service Details
Service NameMapbox Map, Mapbox Pointers, Mapbox Geocoding
Context/mapbox
/mapboxPointers/data-load
/mapbox/geocoding
DescriptionProvides endpoints to render interactive maps with multiple coordinates, display custom markers with GeoJSON features, and perform geocoding operations to search addresses and locations using Mapbox services.
Endpoint

https://hml.ghubee.com/api/mapbox

https://hml.ghubee.com/api/mapboxPointers/data-load

https://hml.ghubee.com/api/mapbox/geocoding

Environment Specificationshttps://ghubee.com/api
Protocol/TransportHTTPS
MethodPOST / GET
Representation formatJSON / HTML
Input/Output Interface or BothBoth
Data transformationNo
  • Assumption

The service must be invoked with all mandatory parameters correctly filled.

Authentication is required to access Mapbox services through GHUBEE using Bearer token.

Mapbox access token is configured internally and managed by GHUBEE system.

  • Data input

Identification of the input data for the Mapbox APIs.

FieldDescriptionFormatRequiredRemarks
Token_GhubeeAuthentication tokenAuthorization HeaderYesBearer token
Mapbox Map Endpoint (/api/mapbox)
longArray of longitude coordinatesJSON ArrayYesMust match long array length
latArray of latitude coordinatesJSON ArrayYesMust match long array length
Mapbox Pointers Endpoint (/api/mapboxPointers/data-load)
pointersGeoJSON Feature arrayJSON ArrayYesArray of Feature objects
pointers[].typeFeature typeStringYesMust be "Feature"
pointers[].geometryGeometry objectJSON ObjectYesPoint geometry
pointers[].geometry.typeGeometry typeStringYesMust be "Point"
pointers[].geometry.coordinatesPoint coordinatesArrayYes[longitude, latitude]
pointers[].propertiesFeature propertiesJSON ObjectYesMetadata for the point
pointers[].properties.titlePoint titleStringNoDisplay name
pointers[].properties.descriptionPoint descriptionStringNoAdditional information
custom_markerCustom marker image URLString (URL)NoOptional marker icon
Mapbox Geocoding Endpoint (/api/mapbox/geocoding)
searchTextAddress or location search queryQuery ParameterYesURL-encoded address string
  • Data input example

Mapbox Map:

POST https://hml.ghubee.com/api/mapbox
Authorization: Bearer token_ghubee
Content-Type: application/json
{  
  "long": [  
    -46.6333,  
    -46.6555,  
    -46.6777,  
    -46.7000  
  ],  
  "lat": [  
    -23.5505,  
    -23.5615,  
    -23.5725,  
    -23.5835  
  ]  
  }

Mapbox Pointers:

POST https://hml.ghubee.com/api/mapboxPointers/data-load
Authorization: Bearer token_ghubee
Content-Type: application/json
{  
  "pointers": \[  
    {  
      "type": "Feature",  
      "geometry": {  
        "type": "Point",  
        "coordinates": [-46.6333, -23.5505]  
      },  
      "properties": {  
        "title": "MASP",  
        "description": "Museu de Arte de São Paulo"  
      }  
    },  
    {  
      "type": "Feature",  
      "geometry": {  
        "type": "Point",  
        "coordinates": [-46.6555, -23.5615]  
      },  
      "properties": {  
        "title": "Parque Ibirapuera",  
        "description": "Principal parque da cidade"  
      }  
    }  
  ],  
  "custom_marker": ""  
    }

Mapbox Geocoding:

GET https://hml.ghubee.com/api/mapbox/geocoding?searchText=1440%20Monroe%20St%2C%20Madison%2C%20WI%2053711
Authorization: Bearer token_ghubee
Accept: application/json
  • Data output

Return of Mapbox API output data.

FieldDescriptionFormatRequiredRemarks
Mapbox Map & Pointers Output
HTML ResponseRendered interactive mapHTMLYesMap with markers/points
Mapbox Geocoding Output
statusResponse statusStringYesSuccess / Error
messageResponse messageStringYesStatus description
dataGeocoding results containerObjectYesGeoJSON FeatureCollection
data.typeCollection typeStringYesAlways "FeatureCollection"
data.queryParsed search queryArrayYesTokenized search terms
data.featuresArray of location resultsArrayYesMatching locations
features[].idUnique feature identifierStringYesMapbox feature ID
features[].typeFeature typeStringYesAlways "Feature"
features[].place_typeLocation typeArrayYesaddress, place, postcode, etc.
features[].relevanceSearch relevance scoreDecimalYes0.0 to 1.0
features[].propertiesFeature metadataObjectYesMapbox ID, accuracy, etc.
features[].textPrimary location nameStringYesStreet name or place name
features[].place_nameFull formatted addressStringYesComplete address string
features[].centerGeographic center coordinatesArrayYes[longitude, latitude]
features[].geometryGeoJSON geometryObjectYesPoint geometry data
features[].geometry.typeGeometry typeStringYesAlways "Point"
features[].geometry.coordinatesPoint coordinatesArrayYes[longitude, latitude]
features[].addressStreet address numberStringConditionalIf place_type is "address"
features[].contextHierarchical contextArrayYesPostcode, place, region, country
features[].bboxBounding box coordinatesArrayConditional[minLon, minLat, maxLon, maxLat]
data.attributionMapbox attribution noticeStringYesCopyright and terms of service

  

  • Error messages

 Identification and description of error message types.

SituationMessage CodeMessage description
Unauthenticated{ "erro": true, "msg": "Unauthenticated" }Authentication error with GHUBEE. Bearer token missing or invalid.
Unauthorized{ "erro": true, "msg": "Unauthorized" }User does not have permission to access this service.
No coordinates found{ "erro": true, "msg": "No coordinates found." }Required latitude/longitude arrays missing or not in array format.
Coordinate mismatch{ "erro": true, "msg": "Enter an equal number of latitudes and longitudes." }Array length mismatch between lat and long parameters.
Insufficient balance{ "message": "Insufficient balance to consume the API, please access your account and add credit." }Account balance insufficient to make API calls.
Mapbox API Error{ "status": "Error", "message": "cURL error: [error details]" }Communication error with Mapbox API.
Geocoding Error{ "status": "Error", "message": "[error message]" }Error during geocoding operation or invalid search text.