Skip to content

Commit 616ea89

Browse files
paodbmlopezFC
authored andcommitted
docs: update readme file
1 parent e1b9304 commit 616ea89

File tree

1 file changed

+51
-15
lines changed

1 file changed

+51
-15
lines changed

README.md

Lines changed: 51 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,28 @@ Vaadin 14+ addon for Google Maps Web Component
1818

1919
[Available in Vaadin Directory](https://vaadin.com/directory/component/google-maps-addon)
2020

21+
### Maven install
22+
23+
Add the following dependencies in your pom.xml file:
24+
25+
```xml
26+
<dependency>
27+
<groupId>com.flowingcode.vaadin.addons</groupId>
28+
<artifactId>google-maps</artifactId>
29+
<version>X.Y.Z</version>
30+
</dependency>
31+
```
32+
<!-- the above dependency should be updated with latest released version information -->
33+
34+
```xml
35+
<repository>
36+
<id>vaadin-addons</id>
37+
<url>https://maven.vaadin.com/vaadin-addons</url>
38+
</repository>
39+
```
40+
41+
For SNAPSHOT versions see [here](https://maven.flowingcode.com/snapshots/).
42+
2143
## Building and running demo
2244

2345
- git clone repository
@@ -35,14 +57,18 @@ The issues for this add-on are tracked on its github.com page. All bug reports a
3557

3658
## Contributions
3759

38-
Contributions are welcome, but there are no guarantees that they are accepted as such. Process for contributing is the following:
60+
Contributions are welcome, but there are no guarantees that they are accepted as such.
3961

40-
- Fork this project
62+
As first step, please refer to our [Development Conventions](https://github.com/FlowingCode/DevelopmentConventions) page to find information about Conventional Commits & Code Style requeriments.
63+
64+
Then, follow these steps for creating a contibution:
65+
66+
- Fork this project.
4167
- Create an issue to this project about the contribution (bug or feature) if there is no such issue about it already. Try to keep the scope minimal.
4268
- Develop and test the fix or functionality carefully. Only include minimum amount of code needed to fix the issue.
43-
- Refer to the fixed issue in commit
44-
- Send a pull request for the original project
45-
- Comment on the original issue that you have implemented a fix for it
69+
- For commit message, use [Conventional Commits](https://github.com/FlowingCode/DevelopmentConventions/blob/main/conventional-commits.md) to describe your change.
70+
- Send a pull request for the original project.
71+
- Comment on the original issue that you have implemented a fix for it.
4672

4773
## License & Author
4874

@@ -55,14 +81,24 @@ GoogleMapsAddon is written by Flowing Code S.A.
5581
## Getting started
5682

5783
Create an instance of GoogleMap, configure it, add markers, polygons, etc:
84+
```java
85+
GoogleMap gmaps = new GoogleMap(apiKey,null,null);
86+
gmaps.setMapType(MapType.SATELLITE);
87+
gmaps.setSizeFull();
88+
gmaps.setCenter(new LatLon(0,0));
89+
gmaps.addMarker("Center", new LatLon(0,0), true, "");
90+
GoogleMapPolygon gmp = gmaps.addPolygon(Arrays.asList(new GoogleMapPoint(gmaps.getCenter()),
91+
new GoogleMapPoint(gmaps.getCenter().getLat(),gmaps.getCenter().getLon()+1),
92+
new GoogleMapPoint(gmaps.getCenter().getLat()+1,gmaps.getCenter().getLon())));
93+
gmp.addClickListener(ev->Notification.show("polygon clicked"));
5894
```
59-
GoogleMap gmaps = new GoogleMap(apiKey,null,null);
60-
gmaps.setMapType(MapType.SATELLITE);
61-
gmaps.setSizeFull();
62-
gmaps.setCenter(new LatLon(0,0));
63-
gmaps.addMarker("Center", new LatLon(0,0), true, "");
64-
GoogleMapPolygon gmp = gmaps.addPolygon(Arrays.asList(new GoogleMapPoint(gmaps.getCenter()),
65-
new GoogleMapPoint(gmaps.getCenter().getLat(),gmaps.getCenter().getLon()+1),
66-
new GoogleMapPoint(gmaps.getCenter().getLat()+1,gmaps.getCenter().getLon())));
67-
gmp.addClickListener(ev->Notification.show("polygon clicked"));
68-
```
95+
96+
## Special configuration when using Spring
97+
98+
By default, Vaadin Flow only includes ```com/vaadin/flow/component``` to be always scanned for UI components and views. For this reason, the addon might need to be whitelisted in order to display correctly.
99+
100+
To do so, just add ```com.flowingcode``` to the ```vaadin.whitelisted-packages``` property in ```src/main/resources/application.properties```, like:
101+
102+
```vaadin.whitelisted-packages = com.vaadin,org.vaadin,dev.hilla,com.flowingcode```
103+
104+
More information on Spring whitelisted configuration [here](https://vaadin.com/docs/latest/integrations/spring/configuration/#configure-the-scanning-of-packages).

0 commit comments

Comments
 (0)