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
|**minorGridDisplay**|**Type: boolean** Whether to display the minor grid and row/column grid labels. Defaults to **true**.|
28
-
|**roadMapColor**|**Type: String** The stroke color to use for the grid lines over road or terrain maps. All CSS3 colors are supported except for extended named colors.|
29
-
|**roadMapLabelClass**|**Type: String** The CSS class name to use for text labels over road or terrain maps. Defaults to **olc_overlay_text**.|
30
-
|**satelliteMapColor**|**Type: String** The stroke color to use for the grid lines over satellite or hybrid maps. All CSS3 colors are supported except for extended named colors.|
31
-
|**satelliteMapLabelClass**|**Type: String** The CSS class name to use for text labels over satellite or hybrid maps. Defaults to **olc_overlay_text**.|
24
+
25
+
| Properties ||
26
+
|---|---|
27
+
|**map**|**Type: [Map](https://developers.google.com/maps/documentation/javascript/3.exp/reference#Map)** Map on which to display the overlay. |
28
+
|**minorGridDisplay**|**Type: boolean** Whether to display the minor grid and row/column grid labels. Defaults to **true**. |
29
+
|**roadMapColor**|**Type: String** The stroke color to use for the grid lines over road or terrain maps. All CSS3 colors are supported except for extended named colors. Defaults to #7BAAF7. |
30
+
|**roadMapLabelClass**|**Type: String** The CSS class name to use for text labels over road or terrain maps. Defaults to **olc_overlay_text**. |
31
+
|**satelliteMapColor**|**Type: String** The stroke color to use for the grid lines over satellite or hybrid maps. All CSS3 colors are supported except for extended named colors. Defaults to #7BAAF7. |
32
+
|**satelliteMapLabelClass**|**Type: String** The CSS class name to use for text labels over satellite or hybrid maps. Defaults to **olc_overlay_text**. |
32
33
33
34
### Styling labels
34
35
The text labels default to using the CSS class selector `.olc_overlay_text`. If there is no CSS style with that selector, one will be automatically added to the document. If you want to specify your own style, you should ensure it includes the following settings:
@@ -41,9 +42,9 @@ justify-content: center;
41
42
flex-direction: column;
42
43
```
43
44
44
-
It's a really good idea to use slightly different styles for the road and satellite maps with different text colors. This is because of the different colors used in the maps.
45
+
It's a good idea to use slightly different styles for the road and satellite maps with different text colors. This is because of the different colors used in the map styles, so using different colors for the grids and labels improves legibility.
45
46
46
-
Here is an example of two styles:
47
+
Here is an example of using separate styles:
47
48
```html
48
49
<style>
49
50
.olc_label_road {
@@ -68,3 +69,17 @@ Here is an example of two styles:
68
69
}
69
70
</style>
70
71
```
72
+
73
+
To use those styles, and use the same colors for the grid lines, create your overlay like this:
74
+
75
+
```javascript
76
+
// After you have created the Google Maps object, instantiate
0 commit comments