All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.taig.taigless.geo.GoogleMaps.scala Maven / Gradle / Ivy

There is a newer version: 0.15.0
Show newest version
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