A
A
Alexander Petrov2015-12-01 18:43:44
JavaScript
Alexander Petrov, 2015-12-01 18:43:44

how to get json on iphone

I use Yandex to get a list of cities and paste it on the page.
For example, if you enter "Mo", then json will be returned with a list of all cities in which there is Mo.
I do it like this:

$(document).on('input paste','.adres_delivery', function() {
        $('.list_adres').html('');
        $.getJSON('http://geocode-maps.yandex.ru/1.x/?format=json&geocode='+$(this).val(), function(data){
          var items = [];
          $.each(data.response.GeoObjectCollection.featureMember, function(key, val){
              $('.list_adres').append('<li administrative="'+val.GeoObject.metaDataProperty.GeocoderMetaData.AddressDetails.Country.AdministrativeArea.AdministrativeAreaName+'" class="open_delivery" pos="'+val.GeoObject.Point.pos+'">'+val.GeoObject.metaDataProperty.GeocoderMetaData.text+'</li>');
              $('.list_adres').show();
          });
        });
    });


everything works great! BUT! This canoe does not work on iPhone! the request doesn't work.
Works great on android. iPhone wobbles.
What could be the matter, tell me, friends !!! Piiiiz!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kravchenko, 2015-12-01
@mydearfriend

Can't figure it out without debugging. Connect your phone to your computer and see what's going on in the console.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question