Hello, folks. I'm implementing an embedded open street maps viewer in an application where the user can select a region of the map and export it. However, my DownloadListener methods are not getting called at all. Instead, the downloaded file gets dumped on the screen as a giant xml file. I already checked the output of the application log and the view console, there's nothing useful there.
Here's the listener declaration:
class OsmMapViewerDownloadListener : public ultralight::DownloadListener
{
public:
ultralight::DownloadId NextDownloadId(ultralight::View* caller) override;
bool OnRequestDownload(ultralight::View* caller, ultralight::DownloadId id, const ultralight::String& url) override;
void OnBeginDownload(ultralight::View* caller, ultralight::DownloadId id, const ultralight::String& url, const ultralight::String& filename, int64_t expected_content_length) override;
void OnReceiveDataForDownload(ultralight::View* caller, ultralight::DownloadId id, ultralight::RefPtr<ultralight::Buffer> data) override;
void OnFinishDownload(ultralight::View* caller, ultralight::DownloadId id);
void OnFailDownload(ultralight::View* caller, ultralight::DownloadId id) override;
OsmMapViewer *m_viewer;
};
Hello, folks. I'm implementing an embedded open street maps viewer in an application where the user can select a region of the map and export it. However, my DownloadListener methods are not getting called at all. Instead, the downloaded file gets dumped on the screen as a giant xml file. I already checked the output of the application log and the view console, there's nothing useful there.
Here's the listener declaration: