I want to geocode the location and get the latitude and longitude in qml.But when i tried to do it iam getting ((QGeoTileProviderOsm: Tileserver disabled at QUrl("http://maps-redirect.qt.io/osm/5.8/satellite") error How to resolve it
Unsolved
General and Desktop
-
import QtPositioning 5.2
import QtQuick.Window 2.2
import QtLocation 5.3
import QtLocation 5.11Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")Plugin { id: mapPlugin name: "osm" } Map { id:map anchors.fill: parent plugin: mapPlugin center: QtPositioning.coordinate(21.7679, 78.8718) zoomLevel: 14 } GeocodeModel { id: geocodeModel plugin: map.plugin onStatusChanged: { if ((status == GeocodeModel.Ready) || (status == GeocodeModel.Error)) map.geocodeFinished() } onLocationsChanged: { if (count == 1) { map.center.latitude = get(0).coordinate.latitude console.log("The new latitude is ",map.center.latitude) map.center.longitude = get(0).coordinate.longitude console.log("The new longitude is ",map.center.longitude) } } }
}
-
@Ashok-Kumar
In future, please refrain from double posting and from using a super long question as the topic title! -
@Ashok-Kumar said in I want to geocode the location and get the latitude and longitude in qml.But when i tried to do it iam getting ((QGeoTileProviderOsm: Tileserver disabled at QUrl("http://maps-redirect.qt.io/osm/5.8/satellite") error How to resolve it:
Tileserver disabled
i have the same message but,
I'm not sure this is an error since everything seems to work correctlyif you want to show latitude and longitudes use onCenterChanged signal from Map
Map { onCenterChanged: console.log(center) }