Is .lpk supported with arcGIS runtime local server v 100.1 ?

783
7
07-24-2017 08:11 AM
ManelKEDDAR
New Contributor III

i'am trying to visualize a 3D SceneLayer so i generated a layer package and i created a localFeatureService using this .lpk (generated with ArcScene 10.4) i did it like this way :

 var sceneService = new ocalFeatureService(@"C:\Users\mkeddar\Documents\ArcGIS\Geom3DServitudeGabarit.lpk");

  await sceneService.StartAsync();

  var layer = new ArcGISSceneLayer();

 layer.Source = new Uri($"{sceneService.Url}/0");

 SceneView.Scene.OperationalLayers.Add(layer);

 SceneView.Scene.BaseSurface.BackgroundGrid = new Esri.ArcGISRuntime.UI.BackgroundGrid(Colors.White, Colors.White, 0, 100f);

but i have a generated exception when try to start the sceneService.StartAsync();

i think that the problem is with (.lpk) ? Does arcGis runtime local server v 100.1 supports (.lpk) and (.slpk)?

0 Kudos
7 Replies
dotMorten_esri
Esri Frequent Contributor

Create a local scene layer package instead and use it directly with the SceneLayer. That way you don't need local server at all.

https://pro.arcgis.com/en/pro-app/help/sharing/overview/scene-layer-package.htm

https://pro.arcgis.com/en/pro-app/tool-reference/data-management/create-scene-layer-package.htm

Note that a FeatureLayer and a SceneLayer are two very different things. You can't use a feature service to expose a scene, and you can't consume a feature layer in a scene layer.

0 Kudos
ManelKEDDAR
New Contributor III

Hello Morten , thanks for your answer 

I don't have arcGIS Pro on my desktop so i can't create a .SLPK ,all i have is arc Map 10.4 will it work if i do it this way ?

 var uri = new Uri(@"C:\Users\mkeddar\Documents\ArcGIS\Geom3DServitudeGabarit.lpk");

//visualisation 3D

var layer = new ArcGISSceneLayer();
layer.Source = new Uri($"{uri}/0");
// await layer.LoadAsync();
SceneView.Scene.OperationalLayers.Add(layer);

i joind my .lpk  on my original post 

thanks in advanced

0 Kudos
dotMorten_esri
Esri Frequent Contributor

No that won't work. You have to convert the data to SLPK (but then the above would work, if you loose the '/0' portion)

0 Kudos
ManelKEDDAR
New Contributor III

Hello but i dont have ArcGis pro licence i have arcMap 10.4

Envoyé de mon iPhone

Le 25 juil. 2017 à 18:29, Morten Nielsen <geonet@esri.com> a écrit :

GeoNet

Re: Is .lpk supported with arcGIS runtime local server v 100.1 ?

reply from Morten Nielsen in ArcGIS Runtime SDK for .NET - View the full discussion

No that won't work. You have to convert the data to SLPK (but then the above would work, if you loose the '/0' portion)

Reply to this message by replying to this email, or go to the message on GeoNet

Start a new discussion in ArcGIS Runtime SDK for .NET by email or at GeoNet

Following Re: Is .lpk supported with arcGIS runtime local server v 100.1 ? in these streams: Inbox

Following Morten Nielsen in these streams: Inbox

This email was sent by GeoNet because you are a registered user.

You may unsubscribe instantly from GeoNet, or adjust email frequency in your email preferences

0 Kudos
ManelKEDDAR
New Contributor III

On my .lpk i have a three sceneLayers I need to display the first layer how I can do that ? Need a sample code please ?

Envoyé de mon iPhone

Le 25 juil. 2017 à 18:29, Morten Nielsen <geonet@esri.com> a écrit :

GeoNet

Re: Is .lpk supported with arcGIS runtime local server v 100.1 ?

reply from Morten Nielsen in ArcGIS Runtime SDK for .NET - View the full discussion

No that won't work. You have to convert the data to SLPK (but then the above would work, if you loose the '/0' portion)

Reply to this message by replying to this email, or go to the message on GeoNet

Start a new discussion in ArcGIS Runtime SDK for .NET by email or at GeoNet

Following Re: Is .lpk supported with arcGIS runtime local server v 100.1 ? in these streams: Inbox

Following Morten Nielsen in these streams: Inbox

This email was sent by GeoNet because you are a registered user.

You may unsubscribe instantly from GeoNet, or adjust email frequency in your email preferences

0 Kudos
ManelKEDDAR
New Contributor III

Hello , 

please i need a sample code that works , here what i tried : 


var layer = new ArcGISSceneLayer();

layer.Source = new Uri(@"C:\Users\mkeddar\Documents\ArcGIS\Geom3DServitudeGabarit.lpk");
SceneView.Scene.OperationalLayers.Add(layer);

when i debug Layer.source i have null value what i should do in this case ?

0 Kudos
dotMorten_esri
Esri Frequent Contributor

As I mentioned earlier, LPK files are not supported. You need SLPK. Otherwise your code should be ok.

0 Kudos