I\'m using google maps. In my code i\'ve used setCenter() function. My problem is that marker is always located on top left corner of map area (not at the center). Please te
@phoenix24 answer actually helped me (whose own asnwer did not solve my problem btw). The correct arguments for setCenter is
map.setCenter({lat:LAT_VALUE, lng:LONG_VALUE});
Google Documentation
By the way if your variable are lat and lng the following code will work
map.setCenter({lat:lat, lng:lng});
This actually solved my very intricate problem so I thought I will post it here.