Address search and maps with @vexpay/maps
VEX Maps: address search, reverse lookup, Colombian grid addresses, maps and a delivery location picker for Venezuela and Colombia, on open data. No Google Maps or Mapbox key.
What it does
- Search streets, neighbourhoods, buildings, banks and pharmacies, typo-tolerant, in Venezuela (
ve) and Colombia (co). - Colombian grid addresses such as
Calle 72 # 10-34orCra 7 con 72. - Reverse lookup: a point → municipality, neighbourhood, nearest street and place, and whether it is inside your delivery area.
- Maps and a location picker: search, then move the map so the pin sits on the door, then confirm. The
VEX Maps · © OpenStreetMapsignature always shows.
See it live, and the coverage per country, at vexpay.app/maps.
Keys
VEX Maps keys are separate from your VEX Pay API keys. You get one publishable and one secret key per product.
| Key | Prefix | Where | Can call |
|---|---|---|---|
| Publishable | vexmap_pk_… | The browser, from your allowed origins only | search, reverse |
| Secret | vexmap_sk_… | Your server only | Everything, including countries |
The SDK refuses a secret key in a browser. Put only the publishable key in client code.
Request an API key
- Message us on WhatsApp
Request a VEX Maps key on WhatsApp%3A%20%0ASitios%20web%20que%20usar%C3%A1n%20el%20mapa%3A%20%0AQu%C3%A9%20necesito%20(b%C3%BAsqueda%2C%20mapa%2C%20selector%20de%20ubicaci%C3%B3n)%3A%20) (+58 414 933 3844). The message opens filled in; complete the blanks.
- Tell us what we need
Your product or company, the countries (
ve,coor both), the website origins that will show the map (for examplehttps://www.example.com), and what you need: search, a map or the location picker. - Receive your keys
We send the publishable key (
vexmap_pk_…, locked to your origins) and the secret key (vexmap_sk_…, server only). Each is shown once: store it in your environment, never in the repository.
You can also start from vexpay.app/maps and its “Pide tu clave API” button.
Install
npm install @vexpay/maps maplibre-glmaplibre-gl is only needed for the map and the picker. React is optional: the React components come from @vexpay/maps/react.
Examples
import 'maplibre-gl/dist/maplibre-gl.css';
import { useVexMaps, LocationPicker } from '@vexpay/maps/react';
export function DeliveryPin({ onPoint }) {
const vexmaps = useVexMaps({ key: process.env.NEXT_PUBLIC_VEX_MAPS_KEY, country: 've' });
return (
<LocationPicker
client={vexmaps}
style={{ height: 420 }}
onConfirm={({ point, reverse }) => onPoint(point, reverse)}
onUnavailable={() => onPoint(null)} // fall back to typed address fields
/>
);
}import { createVexMaps } from '@vexpay/maps';
const vexmaps = createVexMaps({ key: process.env.VEX_MAPS_SECRET_KEY, country: 've' });
const { results } = await vexmaps.search('castellana');
const place = await vexmaps.reverse({ lat: 10.5013, lng: -66.8523 });
// place.admin.level2 → "Chacao", place.street?.label, place.inServiceArea (when you have a service area)<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@5/dist/maplibre-gl.css">
<script src="https://unpkg.com/maplibre-gl@5/dist/maplibre-gl.js"></script>
<script src="https://unpkg.com/@vexpay/maps@0.1/dist/vexmaps.global.js"></script>
<div id="picker" style="height:420px"></div>
<script>
const client = VexMaps.createVexMaps({ key: 'vexmap_pk_…', country: 've' });
VexMaps.mountLocationPicker(document.getElementById('picker'), { client })
.on('confirm', ({ point }) => console.log(point));
</script>curl --request POST "https://maps.chuventures.com/v1/search" \
--header "Authorization: Bearer $VEX_MAPS_SECRET_KEY" \
--header "Content-Type: application/json" \
--data '{"text":"Calle 72 # 10-34, Bogotá","country":"co"}'Calls time out after 2 seconds with an unavailable error. When that happens, show typed address fields and carry on; a pin is a bonus, not a requirement.
Reference
| Item | Value |
|---|---|
| API | https://maps.chuventures.com (POST /v1/search, POST /v1/reverse, GET /v1/countries) |
| Map style | https://tiles.chuventures.com/style.json (MapLibre) |
| Countries | ve, co |
| Limits | Secret key 60 requests/min; publishable key 600/min, and 30/min per visitor. Over the limit: 429 rate_limited with Retry-After. |
| Errors | invalid_api_key (401), origin_not_allowed (403), country_not_allowed (403), point_outside_country (400), rate_limited (429) |
| Package | @vexpay/maps on npm, MIT |
Data: OpenStreetMap (ODbL), Overture Maps, GeoNames and Colombian official data. Keep the attribution visible on any map you show. Search text and points are never stored in logs.