use api to get map size