Documentation

(vaadin)

Google map configuration

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:

googlemap.properties
apikey=ABC123
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information