Effacer les filtres
Effacer les filtres

Error using siteviewer with Application Compiler

6 vues (au cours des 30 derniers jours)
constantine pappas
constantine pappas le 7 Août 2024
Modifié(e) : Walter Roberson le 13 Août 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

Réponse acceptée

Garmit Pant
Garmit Pant le 8 Août 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!
  1 commentaire
constantine pappas
constantine pappas le 13 Août 2024
Solved!
Thanks you very much for your reply, specifically your comment, "The error suggests that ‘usgsimagery’ was passed as the input argument."
usgsimagery was not a variable name used by me.
Upon further searching I found usgsimagry.png in my R2023b prferences folder.
Following the advice given in:
In breif:
*****
Locate my MATLAB Preference directory by running the following command in the MATLAB Command Window:
>> prefdir
Make sure MATLAB is closed and rename the directory from R2023b to R2023b_old (in case you want to revert back).
Then create a new empty folder with the name R2023b
Then restart MATLAB and it will create the preferences file in the new folder
*****
So I simply renamed my folder and created an empty R2023b folder, and everything is working as expected.
thank you again for the insight.
cp

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Error Detection and Correction dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by