This add-on works really well for us while our whole project depends on vaadin version 14.8.0. However, when trying to migrate our whole project to vaadin 22.0.2, then it doesn’t work any more. In the new vaadin, the google map didn’t show up in the view, it didn’t even attach to the component container. There’s no any error shows in the log also.
Hello. I did a simple test on a Vaadin 22 (version 22.0.2) project and the map (version 1.5.0) it’s rendering okay. Could you create an issue [here]
(https://github.com/FlowingCode/GoogleMapsAddon/issues) with an example to reproduce the problem so we can take a look? Thanks!
Hi Paola,
Happy new year! Glad to see your reply. If you tested it and it’s working fine, I would then not create an issue as it is not an issue at all. Do you mind attaching the simple test project (by version 22.0.2) here that is working fine?
Thanks in advance.
Jason
Hi Jason.
I’ve just cloned the repo, replaced the Vaadin version with 22.0.2, and then executed: mvn clean install jetty:run “-Dgoogle.maps.api=MY-API-KEY” (replace MY-API-KEY with your api key) and then I was able to access the demo by browsing to http://localhost:8080/
Can you try that?
Regards.
Hi Martín,
Thanks for letting me know that you cloned the repo, replaced the vaadin version with 22.0.2, then it runs ok.
However, I don’t know what the repo you were referred to, if you were talking about the add-on project repo, then it is not my problem area. We need to load the add-on project as a dependency, in that case, we cannot customise the project to work for us, otherwise, it is a maintenance burden for our primary project.
Regards.
Jason
Hi Jason, thanks for the good wishes and happy new year to you too.
I added my simple example as an attachment so you can take a look.
Let me know how it goes.
Regards.
18691331.zip (16.1 KB)
Hi Paola,
Thanks for the test project! It does run well. Now I am going to move the related code to my spring boot app to see what happen.
Best Regards.
Jason
Hi Paola,
By using the vaadin starter, I created a simple vaadin app based on latest spring boot(2.6.2) and jdk(17). Then move the code to the generated project. It still doesn’t work for me. I attached the project below.
Thank you again for sending the jetty app test case!
Best regard.
Jason
18691381.zip (555 KB)
Hi Jason, please try updating the vaadin.whitelisted-packages property in your application.properties file to this:
vaadin.whitelisted-packages = com.vaadin,org.vaadin,com.map.application,com.flowingcode
You can find more information about Vaadin & Spring properties [here]
(https://vaadin.com/docs/latest/flow/integrations/spring/configuration/#special-configuration-parameters).
Hope this helps. Let me know how it goes.
Regards.
Hi Paola,
Thank you for the help with the vaadin.whitelisted-package update! Now it works.
Best regards.
Jason