map size matches javascript