Map component zoom in when marker clicked

i am trying to do something like this

if i click the marker it should zoom in if i close the popup the map needs to come to its initial position.I will paste the link here for reference. And also the popup should be in bottom right as shown in the figure https://onlinedemo.inductiveautomation.com/data/perspective/client/OnlineDemo/feature/realtime/maps
kindly help me guys.