The official, type-safe TypeScript SDK for Cercalia web services. Built by Nexus Geographics, this SDK enables you to integrate powerful location-based features like geocoding, routing, and POI search into your Node.js and browser applications.
Cercalia is a comprehensive SaaS geospatial platform developed by Nexus Geographics, a leading company in geospatial technology and innovation. Cercalia provides enterprise-grade mapping, geocoding, routing, and location intelligence services, with exceptional coverage of European markets and advanced spatial analysis capabilities.
Trusted by leading enterprises across logistics, emergency services, fleet management, and smart city solutions, Cercalia delivers the precision and reliability that mission-critical applications demand.
Learn More:
any types, full IntelliSense supportnpm install @cercalia/sdk
# or
yarn add @cercalia/sdk
# or
pnpm add @cercalia/sdk
Register for a free Cercalia account and obtain your API key:
π Register here
import { setConfig, GeocodingService, RoutingService } from '@cercalia/cercalia-sdk';
// Configure the SDK
setConfig({
cercalia: {
apiKey: 'YOUR_API_KEY_HERE',
baseUrl: 'https://lb.cercalia.com/services/v2/json'
}
});
// Geocode an address
const geocoding = new GeocodingService();
const locations = await geocoding.geocode({
street: 'Paseo de la Castellana, 1',
locality: 'Madrid',
countryCode: 'ESP'
});
console.log(`Found: ${locations[0].name}`);
console.log(`Coordinates: ${locations[0].coord.lat}, ${locations[0].coord.lng}`);
// Calculate a route
const routing = new RoutingService();
const route = await routing.calculateRoute(
locations[0].coord,
{ lat: 41.387015, lng: 2.170047 } // Barcelona
);
console.log(`Distance: ${(route.distance / 1000).toFixed(2)} km`);
console.log(`Duration: ${(route.duration / 60).toFixed(0)} minutes`);
Security Note: Never expose your API key in client-side code for production applications. Use environment variables or a backend proxy to authenticate requests.
| Service | Description | Class |
|---|---|---|
| Geocoding | Convert addresses to geographic coordinates | GeocodingService |
| Reverse Geocoding | Get addresses from coordinates | ReverseGeocodingService |
| Routing | Calculate optimal routes with turn-by-turn directions | RoutingService |
| Suggest | Autocomplete and place search suggestions | SuggestService |
| POI Search | Find Points of Interest near locations | POIService |
| Isochrones | Calculate reachability areas (drive time/distance) | IsochroneService |
| Proximity | Distance calculations and nearest neighbor search | ProximityService |
| Geofencing | Point-in-polygon and spatial boundary operations | GeofencingService |
| Static Maps | Generate static map images | StaticMapsService |
| Snap to Road | Match GPS traces to road network | SnapToRoadService |
| Geoment | Geographic element queries and geometries | GeomentService |
examples/ directory for runnable code samplesNeed help or have questions?
This SDK is provided for use with Cercalia web services. Please refer to your Cercalia service agreement for terms of use.
Built with β€οΈ by Nexus Geographics
www.cercalia.com β’
Twitter β’
LinkedIn