mapnests-browser-sdk 1.0.9 → 1.0.10
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.
- package/README.md +52 -2
- package/dist/client.js +2 -0
- package/dist/modules/reverse.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ A secure and efficient TS SDK for the **Mapnests Platform**, enabling powerful g
|
|
|
37
37
|
- [Multi Stop Point](#multi-stop-point)
|
|
38
38
|
- [Detailed Geolocation Information ](#detailed-geolocation-information)
|
|
39
39
|
- [Geocode Search](#geocode-search)
|
|
40
|
+
- [Detailed Search By PlaceId ](#detailed-search-by-placeId)
|
|
40
41
|
|
|
41
42
|
- [License](#license)
|
|
42
43
|
- [Contact](#contact)
|
|
@@ -379,8 +380,6 @@ console.log(revRes);
|
|
|
379
380
|
{
|
|
380
381
|
"data": {
|
|
381
382
|
"placeId": "a4d8c105e24fbc3d91bb0486e1701fa20b9b56329df0fc5c47f7df003e3cc579",
|
|
382
|
-
"lat": 23.7952951,
|
|
383
|
-
"lon": 90.41680379038863,
|
|
384
383
|
"category": "",
|
|
385
384
|
"type": "yes",
|
|
386
385
|
"class": "building",
|
|
@@ -713,6 +712,57 @@ const geocodeRes = await client.geocode({ Query: "Mirpur" });
|
|
|
713
712
|
"status": true
|
|
714
713
|
}
|
|
715
714
|
```
|
|
715
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
716
|
+
|
|
717
|
+
### Detailed Search By PlaceId
|
|
718
|
+
|
|
719
|
+
<a name="detailed-search-by-placeId"></a>
|
|
720
|
+
|
|
721
|
+
> Provide detailed geolocation information for a place using its unique place_id, including address, coordinates, administrative regions, contact details, and metadata.
|
|
722
|
+
|
|
723
|
+
**Example Input:**
|
|
724
|
+
|
|
725
|
+
```ts
|
|
726
|
+
const detailsByPlaceId = await client.details({
|
|
727
|
+
PlaceId: "4355aad6b8eb0b4f0ee3fa972ff9ac3fdc2d7f86f634d81f79dcf396f21826a0"
|
|
728
|
+
});
|
|
729
|
+
console.log(detailsByPlaceId);
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
**Example Output:**
|
|
733
|
+
|
|
734
|
+
```json
|
|
735
|
+
{
|
|
736
|
+
"data": {
|
|
737
|
+
"placeId": "4355aad6b8eb0b4f0ee3fa972ff9ac3fdc2d7f86f634d81f79dcf396f21826a0",
|
|
738
|
+
"lat": 23.8060476,
|
|
739
|
+
"lon": 90.3744551,
|
|
740
|
+
"types": [
|
|
741
|
+
"office",
|
|
742
|
+
"office"
|
|
743
|
+
],
|
|
744
|
+
"address": "Notari Public, House# 42, Mirpur Road, Senpara Parbata, Mirpur, Dhaka-1216",
|
|
745
|
+
"name": "Mirpur",
|
|
746
|
+
"houseNumber": "42",
|
|
747
|
+
"houseName": "",
|
|
748
|
+
"street": "Mirpur Road",
|
|
749
|
+
"phone": "",
|
|
750
|
+
"website": "",
|
|
751
|
+
"country": "Bangladesh",
|
|
752
|
+
"city": "Mirpur, Dhaka",
|
|
753
|
+
"thana": "Kafrul",
|
|
754
|
+
"division": "",
|
|
755
|
+
"district": "Dhaka",
|
|
756
|
+
"postalCode": "1216",
|
|
757
|
+
"plusCode": "",
|
|
758
|
+
"sublocality": "",
|
|
759
|
+
"localArea": ""
|
|
760
|
+
},
|
|
761
|
+
"message": "Success",
|
|
762
|
+
"status": true
|
|
763
|
+
}
|
|
764
|
+
```
|
|
765
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
716
766
|
|
|
717
767
|
---
|
|
718
768
|
|
package/dist/client.js
CHANGED
|
@@ -43,6 +43,8 @@ class Client {
|
|
|
43
43
|
async reverse(request) {
|
|
44
44
|
console.log("📍 Reverse request:", request);
|
|
45
45
|
const response = await this.makeRequest("reverse", request);
|
|
46
|
+
delete response.data?.lat;
|
|
47
|
+
delete response.data?.lon;
|
|
46
48
|
console.log("📍 Reverse response:", response);
|
|
47
49
|
return response;
|
|
48
50
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mapnests-browser-sdk",
|
|
3
3
|
"description": "TypeScript SDK for Mapnests API integration (Distance Matrix, Distance Matrix Details, Geocode, Reverse Geocode)",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.10",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|