superset-plugin-map-navigation
v0.1.1
Published
Superset Chart - Commute Navigation with Amap
Readme
superset-plugin-map-navigation
This is the Superset Plugin for commute navigation with Amap ability.
Screen shot

Params
Query
Source Longitude & Latitude: Please choose correct Long&Lat data from your dataset. This parameters present start point of navigation plan.
Commute Mode: You can choose one of following way to plan your way: Transit/Drive/Walk
Longitude: Target point Longitude.
Latitude: Target point Latitude.
Destination Name: Your target place name, it should show in map, but maybe have some issue with amap, this destination name doesn't working property, so you can leave it blank.
Amap Settings
Amap JS Key: Your js project key
Amap JS Code: Your js project code
You can apply your project key&code from:
https://lbs.amap.com/api/lightmap/summary
Superset setting
Because this plugin use iframe to embed amap into Superset chart, so please make sure your Superset have allowed load external frame from *.amap.com.
You can put following config under superset/docker/pythonpath_dev/superset_config.py to allow iframe load external page.
TALISMAN_CONFIG = {
'content_security_policy': {
'base-uri': ["'self'"],
'default-src': ["'self'"],
'img-src': ['*', 'data:'],
'worker-src': ["'self'", 'blob:'],
'connect-src': ["'self'", 'https://api.mapbox.com', 'https://events.mapbox.com'],
'script-src': ["'self'", "'strict-dynamic'"],
'style-src': ["'self'", "'unsafe-inline'"],
'frame-src': ["'self'", "https://m.amap.com"],
},
'content_security_policy_nonce_in': ['script-src'],
}