by piconasha · v0.0.1
Connect to Amap Open Platform for IP geolocation queries and walking route planning.
This community listing does not yet include every recommended support, privacy, pricing, and permission disclosure. Review the available package permissions before installing.
Available inside your emploidai workspace after installation.
Available inside your emploidai workspace after installation.
Author: Piconasha
Type: Tool Plugin
Version: 0.0.1
This plugin connects Dify to the Amap Open Platform, enabling AI applications to perform IP geolocation queries and walking route planning within China.
Query the geographical location of an IPv4 address (China only).
Use Cases:
Plan walking routes between two coordinate points.
Use Cases:
Clone this repository:
git clone https://github.com/piconasha/dify-plugin-amap.git
cd dify-plugin-amap
Package the plugin:
dify plugin package
Upload the .difypkg file to your Dify instance
Tool Name: ip-query
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| ipv4_address | string | No | IPv4 address (e.g., 114.114.114.114). Leave empty to query requester's IP. |
Example:
Query: "Where is IP 114.114.114.114 located?"
Result: "IP 114.114.114.114 location: Jiangsu Nanjing"
Tool Name: direction_v2-walking
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| starting_point | string | Yes | Starting coordinates (longitude,latitude), e.g., 116.397428,39.90923 |
| ending_point | string | Yes | Destination coordinates (longitude,latitude), e.g., 116.481028,39.989643 |
Example:
Query: "Plan a walking route from Beijing Tiananmen (116.397428,39.90923) to Beijing Railway Station (116.427093,39.903738)"
Result:
Walking Route Planning Result
━━━━━━━━━━━━━━━━━━━━
Total Distance: 2.85 km (2850 m)
Estimated Time: 38 minutes
━━━━━━━━━━━━━━━━━━━━
Detailed Directions:
1. Walk 200m north along East Chang'an Avenue...
2. Turn right and walk 150m east...
...
This plugin uses the following Amap APIs:
| API | Endpoint | Documentation |
|---|---|---|
| IP Location | /v3/ip | API Docs |
| Walking Route | /v5/direction/walking | API Docs |
This plugin sends the following data to Amap servers:
For details, see PRIVACY.md.
# Install dependencies
pip install -r requirements.txt
# Run locally
dify plugin dev
dify-plugin-amap/
├── manifest.yaml # Plugin manifest
├── provider/
│ ├── amap.py # Provider implementation
│ └── amap.yaml # Provider configuration
├── tools/
│ ├── ip/
│ │ ├── query.py # IP query tool
│ │ └── query.yaml # IP query configuration
│ └── direction_v2/
│ ├── walking.py # Walking route tool
│ └── walking.yaml # Walking route configuration
├── _assets/
│ ├── icon.svg # Light mode icon
│ └── icon-dark.svg # Dark mode icon
├── README.md # English documentation
├── readme/
│ └── README_zh_Hans.md # Chinese documentation
└── PRIVACY.md # Privacy policy
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under the MIT License - see the LICENSE file for details.