Skip to content

Commit

Permalink
Changes as per PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
har13205 committed Mar 5, 2024
1 parent 0860c3d commit 7a6a3f5
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ using namespace Esri::ArcGISRuntime;

ConfigureBasemapStyleLanguage::ConfigureBasemapStyleLanguage(QObject* parent /* = nullptr */) :
QObject(parent),
m_map(new Map(SpatialReference::webMercator())),
m_map(new Map(SpatialReference::webMercator(), this)),
m_basemapStyleParameters(new BasemapStyleParameters(this))
{
}
Expand All @@ -56,8 +56,6 @@ MapQuickView* ConfigureBasemapStyleLanguage::mapView() const
// Set the view (created in QML)
void ConfigureBasemapStyleLanguage::setMapView(MapQuickView* mapView)
{
m_map = new Map(SpatialReference::webMercator());

if (!mapView || mapView == m_mapView)
return;

Expand Down Expand Up @@ -99,7 +97,7 @@ void ConfigureBasemapStyleLanguage::setNewBasemapLanguage(bool global, const QSt
}

if (m_basemap)
delete m_basemap;
m_basemap->deleteLater();

m_basemap = new Basemap(BasemapStyle::OsmLightGray, m_basemapStyleParameters, this);
m_map->setBasemap(m_basemap);
Expand Down

0 comments on commit 7a6a3f5

Please sign in to comment.