Apart from center the map on click, the rest is done