startTileRow and startTileColumn's  json string not generate  in AGSLOD

3346
5
Jump to solution
07-23-2012 08:09 PM
niuruigang
New Contributor
hello guys,i was a new arcgis iPhone developer,now i want convert AGSLOD object to json string for store database,but when i generate json string use encodeToJSON and AGSJSONRepresentation method, the code was below:
           
            NSDictionary *TileInfoDic = [_tileInfo encodeToJSON];
            NSString *TileInfoJson = [TileInfoDic AGSJSONRepresentation];
            AGSLOD *lod = nil;
            for (lod in _TileInfo.lods)
           {
                NSDictionary *lodDic = [lod encodeToJSON];
                NSLog(@"%@", [lodDic AGSJSONRepresentation]);
                n++;
            }
the conver result was below:
          {"level":0,"resolution":529.16772500211687,"scale":2000000}

in the result startTileRow???startTileColumn's???endTileRow and endTileColumn's json string not generated, by debug i know that there are normal values in  these property.
can yours give me some point for above issue, thanks very much!
0 Kudos
1 Solution

Accepted Solutions
NimeshJarecha
Esri Regular Contributor
The row/column are not part of the JSON because it has to be calculated at client. Server does not provide that information. Look at this tiled layer JSON. Hence, we have method on AGSTileInfo to calculate. There is no other method to convert AGSTileInfo to JSON. If you want you'll have to write your own method.

Hope this helps!

Regards,
Nimesh

View solution in original post

0 Kudos
5 Replies
NimeshJarecha
Esri Regular Contributor
start/end Tile row/column are not part of the JSON. When you decode AGSTileInfo, execute computeTileBounds method and it will populate all the information in each AGSLOD.

Regards,
Nimesh
0 Kudos
niuruigang
New Contributor
start/end Tile row/column are not part of the JSON. When you decode AGSTileInfo, execute computeTileBounds method and it will populate all the information in each AGSLOD.

Regards,
Nimesh


Thanks Nimesh sir,Very thanks for your response again! But there is still something I don't understand, why the row/column are not part of the JSON?  It is specified in Arcgis�?There is others method to convert AGSTileInfo object to JSON string?


Regards,
niuruigang(china)
0 Kudos
NimeshJarecha
Esri Regular Contributor
The row/column are not part of the JSON because it has to be calculated at client. Server does not provide that information. Look at this tiled layer JSON. Hence, we have method on AGSTileInfo to calculate. There is no other method to convert AGSTileInfo to JSON. If you want you'll have to write your own method.

Hope this helps!

Regards,
Nimesh
0 Kudos
niuruigang
New Contributor
The row/column are not part of the JSON because it has to be calculated at client. Server does not provide that information. Look at this tiled layer JSON. Hence, we have method on AGSTileInfo to calculate. There is not other method to convert AGSTileInfo to JSON. If you want you'll have to write you own method.

Hope this helps!

Regards,
Nimesh


Thanks Mr Nimesh, i understood, thanks for your response patiently!

Best wishes for you!
Niuruigang(china)
0 Kudos
NimeshJarecha
Esri Regular Contributor
You're welcome! If you're satisfied with the answer then please mark thread as answered.

Regards,
Nimesh
0 Kudos