Hi Luke,
Thanks for reply. I'm using SDK 100.0 release in QtCreator
I followed the examples in GitHub. The simple marker is displaying for online source map, but im not getting the graphic marker in my local raster map file(tif). The Lat, Long values I',m adding in graphic point, but it is not displaying, may be I'm wrong in spacial reference. pls guide me
Below is my code,
void RasterLayerFile::componentComplete()
{
QQuickItem::componentComplete();
QString dataPath = QQmlProperty::read(this, "C:\Users\TAS\ArcGIS\Runtime\Data\raster").toString();
// find QML MapView component
m_mapView = findChild<MapQuickView*>("mapView");
m_mapView->setWrapAroundMode(WrapAroundMode::Disabled);
// Create a map using a raster layer
createAndAddRasterLayer(dataPath + "Map.tif");
}
void RasterLayerFile::createAndAddRasterLayer(QUrl rasterUrl)
{
QString dataPath = rasterUrl.toLocalFile();
Raster* raster = new Raster(dataPath, this);
RasterLayer* rasterLayer = new RasterLayer(raster, this);
Basemap* basemap = new Basemap(rasterLayer, this);
m_map = new Map(basemap, this); //Offlne Tif map
//m_map = new Map(Basemap::imagery(this), this); //Online Imagery map
m_graphicsOverlay = new GraphicsOverlay(this);
Graphic* redCircle = new Graphic(Point(12.973318, 77.640717, SpatialReference::wgs84()), this);
//Graphic* redCircle = new Graphic(Point(12.973318, 77.640717, SpatialReference::webMercator()), this);
SimpleMarkerSymbol* redCircleSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Circle, QColor("red"), 12, this);
redCircle->setSymbol(redCircleSymbol);
m_graphicsOverlay->graphics()->append((redCircle));
m_mapView->graphicsOverlays()->append(m_graphicsOverlay);
m_mapView->setMap(m_map);
}