https://github.com/helgasoft/amapro
R/Shiny fusion with AMap for advanced mapping
https://github.com/helgasoft/amapro
3d amap animation flyover gaode geojson interactive-visualizations layers maps r shiny wms
Last synced: about 1 month ago
JSON representation
R/Shiny fusion with AMap for advanced mapping
- Host: GitHub
- URL: https://github.com/helgasoft/amapro
- Owner: helgasoft
- License: other
- Created: 2022-07-20T02:52:21.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-10T21:08:58.000Z (about 2 years ago)
- Last Synced: 2025-02-08T16:29:49.277Z (4 months ago)
- Topics: 3d, amap, animation, flyover, gaode, geojson, interactive-visualizations, layers, maps, r, shiny, wms
- Language: R
- Homepage: https://helgasoft.github.io/amapro/
- Size: 16.9 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
#
amapro
[](https://github.com/helgasoft/amapro/actions)
[](https://github.com/helgasoft/amapro/releases/)
[](https://helgasoft.github.io/amapro)A thin R wrapper around Javascript library
[AMap](https://lbs.amap.com/demo/list/jsapi-v2) and its 3D plugin Loca.
API has eight(8) commands to enclose all AMap and Loca v.2.0 native commands and parameters.
Features easy transition 2D to/from 3D, variety of markers and layers, geoJson import, map manual drawing, dynamic 3D effects like flyover and trace animation, and more.
Enjoy rich interactive maps in R and Shiny with minimal overhead!## Installation
Use latest development version for optimal experience:
``` r
if (!requireNamespace('remotes')) install.packages('remotes')
remotes::install_github('helgasoft/amapro')
```## Examples
#### Minimal
```r
library(amapro); am.init()
```#### Extended
``` r
ctr <- c(22.430151, 37.073011)
turl <- paste0('http://server.arcgisonline.com/ArcGIS/rest/services/',
'World_Imagery/MapServer/tile/[z]/[y]/[x]')
helmet <- 'https://upload.wikimedia.org/wikipedia/commons/9/9d/Ancient_Greek_helmet.png'library(amapro)
am.init(viewMode= '3D', center= ctr, zoom= 10, pitch= 60) |>
am.control(ctype= 'ControlBar', position= 'RT') |>
am.item('TileLayer', tileUrl= turl) |>
am.item('Marker', position= ctr, icon= helmet) |>
am.cmd('set', 'InfoWindow', name='iwin', content='This is Sparta') |>
am.cmd('open', 'iwin', 'm$jmap', ctr) # m$jmap is the map name in JavaScript
# ... then open in browser for best performance```
## Demo
Run with command ``` demo(am.shiny, 'amapro') ```. Demo will open in default **browser**.
![]()
Made with amapro. Powered by AMap.