You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* for geoJSON file that has same start/endpoints for each polygon. see issue with more info opensearch-project#794 (comment)
Signed-off-by: alicejw <[email protected]>
* for additional images with borders and fixed errors in example GeoJSON file so it is cut and paste ready to use
Signed-off-by: alicejw <[email protected]>
* rename new image file because replacing file with same name caused build conflict
Signed-off-by: alicejw <[email protected]>
* image rename
Signed-off-by: alicejw <[email protected]>
* for doc reviewer edits and more clarification to procedural steps
Signed-off-by: alicejw <[email protected]>
* fix typo in UI name 'Region Map' visualization type
Signed-off-by: alicejw <[email protected]>
* to add prerequisite callout for the two required plugins
Signed-off-by: alicejw <[email protected]>
* remove commented-out note for link. unnecessary
Signed-off-by: alicejw <[email protected]>
* for doc review updates - changed example JSON file to include only 2 counties, and other rewrites
Signed-off-by: alicejw <[email protected]>
* remove modified region map and use original map with 2 counties
Signed-off-by: alicejw <[email protected]>
* we decided to show the grey outlined regions in the image
Signed-off-by: alicejw <[email protected]>
Signed-off-by: alicejw <[email protected]>
Copy file name to clipboardExpand all lines: _dashboards/geojson-regionmaps.md
+24-25Lines changed: 24 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -8,19 +8,25 @@ nav_order: 7
8
8
9
9
OpenSearch Dashboards provides basic map tiles with a standard vector map that you can use to create your region map visualizations. You can configure the base map tiles using the Web Map Service (WMS) map server.
10
10
11
-
You cannot configure a server to support user-defined vector map layers. However, you can configure your own GeoJSON file and upload it for this purpose.
11
+
You can't configure a server to support user-defined vector map layers. However, you can configure your own GeoJSON file and upload it for this purpose.
12
12
{: .note}
13
13
14
14
OpenSearch also has a standard set of GeoJSON files to provide a vector map with your regional maps.
15
15
16
16
## Custom vector maps with GeoJSON
17
17
18
-
If you have a specific locale that is not provided by OpenSearch Dashboards vector maps, such as a US county or US ZIP Code, you can create your own custom vector map with a GeoJSON file. To use this feature, you have to install both the [Dashboards-Maps frontend plugin](https://github.com/opensearch-project/dashboards-maps) and the [OpenSearch Geospatial backend plugin](https://github.com/opensearch-project/geospatial).
18
+
If you have a specific locale that is not provided by OpenSearch Dashboards vector maps, such as a US county or US ZIP Code, you can create your own custom vector map with a GeoJSON file. To create a custom region map you would define a geographic shape such as a polygon with multiple coordinates. To learn more about the various geographic shapes that support a custom region map location, see [Geoshape field type]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geo-shape/).
19
19
20
20
GeoJSON format allows you to encode geographic data structures. To learn more about the GeoJSON specification, go to [geojson.org](https://geojson.org/).
21
21
22
22
You can use [geojson.io](https://geojson.io/#map=2/20.0/0.0) to extract GeoJSON files.
23
-
{: .tip}
23
+
24
+
> **PREREQUISITE**
25
+
> To use a custom vector map with GeoJSON, install these two required plugins:
To create your own custom vector map, upload a JSON file that contains GEO data for your customized regional maps. The JSON file contains vector layers for visualization.
26
32
@@ -29,42 +35,35 @@ To create your own custom vector map, upload a JSON file that contains GEO data
29
35
1. Select the **Create Visualization** button.
30
36
1. Select **Region Map**.
31
37
1. Choose a source. For example, **[Flights] Flight Log**.
32
-
1. In the right panel, select **Import Vector Map**.
38
+
1. In the right panel, select **Import Vector Map**.
33
39
1. In **Upload map**, select or drag and drop your JSON file.
34
-
Enter **Map name prefix** (for example, `us-county`). Your map will have the prefix that you defined followed by the `-map` suffix (for example, `us-county-map`).
35
-
Select the **Import file** button.
36
-
Once the upload is successful, you will see a pop-up prompting you to refresh the map. Select the **Refresh** button.
40
+
Enter **Map name prefix** (for example, `usa-counties`). Your map will have the prefix that you defined followed by the `-map` suffix (for example, `usa-counties-map`). <imgsrc="{{site.url}}{{site.baseurl}}/images/import-geojson-file.png"alt="import a Geo .json file"width="340"/>
41
+
1.Select the **Import file** button.
42
+
Once the upload is successful, you will see a pop-up prompting you to refresh the map. Select the **Refresh** button. <imgsrc="{{site.url}}{{site.baseurl}}/images/upload-success.png"alt="message upon a successful file upload"width="280"/>
37
43
38
-
<imgsrc="{{site.url}}{{site.baseurl}}/images/import-vector-map.png"alt="import a Geo .json file"width="380"/>
44
+
### Step 2: View the custom region map in OpenSearch Dashboards
39
45
40
-
## Layer options
46
+
After you upload a custom GeoJSON file, you need to set the vector map layer to custom, and select your vector map:
41
47
42
-
If you upload a custom GeoJSON file, you can toggle between two layer options: **Default vector map** or **Custom vector map**. To use your custom vector map, follow the steps below.
43
-
44
-
1. On the top menu bar, go to **OpenSearch Dashboards > Visualize**.
45
-
1. Select the **Create Visualization** button.
46
-
1. Select **Region Map**.
47
-
1. Choose a source. For example, **[Flights] Flight Log**.
48
-
1. In the right panel, select **Layer Options**.
49
-
1. In the **Layer settings** section, under **Choose a vector map layer**, select the **Custom vector map** option. In **Vector map**, select the custom map you created. Select the **Update** button.
50
-
51
-
Under **Layer settings > Style settings**, you may want to increase **Border thickness** to see the borders more clearly.
0 commit comments