We want be able to show weather-, better stormcell-, regions of varying sizes at different positions on the world map.
For that purpose we have got a set of six predefined png-graphics, each one refering to dedicated dimensions in width and height.
Attached you see an example stormcell, which shall refer to a size of 100x100 NM (Nautical miles) applying its default dimensions in terms of symbol pixel size.
The idea for a simple kind of implementation achieving such behaviour is to use a PicturemarkerSymbol and "stretch" the graphic in terms of width and height when zooming into the map.
The general code idea is given here:
Esri::ArcGISRuntime::PictureMarkerSymbol* localWeatherSymbol = nullptr;
Esri::ArcGISRuntime::Graphic* localWeatherGraphic = nullptr;
double weatherLongitude_deg = 27.5;
double weatherLatitude_deg = 9.0;
//The following graphic shall represent an area of 100Nm times 100Nm
QString symbolPath = QString::fromStdString( rme::zero::pathname("resources/images/Map_Cloud_1_Table_Image.png") );//100x100NM
localWeatherSymbol = new Esri::ArcGISRuntime::PictureMarkerSymbol(QUrl(symbolPath));
localWeatherGraphic->setSymbol(localWeatherSymbol);
//set the position
localWeatherGraphic->setGeometry(Esri::ArcGISRuntime::Point( weatherLongitude_deg, weatherLatitude_deg, Esri::ArcGISRuntime::SpatialReference::wgs84()));
//Connect scale-change events to obtain actual scaling factor. Necessary as scaling can be a result of mouse-wheel actions.
//mapView contain the MapGraphicsView
connect(mapView, &MapGraphicsView::mapScaleChanged, this, &MapWeatherObject::updateLocalWeatherGraphics);
//UpdateLocalWeatherGraphics is called in case of map-scale change events
void MapWeatherObject::updateLocalWeatherGraphics()
{
//Adapt width and height according to zoom-level
double scaledwidthheight = 1500000000.0/mapView->mapScale();
localWeatherSymbol->setHeight(scaledwidthheight);
localWeatherSymbol->setWidth(scaledwidthheight);
}
What now can be observed is that while zooming-in applying a small zoom-level (i.e. large mapScale) everything seems to be quite good and acceptable. I.e. the graphic size linearily increases while zooming in.
At a certain mapScale-level, and I figured out it must be between the steps 1000000 and 500000 for the value of mapScale, the graphic size is not increased any more, although the parameter "scaledwidthheight" still increases!
I also tried it with different png-graphics with other default pixel sizes, but the result was exactly the same.
Is this a limitation of the PicturemarkerSymbol or a bug?
Do you have any recommendation or workaround?
Due to current system-wide use of Qt 5.9.7 we use arcgis runtime version 100.4.0.
We have 2D map, i.e. no 3d-scenes.
Thaks in advance.