How to use mapping toolbox in web app?

2 vues (au cours des 30 derniers jours)
Zhu Ruihen
Zhu Ruihen le 7 Jan 2020
Modifié(e) : Ryan Klots le 16 Fév 2021
Recently I try to develop a web app for painting the temperature in the ocean. But "Figure" can not be used in the web app and some functions from mapping toolbox (such as "worldmap") will create a new figure by itself, which leads to the error during this app runs in the browser. And I tried to set the Figure-'visible' as 'off', but it didn't work.

Réponses (1)

Ryan Klots
Ryan Klots le 16 Fév 2021
Modifié(e) : Ryan Klots le 16 Fév 2021
It looks like this MATLAB Answers post by the MathWorks Support Team gives a couple of suggestions for how to leverage Mapping Toolbox functionality in App Designer. The description sounds similar to your use case, as I believe that web apps must be compiled using App Designer.
I would recommend trying out the first workaround suggested in that post. In particular, Option 1 leverages geoaxes, which work with UIFigures. Since App Designer uses UIFigures, geoaxes may work well depending on your exact use case.
  1 commentaire
Ryan Klots
Ryan Klots le 16 Fév 2021
Modifié(e) : Ryan Klots le 16 Fév 2021
The only alternative that I can think of is to project any (lat, lon) data that you have into (x, y) coordinates using projfwd or some other method. Once you have the (x, y) data, you can plot it onto a regular UIAxes using normal plot commands instead of their plotm counterparts.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Develop uifigure-Based Apps dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by