Updated code to comply with v3 maps API