Can i use .tif, .jpg or .bmp surface images for creating a basemap? I use .tpk files from ArcGIS Pro as world surface image but i want to try other formats(.tif is preferable). What i use now that works but only with .tpk files:
TileCache tileCache = new TileCache("C:\\Users\\user\\Downloads\\WorldImagery1.tpk");
ArcGISTiledLayer[] tiledLayers = new ArcGISTiledLayer[1];
tiledLayers[0] = new ArcGISTiledLayer(tileCache);
Basemap basemap = new Basemap(Arrays.asList(tiledLayers), null);
arcscene = new ArcGISScene(basemap);
sceneView.setArcGISScene(arcscene);
Solved! Go to Solution.
When i use my tif file it loads but doesn't display. The string "raster added" appears, scene is zoomed but i haven't any image displayed. I didn't find tif file from your sample link. I found RasterLayerFile.png file and have the same result when running program with this .png file.
My SDK and JDK are 11.0.2
OS is Windows 10 Pro
when i use my tif file
when i use .png file from your sample
@VanyaIvanov it's not easy for me to see why this isn't working unless I can get a sample of your data.
Can you post it on the forum, or if sharing your specific data isn't an option for you, then look me up here https://github.com/mbcoder and find a way of sharing the data with me.
If I can get the data you are trying to display I should be able to find the issue.
Thank you. I displayed Shasta.tif. It remains to uderstand why i can't open my .tif files
I'm glad to hear you've managed to display a tif file which should give you confidence in your code.
I'm happy to take a look at one of your files to see if I can see the issue. You just need to post it here or contact me directly to find a way of sharing it.
The problem was in CRS of my .tif images. Using Define Projection tool in ArcGIS Pro i changed CRS to the right CRS(EPSG 3857 in my case) and images started to display.