Its possible to show .geodatabase (Runtime Conent) without a basemap on iOS

5494
15
07-10-2014 10:16 AM
Andréde_Mattos_Ferraz
Occasional Contributor

I generated a RuntimeContent in ArcMap but without a basemap, now when I try to show this content in iOS (esri iOS runtime SDK) my map stands gray. When I put some basemap, the map appears correctly... Has some rules about every map contain a basemap?

Thx in advance.

0 Kudos
15 Replies
GagandeepSingh
Occasional Contributor II

Can you elaborate on how you are adding the content onto your app and what is the end goal?

0 Kudos
Andréde_Mattos_Ferraz
Occasional Contributor
0 Kudos
SuganyaBaskaran1
Esri Contributor

I understand you want to display runtime content created from ArcMap. You've already created that which is good.

Can you clarify which of the following describes your need?

  • You don't want any base map ( or )
  • You don't want an offline base map but still want an online base map

If you don't add any base map to the map, you would just see the gray background. That is expected.

Please elaborate on your requirements, that would help us point you the right way.

0 Kudos
Andréde_Mattos_Ferraz
Occasional Contributor

I don't want any base map! Just runtime content, but the map doesn't appear without a basemap (all gray).

0 Kudos
SuganyaBaskaran1
Esri Contributor

Ok, You're able to see the features from your runtime content only if you add a base map. Otherwise, you see nothing. Correct me if I'm wrong.

If this is the case, can you share the following information?

  • The .geodatabase file that was generated from runtime content. You can send it over as a 'Private Message' if you don't wish to share it in the post.
  • ArcMap version
  • Any errors you got while adding the data without basemap
0 Kudos
SuganyaBaskaran1
Esri Contributor

To answer your question, yes you should be able to show a .geodatabase file created from Runtime Content without a basemap.

Can you also share the code you used to display the content?

0 Kudos
Andréde_Mattos_Ferraz
Occasional Contributor

        NSError *error;

        NSString *pathGDBString = [self.map getGeodatabasePath];

        //NSString *pathGDBString = @"/Users/isg/Downloads/MapaVixWebMercLoc/data/arcsde_data.geodatabase";

        AGSGDBGeodatabase *gdb = [[AGSGDBGeodatabase alloc] initWithPath:pathGDBString error:&error];

       

        //inverto os layers para inserir na ordem correta

        NSArray *arrLayers = [[gdb.featureTables reverseObjectEnumerator] allObjects];

       

        for (AGSFeatureTable* fTable in arrLayers) {

            if ([fTable hasGeometry]) {

                [self.mapView addMapLayer:[[AGSFeatureTableLayer alloc]initWithFeatureTable:fTable]];

            }

        }

0 Kudos
SuganyaBaskaran1
Esri Contributor

Your code looks ok to me.

Can you share the following information?

  • The .geodatabase file that was generated from runtime content. You can send it over as a 'Private Message' if you don't wish to share it in the post.
  • ArcMap version
  • What is the value of 'error' value here?

     AGSGDBGeodatabase *gdb = [[AGSGDBGeodatabase alloc] initWithPath:pathGDBStringerror:&error];

  • Is your data versioned?
0 Kudos
Andréde_Mattos_Ferraz
Occasional Contributor

Suganya,

  • The .geodatabase file that was generated from runtime content. You can send it over as a 'Private Message' if you don't wish to share it in the post.
    • I will send to you....
  • ArcMap version
    • 10.2
  • What is the value of 'error' value here?
    • No error... NIL

     AGSGDBGeodatabase *gdb = [[AGSGDBGeodatabase alloc] initWithPath:pathGDBStringerror:&error];

  • Is your data versioned?
    • Yes, arcsde 10.1
0 Kudos