io.taig.taigless.geo.GoogleMaps.scala Maven / Gradle / Ivy
package io.taig.taigless.geo
import java.net.URLEncoder
import java.nio.charset.StandardCharsets
object GoogleMaps {
val BaseUrl = "https://www.google.com/maps"
def locationUrl(address: String, position: Position): String =
s"$BaseUrl/place/${URLEncoder.encode(address, StandardCharsets.UTF_8)}" +
s"/@${position.latitude.value},${position.longitude.value},17z"
def addressUrl(address: String): String =
s"$BaseUrl/search/${URLEncoder.encode(address, StandardCharsets.UTF_8)}"
def positionUrl(position: Position): String =
s"$BaseUrl/@${position.latitude.value},${position.longitude.value},17z"
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy