To use google map instead of OpenSreetMap, simply add URL parameter mapImpl=google
or set the init-param in your deployment descriptor:
<init-param> <param-name>vaadin.component.map.google</param-name> <param-value>true</param-value> </init-param>
and it's also necessary to set the API key for your google account. It's possible to do this in code, in your application:
getFactory().setProperty("vaadin.component.map.google.key", apikey);
or, just use set it in your config.xml of the application:
<?xml version="1.0" encoding="UTF-8"?> <application> ... <connection> <property name="factory:vaadin.component.map.google.key">apikey</property> </connection> </application
And finally, it's also possible to put the file googlemap.properties
to your classpath. The file should look like:
apikey=ABC123