Hi @Alan, you can create an interactive map using MATLAB's native capabilities, such as exporting to a web-friendly format that supports interactivity. One option is to use the 'webmap' feature, which allows you to interact with geographic data in a web browser-like environment.
Here is a workaround:
- Use 'webmap' for Interactive Viewing:
- 'webmap' allows you to display geographic data interactively within MATLAB. Although it doesn't export to an HTML file, it's useful for exploring data.
% Example code:
lat = [37.7749, 34.0522, 40.7128]; % Example latitudes
lon = [-122.4194, -118.2437, -74.0060]; % Example longitudes
% Create a Web Map
wm = webmap('OpenStreetMap');
wmmarker(lat, lon, 'FeatureName', {'San Francisco', 'Los Angeles', 'New York'});
2. Export Static Images for Documentation:
- If you need to share your map outside of MATLAB, consider exporting static images at different zoom levels. While this doesn't provide interactivity, it allows you to document specific views.
% Save a static image of the current geoplot
frame = getframe(gcf);
imwrite(frame.cdata, 'geoplot_image.png');
I hope these approaches can help you explore and share geographic data!