title: Kotlin - Google Maps Direction by Static Url
body: <p>So, I have a Static Google Map, like the following:</p>
  <p><a href="https://maps.googleapis.com/maps/api/staticmap?center=Madrid&amp;zoom=14&amp;size=600x300&amp;maptype=roadmap&amp;key=key&amp;markers=Madrid" rel="nofollow noreferrer">Static Google Map Link</a></p>
  <p>And I want it to, when I click on the image view, that contains that static map, to start Google Maps with that direction.</p>
  <p>I've used Intent... but it always breaks &amp; don't work.</p>
  <p>Code:</p>
  <pre><code>binding.imgview.setOnClickListener {
         
          val uri = Uri.parse(https://maps.googleapis.com/maps/api/staticmap?center=Madrid&amp;zoom=14&amp;size=600x300&amp;maptype=roadmap&amp;key=YOUR_API_KEY&amp;markers=Madrid)
  
          val googleMapsPackage = &quot;com.google.android.apps.maps&quot;
          val intent = Intent(Intent.ACTION_VIEW, uri)
  
          intent.setPackage(googleMapsPackage)
  
  
          context?.startActivity(intent)
      }
  </code></pre>
  <p>Any quest, feel free to ask :)
  Thanks.</p>