Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pom.xml
Original file line numberDiff line numberDiff line change
Expand Up@@ -540,7 +540,7 @@
<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<vaadin.version>25.0.0-beta2</vaadin.version>
<vaadin.version>25.0.0</vaadin.version>
<jetty.version>11.0.26</jetty.version>
</properties>
<dependencies>
Expand All@@ -550,6 +550,11 @@
<version>5.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dev</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</profile>

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,7 +47,6 @@
import java.util.List;
import java.util.concurrent.CompletableFuture;
import lombok.experimental.ExtensionMethod;
import org.apache.commons.lang3.StringUtils;

@SuppressWarnings("serial")
@Tag("google-map")
Expand DownExpand Up@@ -83,14 +82,18 @@ public enum MapType {
*/
public GoogleMap(String apiKey, String clientId, String language) {
getElement().setAttribute("api-key", apiKey);
if (!StringUtils.isEmpty(clientId)) {
if (!isEmpty(clientId)) {
getElement().setAttribute("client-id", clientId);
}
if (!StringUtils.isEmpty(language)) {
if (!isEmpty(language)) {
getElement().setAttribute("language", language);
}
}

private static boolean isEmpty(final String s) {
return s == null || s.length() == 0;
}

@Synchronize("google-map-idle")
public Double getLatitude() {
return getElement().getProperty("latitude", 0d);
Expand Down