quantaroute-geocoding 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +46 -11
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # QuantaRoute Geocoding Node.js SDK
2
2
 
3
- A **revolutionary** Node.js/TypeScript library for geocoding addresses to DigiPin codes with **groundbreaking Location Lookup API** and offline processing capabilities.
3
+ A **unique** Node.js/TypeScript library for geocoding addresses to DigiPin codes or reverse with **groundbreaking Location Lookup API** and offline processing capabilities. This library is designed for India 🇮🇳!
4
4
 
5
- ## 🚀 Revolutionary Features
5
+ ## 🚀 Unique Features
6
6
 
7
7
  ### 🎯 **NEW: Location Lookup API** - *Service that even government doesn't provide!*
8
8
  - 🗺️ **Administrative Boundary Lookup**: Get state, division, locality, pincode from coordinates
@@ -34,7 +34,7 @@ npm install digipin
34
34
 
35
35
  ## Quick Start
36
36
 
37
- ### 🚀 **NEW: Revolutionary Location Lookup API**
37
+ ### 🚀 **NEW: Unique Location Lookup API**
38
38
 
39
39
  ```typescript
40
40
  import { QuantaRouteClient } from 'quantaroute-geocoding';
@@ -44,7 +44,7 @@ const client = new QuantaRouteClient({
44
44
  apiKey: 'your-api-key'
45
45
  });
46
46
 
47
- // 🚀 REVOLUTIONARY: Get administrative boundaries from coordinates
47
+ // 🚀 Unique: Get administrative boundaries from coordinates
48
48
  const result = await client.lookupLocationFromCoordinates(28.6139, 77.2090);
49
49
  console.log(`Pincode: ${result.administrative_info.pincode}`); // 110001
50
50
  console.log(`State: ${result.administrative_info.state}`); // Delhi
@@ -53,7 +53,7 @@ console.log(`Locality: ${result.administrative_info.locality}`); // Nirm
53
53
  console.log(`DigiPin: ${result.digipin}`); // 39J-438-TJC7
54
54
  console.log(`Response Time: ${result.response_time_ms}ms`); // <100ms
55
55
 
56
- // 🚀 REVOLUTIONARY: Get boundaries from DigiPin
56
+ // 🚀 Unique: Get boundaries from DigiPin
57
57
  const digipinResult = await client.lookupLocationFromDigiPin("39J-438-TJC7");
58
58
  console.log(`Pincode: ${digipinResult.administrative_info.pincode}`);
59
59
  console.log(`State: ${digipinResult.administrative_info.state}`);
@@ -108,7 +108,7 @@ const distance = processor.calculateDistance(28.6139, 77.2090, 28.6150, 77.2100)
108
108
  console.log(`Distance: ${distance.toFixed(2)} km`);
109
109
  ```
110
110
 
111
- ## 🚀 Revolutionary Location Lookup API
111
+ ## 🚀 Unique Location Lookup API
112
112
 
113
113
  ### Dedicated Location Lookup Client
114
114
 
@@ -172,7 +172,7 @@ interface LocationLookupResult {
172
172
  }
173
173
  ```
174
174
 
175
- ### Why This is Revolutionary
175
+ ### Why This is Unique?
176
176
 
177
177
  🎯 **Government-Level Precision**: Access to administrative boundaries that even government APIs don't provide at this level of detail and accessibility.
178
178
 
@@ -231,6 +231,41 @@ try {
231
231
  }
232
232
  ```
233
233
 
234
+ ## Browser Usage & CORS
235
+
236
+ ### Frontend Applications
237
+
238
+ This package works in both **Node.js** and **browser** environments. For browser usage:
239
+
240
+ ```typescript
241
+ // Works in React, Vue, Angular, vanilla JS, etc.
242
+ import { QuantaRouteClient } from 'quantaroute-geocoding';
243
+
244
+ const client = new QuantaRouteClient({
245
+ apiKey: 'your-api-key'
246
+ });
247
+
248
+ // Use in your frontend application
249
+ const handleGeocode = async () => {
250
+ try {
251
+ const result = await client.lookupLocationFromCoordinates(28.6139, 77.2090);
252
+ console.log('Location data:', result);
253
+ } catch (error) {
254
+ console.error('Geocoding error:', error);
255
+ }
256
+ };
257
+ ```
258
+
259
+ ### CORS Configuration
260
+
261
+ The QuantaRoute API server is configured to allow cross-origin requests. If you encounter CORS issues:
262
+
263
+ 1. **Check your API key**: Ensure you're using a valid API key
264
+ 2. **Verify the endpoint**: Make sure you're calling the correct API endpoints
265
+ 3. **Browser dev tools**: Check the Network tab for detailed error information
266
+
267
+ **Note**: CORS issues are server-side configuration problems, not client-side package issues.
268
+
234
269
  ## TypeScript Support
235
270
 
236
271
  This package includes full TypeScript definitions:
@@ -259,7 +294,7 @@ const result: LocationLookupResult = await client.lookupLocationFromCoordinates(
259
294
  | Paid | 100 | 10,000 | 100 |
260
295
  | Enterprise | 1,000 | Unlimited | 100 |
261
296
 
262
- ### 🚀 Revolutionary Location Lookup API
297
+ ### 🚀 Unique Location Lookup API
263
298
 
264
299
  | Tier | Requests/Minute | Monthly Limit | Batch Size | Boundaries |
265
300
  |------|----------------|---------------|------------|------------|
@@ -278,20 +313,20 @@ const result: LocationLookupResult = await client.lookupLocationFromCoordinates(
278
313
  Check out the `examples/` directory for more comprehensive examples:
279
314
 
280
315
  - `basic-usage.js` - Basic geocoding operations
281
- - `location-lookup.js` - Revolutionary Location Lookup API
316
+ - `location-lookup.js` - Unique Location Lookup API
282
317
  - `batch-processing.js` - Batch operations
283
318
  - `offline-processing.js` - Offline DigiPin operations
284
319
  - `error-handling.js` - Comprehensive error handling
285
320
 
286
321
  ## Support
287
322
 
288
- - 📧 Email: support@quantaroute.com
323
+ - 📧 Email: hello@quantaroute.com
289
324
  - 🌐 Website: https://quantaroute.com
290
325
  - 📖 Traditional API Docs: https://api.quantaroute.com/v1/digipin/docs
291
326
  - 🚀 **NEW: Location Lookup API**: https://api.quantaroute.com/v1/location
292
327
  - 📊 **Live Statistics**: https://api.quantaroute.com/v1/location/stats
293
328
 
294
- ### 🚀 What Makes This Revolutionary?
329
+ ### 🚀 What Makes This Unique?
295
330
 
296
331
  **QuantaRoute's Location Lookup API is the first and only service to provide:**
297
332
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quantaroute-geocoding",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Revolutionary Node.js SDK for QuantaRoute Geocoding API with Location Lookup and DigiPin processing",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "author": {
30
30
  "name": "QuantaRoute",
31
- "email": "support@quantaroute.com",
31
+ "email": "hello@quantaroute.com",
32
32
  "url": "https://quantaroute.com"
33
33
  },
34
34
  "license": "MIT",