Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

[Docs] Add instructions for image and weblink in tooltip (#797)

Shan Hef97016d551b5
diff --git a/docs/user-guides/a-introduction.md b/docs/user-guides/a-introduction.md
index 8f37d9fb6..78c445084 100644
--- a/docs/user-guides/a-introduction.md
+++ b/docs/user-guides/a-introduction.md
@@ -35,6 +35,7 @@ This guide will teach you how to perform data analysis in Kepler.gl by adding da
* [Hexbin](./c-types-of-layers/h-hexbin.md)
* [Heatmap](./c-types-of-layers/i-heatmap.md)
* [H3](./c-types-of-layers/j-h3.md)
+* [Trip](./c-types-of-layer/k.trip.md)
#### [Layer attributes](./d-layer-attributes.md)
@@ -42,15 +43,21 @@ This guide will teach you how to perform data analysis in Kepler.gl by adding da
#### [Filters](./e-filters.md)
-#### Map styles
-* [Base map styles](./f-map-styles/1-base-map-styles.md)
-* [Map layers](./f-map-styles/2-map-layers.md)
-* [Custom styles](./f-map-styles/3-custom-styles.md)
-* [View maps in 3d](./f-map-styles/4-view-maps-in-3d.md)
-* [Display legend](./f-map-styles/5-display-legend.md)
-* [Split maps](./f-map-styles/6-split-maps.md)
+#### [Map styles](./f-map-styles.md#map-styles.md)
+* [Base map styles](./f-map-styles.md#base-map-styles.md)
+* [Map layers](./f-map-styles.md#map-layers.md)
+* [Custom styles](./f-map-styles.md#custom-styles.md)
+
+#### [Interactions](./g-interactions.md)
+* [Tooltips](./g-interactions.md#tooltips)
+* [Brushing](./g-interactions.md#brushing)
+* [Display Coordinates](./g-interactions.md#display-coordinates)
+
+#### [Map Settings](./m-map-settings.md)
+* [View maps in 3d](./m-map-settings.md#view-maps-in-3d)
+* [Display legend](./m-map-settings.md#display-legend)
+* [Split maps](./m-map-settings.md#split-maps)
-#### [Map settings](./g-map-settings.md)
#### [Time playback](./h-playback.md)
diff --git a/docs/user-guides/c-types-of-layers/k.trip.md b/docs/user-guides/c-types-of-layers/k.trip.md
index b468609f6..ba5527699 100644
--- a/docs/user-guides/c-types-of-layers/k.trip.md
+++ b/docs/user-guides/c-types-of-layers/k.trip.md
@@ -42,7 +42,7 @@ In order to animate the path, the `geoJSON` data needs to contain `LineString` i
- Color
The path can be colored by an attribute from the properties.
-
+
<img src="https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/k-trip-attribute-colors.png" width="256" title="Color Attribute">
- Stroke Width
diff --git a/docs/user-guides/f-map-styles.md b/docs/user-guides/f-map-styles.md
new file mode 100644
index 000000000..4825faa36
--- /dev/null
+++ b/docs/user-guides/f-map-styles.md
@@ -0,0 +1,62 @@
+# Map Styles
+
+<!-- TOC -->
+
+ - [Base Map Styles](#base-map-styles)
+ - [Toggle Map Layers](#toggle-map-layers)
+ - [Map Layers](#map-layers)
+ - [Layer Order](#layer-order)
+ - [Custom Map Styles](#custom-map-styles)
+
+<!-- /TOC -->
+
+![map styles](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/f-map-styles-0.png "Map panel")
+
+kepler.gl provide a set of [Mapbox](https://www.mapbox.com) basemap styles as background map, including 3D buildings! You can also add your own custom map sytle using the Mapbox style link.
+
+## Base Map Styles
+
+Open the __Base Map panel__ to select from a list of default map styles.
+
+![base map panel](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/f-map-styles-1.png "base map panel")
+
+Open the __base map style__ drop down menu to change map color scheme and imagery. Options include:
+- __Dark__: dark base map with light-colored text.
+- __Light__: light base map with dark-colored text.
+
+## Toggle Map Layers
+
+![map layers](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/f-map-styles-2.png "map layers")
+
+#### Map Layers
+Hide and show water, buildings, roads, and more. Options include:
+- __Labels__: shows labels for cities, neighborhoods, and so on.
+- __Roads__: displays a translucent layer of road lines.
+- __Borders__: shows state and continent borders.
+- __Buildings__: shows building footprints.
+- __Water__: displays bodies of water.
+- __Land__: Shows parks, mountains, and other landscape features.
+- __3d Building__: Shows 3D buildings on the map. 3D buildings are only visible in the 3D map view. Resolution automatically updates based on current map zoom level. Use the input below to edit 3D bulding color.
+
+![3d building](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/f-map-styles-3.png "3d buldings")
+
+
+#### Layer Order
+To control the order in which map imagery layers are displayed, toggle the move to top icon:
+
+![move to top icon](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/f-map-styles-4.png "move to top icon").
+
+__TIP__: Move labels to the top on maps with colored layers to keep the labels from being concealed.
+
+![Examales of ordered layers](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/f-map-styles-5.png "examples of ordered layers")
+
+
+## Custom Map Styles
+![Add Custom Mapbox Styles button](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image45.png "Add Custom Mapbox Styles button")
+
+To add a custom base map style, click the add map style button to open the custom map style modal, paste in the mapbox [style Url](https://www.mapbox.com/help/studio-manual-publish/#style-url). Note that you need to paste in your [mapbox access token](https://www.mapbox.com/account/) if your style is not [published](https://www.mapbox.com/help/studio-manual-publish/#style-url).
+
+
+![Add Custom Mapbox Styles popup](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image13.png "Add Custom Mapbox Styles popup")
+
+[Back to table of contents](./a-introduction.md)
diff --git a/docs/user-guides/f-map-styles/1-base-map-styles.md b/docs/user-guides/f-map-styles/1-base-map-styles.md
deleted file mode 100644
index 26c80117a..000000000
--- a/docs/user-guides/f-map-styles/1-base-map-styles.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# Base Map Styles
-
-Open the __Base Map panel__ to modify the base map color scheme, imagery, and labeling.
-
-![base map panel](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/f-map_style_panel.png "base map panel")
-
-Open the __base map style__ drop down menu to change map color scheme and imagery. Options include:
-- __Dark__: dark base map with light-colored text.
-- __Light__: light base map with dark-colored text.
-
-## 3D Map layer
-
-We have integrated Mapbox 3D Building data into Kepler to enable users for 3D analysis and better visualizations. In order to enable this 3D building data layer, simply navigate to the ‘Base Map’ which is the 4th icon located under the Kepler.gl logo. Then, you are all set after clicking on to the ‘show’ button (which is an eye icon next to the 3D building layer).
-
-Note: The Building data only displays when the map zooms into street-level. If the building data doesn’t show up, please try further zoom into the map.
-
-![3D Map Layer](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/f-base_map_style_3d_map.png "3D Map Layer")
-
-
-[Back to table of contents](../a-introduction.md)
diff --git a/docs/user-guides/f-map-styles/2-map-layers.md b/docs/user-guides/f-map-styles/2-map-layers.md
deleted file mode 100644
index bad5cbc00..000000000
--- a/docs/user-guides/f-map-styles/2-map-layers.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Map Layers
-
-Map Layers
-Toggle water, buildings, roads, and more. Options include:
-- __Labels__: shows labels for cities, neighborhoods, and so on.
-- __Roads__: displays a translucent layer of road lines.
-- __Borders__: shows state and continent borders.
-- __Buildings__: shows building footprints.
-- __Water__: displays bodies of water.
-- __Land__: Shows parks, mountains, and other landscape features.
-![map layers](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image18.png "map layers")
-
-To control the order in which map imagery layers are displayed, toggle the move to top icon: ![move to top icon](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image27.png "move to top icon").
-
-__TIP__: Move labels to the top on maps with colored layers to keep the labels from being concealed.
-
-![exmaple of ordered layers](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image40.png "exmaple of ordered layers")
-
-[Back to table of contents](../a-introduction.md)
diff --git a/docs/user-guides/f-map-styles/3-custom-styles.md b/docs/user-guides/f-map-styles/3-custom-styles.md
deleted file mode 100644
index c8401e79c..000000000
--- a/docs/user-guides/f-map-styles/3-custom-styles.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Add Custom Mapbox Styles
-![Add Custom Mapbox Styles button](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image45.png "Add Custom Mapbox Styles button")
-
-To add a custom base map style, click the add map style button to open the custom map style modal, paste in the mapbox [style Url](https://www.mapbox.com/help/studio-manual-publish/#style-url). Note that you need to paste in your [mapbox access token](https://www.mapbox.com/account/) if your style is not [published](https://www.mapbox.com/help/studio-manual-publish/#style-url).
-
-![Add Custom Mapbox Styles popup](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image13.png "Add Custom Mapbox Styles popup")
-
-[Back to table of contents](../a-introduction.md)
diff --git a/docs/user-guides/f-map-styles/4-view-maps-in-3d.md b/docs/user-guides/f-map-styles/4-view-maps-in-3d.md
deleted file mode 100644
index ecdb4219e..000000000
--- a/docs/user-guides/f-map-styles/4-view-maps-in-3d.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# View Maps in 3D
-View your map in 3D by clicking the 3D icon in the top right corner of your map:
-
-![View Maps in 3D](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image4.png "View Maps in 3D")
-
-[Back to table of contents](../a-introduction.md)
diff --git a/docs/user-guides/f-map-styles/5-display-legend.md b/docs/user-guides/f-map-styles/5-display-legend.md
deleted file mode 100644
index 87a181c2e..000000000
--- a/docs/user-guides/f-map-styles/5-display-legend.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Display Legend
-View your map in 3D by clicking the 3D icon in the top right corner of your map:
-
-![Display Legend](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image31.png "Display Legend")
-
-![Sample Legend](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image14.png "Sample Legend")
-
-[Back to table of contents](../a-introduction.md)
diff --git a/docs/user-guides/f-map-styles/6-split-maps.md b/docs/user-guides/f-map-styles/6-split-maps.md
deleted file mode 100644
index fbfc14de7..000000000
--- a/docs/user-guides/f-map-styles/6-split-maps.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# Split Maps
-
-You can display a side-by-side comparison of the same map area with different layers with the Split Map functionality.
-
-![Split Maps](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image36.png "Split Maps")
-
-1. Enable this by clicking the Split Map icon in the top right corner of your map:
-
-![Split Maps Icon](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image24.png "Split Maps Icon")
-
-2. Toggle the layers visible in each map with the layer icon in the top right corner of each map.
-
-![Toggle Layers](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image35.png "Toggle Layers")
-
-3. Zoom in and out on each map and the other will automatically mimic.
-
-[Back to table of contents](../a-introduction.md)
diff --git a/docs/user-guides/g-interactions.md b/docs/user-guides/g-interactions.md
new file mode 100644
index 000000000..c65881953
--- /dev/null
+++ b/docs/user-guides/g-interactions.md
@@ -0,0 +1,60 @@
+# Interactions
+
+<!-- TOC -->
+ - [Tooltips](#tooltips)
+ - [Brushing](#brushing)
+ - [Display Coordinates](#display-coordinates)
+<!-- /TOC -->
+
+You can toggle customization options on your map, including tooltips, brush highlighting, map imagery (water, parks, etc.), and more.
+
+![Interaction menu](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/g-interactions-0.png "Interaction menu")
+
+To toggle customization options on your map:
+
+1. Open the Interactions menu by clicking the Interactions icon:
+
+
+2. Click the switch next to the options you wish to activate/deactivate.
+
+There are three types of interactions to choose from: __Tooltip__, __Brushing__ and __Coordinate__. Note that only one of tooltip and brushing can be on at a time.
+
+## Tooltips
+tooltip displays metrics when hovering over a data point. You can choose which fields are displayed from the tooltip config menu.
+
+![tooltips](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image25.png "tooltips")
+
+ - __Image__ Image can be added to tooltip. If field name contains `<img>` and the field content contains `http` url
+
+ |id| `<img>-tooltip` |
+ |---|---|
+ |1|`http://my-image.com/my-image-0.png`|
+ |2|`http://my-image.com/my-image-1.png`|
+
+
+ - __Web link__
+Tooltip can be a clicable weblink. To add a web link as tooltip, add url starts with `http://` to the field content.
+
+![tooltips](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/g-interactions-1.png "tooltips")
+
+
+Tip: click a point to pin the tooltip info to the map. To unpin the tooltip, press the blue pin icon.
+
+![pin/unpin tooltip](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image15.png "pin/unpin tooltip")
+
+
+## Brushing
+- __Brush__: Brush allows you to highlight areas with the cursor. When brush is turned on, all layers darken. Only the portion you hover over with the cursor is illuminated. Brush works well with arc layers in particular.
+
+![brush](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image12.png "brush")
+
+[Back to table of contents](./a-introduction.md)
+
+
+## Display Coordinates
+
+![coordinate](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/g-interactions-2.png "coordinate")
+
+When then on coordinate, a panel contains latitude and longitude will follow your mouse
+
+[Back to table of contents](./a-introduction.md)
diff --git a/docs/user-guides/g-map-settings.md b/docs/user-guides/g-map-settings.md
deleted file mode 100644
index 78b983718..000000000
--- a/docs/user-guides/g-map-settings.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# Map Settings
-
-You can toggle customization options on your map, including tooltips, brush highlighting, map imagery (water, parks, etc.), and more.
-
-## Tooltips and Highlighting
-
-To toggle customization options on your map:
-1. Open the Interactions menu by clicking the Interactions icon:
-
-![Interaction menu](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image30.png "Interaction menu")
-
-2. Click the switch next to the options you wish to activate/deactivate.
-
-![activate interactions](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image32.png "activate interactions")
-
-There are two types of interactions to choose from: Tooltips and Brush. Note that only one can be on at a time.
-- __Tooltip__: tooltip displays metrics when hovering over a data point. You can choose which fields are displayed from the tooltip config menu.
-
-![tooltips](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image25.png "tooltips")
-
-Tip: click a point to pin the tooltip info. To unpin the tooltip, press the blue pin icon.
-
-![pin/unpin tooltip](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image15.png "pin/unpin tooltip")
-- __Brush__: Brush allows you to highlight areas with the cursor. When brush is turned on, all layers darken. Only the portion you hover over with the cursor is illuminated. Brush works well with arc layers in particular.
-
-![brush](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image12.png "brush")
-
-[Back to table of contents](./a-introduction.md)
diff --git a/docs/user-guides/j-get-started.md b/docs/user-guides/j-get-started.md
index 33a18dffc..f066654ca 100644
--- a/docs/user-guides/j-get-started.md
+++ b/docs/user-guides/j-get-started.md
@@ -38,7 +38,7 @@ Learn more about [filters](./e-filters.md).
Change the settings on your map in the Interactions and Base Map menus. Customization options include tooltips, brush highlighting, base map style, map imagery toggles (water, parks, satellite image, etc.), and many more.
-Read about [base map styles](./f-map-styles/1-base-map-styles.md) and [map settings](./g-map-settings.md).
+Read about [base map styles](./f-map-styles.md), [interactions]('./g-interactions.md') and [map settings](./m-map-settings.md).
## 5) Save and Export
![Save and Export](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/export-save.png "Save and Export")
diff --git a/docs/user-guides/m-map-settings.md b/docs/user-guides/m-map-settings.md
new file mode 100644
index 000000000..2a4336b03
--- /dev/null
+++ b/docs/user-guides/m-map-settings.md
@@ -0,0 +1,49 @@
+# Map Settings
+
+<!-- TOC -->
+ - [Split Maps](#split-maps)
+ - [View Maps in 3D](#view-maps-in-3d)
+ - [Display Legend](#display-legend)
+<!-- /TOC -->
+
+
+![Map Settings](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/m-map-settings-0.png "Split Maps")
+
+## Split Maps
+
+You can display a side-by-side comparison of the same map area with different layers with the Split Map functionality.
+
+![Split Maps](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image36.png "Split Maps")
+
+1. Enable this by clicking the Split Map icon in the top right corner of your map:
+
+![Split Maps Icon](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/m-map-settings-split.png "Split Maps Icon")
+
+2. Toggle the layers visible in each map with the layer icon in the top right corner of each map.
+
+![Split Maps Icon](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/m-map-settings-layer.png "Split Maps Icon")
+
+![Toggle Layers](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image35.png "Toggle Layers")
+
+3. Zoom in and out on each map and the other will automatically mimic.
+
+
+## View Maps in 3D
+View your map in 3D by clicking the 3D icon in the top right corner of your map
+
+![View Maps in 3D](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/m-map-settings-3d.png "View Maps in 3D")
+
+- __drag__: pan
+- __cmd + drag__ (mac) or __ctrl + drag__ (win): rotate
+
+![Map in 3D](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/f-map-styles-7.png "Map in 3D")
+
+
+## Display Legend
+View your map in 3D by clicking the 3D icon in the top right corner of your map:
+
+![Display Legend](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/m-map-settings-legend.png "Display Legend")
+
+![Sample Legend](https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image14.png "Sample Legend")
+
+[Back to table of contents](./a-introduction.md)