Select to view content in your preferred language

Hosting ArcGIS layers locally on my machine, calling layers into Unreal from local dir path

247
2
12-04-2024 10:37 AM
piercze
Occasional Contributor

I am building an application in Unreal that does not need to be run at scale. In other words, I don't need the application to call an ESRI server to retrieve data. Instead, I want to download vector tile or feature layers onto my own workstation in order to test and build the app without calling the API every time I run the scene.

I have a .vtpk to test with, but I need to find some documentation on the C++ or blueprints that I need to pull the .vtpk into the scene the same way I would from the ESRI server, but now as a local dir path.

Can someone point me in the right direction?

2 Replies
piercze
Occasional Contributor

Or if this is intentionally prevented by ESRI can someone tell me so that I don't waste days.

0 Kudos
AShahbaz
Esri Contributor

Yes, you can use vtpk and slpk files. You load them the same way streamed layers are loaded, just using the full file path instead of the URL. Here is an example based on the `API` sample provided in the plugin.

auto layer = UArcGISVectorTileLayer::CreateArcGISVectorTileLayerWithProperties(
"C:\\Path\\To\\File.vtpk", "Layer1", 1.f, true, "");
map->GetLayers()->Add(layer);

 Alternatively, you can also enter the full path of the file in the UI as the layer source.