I'm using the following code to get photo reference from the `places_changed` event of the autocomplete object.

```
var autocomplete = new google.maps.places.Autocomplete(input);
google.maps.event.addListener(autocomplete, 'place_changed', function() {
    var place = autocomplete.getPlace();        
    var ref = place.reference;
    var url = "https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photoreference="+ref;
});

```

So how would I make a HTTP request to `url`. Using `$.getJSON()` is resulting in CORS issue. Is there any other way I can overcome this problem?