- Refer to this example to understand various functionalities of MATLAB Compiler: MathWorks Documentation.
Error using siteviewer with Application Compiler
7 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Garmit Pant
2024-8-8
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!
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Error Detection and Correction 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!