In my app, i want to open google map with specific location provided along with marker and its label with it. And i want to do this with 'Intent', not with 'Google Map' and 'Marker' classes. I am using the following code :
post_url.setOnClickListener({
val intent=Intent(Intent.ACTION_VIEW)
intent.data = Uri.parse("https://www.google.com/maps/place/University+of+Oxford/@51.7548164,-1.2565555,17z/data=!4m12!1m6!3m5!1s0x4876c6a9ef8c485b:0xd2ff1883a001afed!2sUniversity+of+Oxford!8m2!3d51.7548164!4d-1.2543668!3m4!1s0x4876c6a9ef8c485b:0xd2ff1883a001afed!8m2!3d51.7548164!4d-1.2543668")
startActivity(intent)
})
It points to the provided location,but marker is not shown. I have also tried the following code:
post_url.setOnClickListener({
val intent=Intent(Intent.ACTION_VIEW)
intent.data = Uri.parse("geo:0,0?q=51.7548164,-1.2565555(Oxford University)")
startActivity(intent)
})
In second method marker is visible but the label is not shown.The text 'Oxford university' is written on the bottom of map with info. But i want show with marker.See the following image to understand what i want.
