- Refer to this example to understand various functionalities of MATLAB Compiler: MathWorks Documentation.
Error using siteviewer with Application Compiler
7 views (last 30 days)
Show older comments
constantine pappas
on 7 Aug 2024
Edited: Walter Roberson
on 13 Aug 2024
When attempting to use siteviewer, in a standalone application created with the Application Compiler, the following error occurs:
Error using siteviewer
Expected Basemap to match one of these values:
'darkwater', 'grayland', 'bluegreen', 'grayterrain', 'colorterrain', 'landcover', 'streets', 'streets-light', 'streets-dark', 'satellite', 'topographic', 'none'
The input, 'usgsimagery', did not match any of the valid values.
Error in siteViewTestwcomp (line 44)
MATLAB:graphics:maps:unrecognizedStringChoice
*****
Please note, the code executes as expected when run from the Matlab command prompt.
The error only manifests itself when attempting to run the executable generated from the App. Compiler.
Minimal code to create error:
% siteviewer
rtxTerrainMap_GLB = siteviewer('Basemap','satellite','Terrain','gmted2010','Name','Globe-Terrain Map');
%%{
% longley rice initial parameters
propModel_ITM = propagationModel(...
"longley-rice",...
"AntennaPolarization","horizontal",...
"AtmosphericRefractivity",301,...
"ClimateZone","continental-temperate",...
"GroundConductivity",0.005,...
"GroundPermittivity",15,...
"SituationVariabilityTolerance",0.5,...
"TimeVariabilityTolerance",0.5...
);
% free space
propModel_FREESPACE = propagationModel('freespace');
% rain atten
propModel_RAIN = propagationModel('rain','rainrate',0);
% ref. ellipsoid
wgs84 = wgs84Ellipsoid("m");
%}
*****
Curiously, if I simply compile only the siteviewer, the executable runs correctly, and the siteveiwer globe opens.
% siteviewer
rtxTerrainMap_GLB = siteviewer('Basemap','satellite','Terrain','gmted2010','Name','Globe-Terrain Map');
*****
Given that in all case the specified basemap is in the list of expected values, is there something I'm missing for the deployed version, why are the additional prop model definitions causing executable issue?
thank you in advance. Please let me know if any additional information is needed.
cp
0 Comments
Accepted Answer
Garmit Pant
on 8 Aug 2024
Hello Constantine Pappas,
The error you have encountered suggests that the “siteviewer” function is receiving an invalid input argument.
I compiled the code you provided in MATLAB R2023b but could not reproduce the error, even when using the code for the propagation model. The application ran without any issues, displaying the Global Terrain Map.
The error suggests that ‘usgsimagery’ was passed as the input argument. Please ensure that the input argument to the “Basemap” parameter matches one of the permissible values ('darkwater', 'grayland', 'bluegreen', 'grayterrain', 'colorterrain', 'landcover', 'streets', 'streets-light', 'streets-dark', 'satellite', 'topographic', 'none').
Also, ensure that the MATLAB Runtime used to run the application matches the version of your MATLAB.
For further understanding, kindly refer to the following MathWorks documentation:
I hope you find the above explanation and suggestions useful!
More Answers (0)
See Also
Categories
Find more on Error Detection and Correction in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!