salut tout le monde !
En fait, je voulais paramétrer une URL correspondant à une static map en faisant comme suite;
QString maClasse::getUrl()
{
QString result;
QString endUrl = "&key=ABQIAAAAnfs7bKE82qgb3Zc2YyS-oBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSySz_REpPq-4WZA27OwgbtyR3VcA&sensor=false";
result = "
http://maps.google.com/staticmap?center=%1,%2&zoom=10&size=%3x%4&map type=mobile";
for(int i=0;i<listAgenceID.size();i++)
{
result.append("&markers=%1,%2");
}
result.append(endUrl);
result = result.arg(42.15,2.65,820,410);
for(int i=0;i<listAgenceID.size();i++)
{
//Récupération des latitudes et longitudes correspondant à chaque ID
result = result.arg(getLattitud(listAgenceID.value(i)),getLongitud(listAgenceID.value(i)));
}
return result;
}
Le problème est que la chaîne de caractère retournée contient des floats avec plein de chiffres après le virgule !!
Chaîne retournée :
"http://maps.google.com/staticmap?center=42.14999999999999857891452847979962825775146484375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,2.8026e-45&zoom=10&size=2.8026e-45x2.8026e-45&map type=mobile&markers=42.14999999999999857891452847979962825775146484375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,2.8026e-45&markers=42.14999999999999857891452847979962825775146484375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,2.8026e-45&markers=42.14999999999999857891452847979962825775146484375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,2.8026e-45&markers=42.14999999999999857891452847979962825775146484375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,2.8026e-45&markers=42.14999999999999857891452847979962825775146484375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,2.8026e-45&markers=42.14999999999999857891452847979962825775146484375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,2.8026e-45&markers=42.14999999999999857891452847979962825775146484375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,2.8026e-45&markers=42.14999999999999857891452847979962825775146484375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,2.8026e-45&markers=42.14999999999999857891452847979962825775146484375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,2.8026e-45&key=ABQIAAAAnfs7bKE82qgb3Zc2YyS-oBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSySz_REpPq-4WZA27OwgbtyR3VcA&sensor=false, 2.8026e-45
"
Merci d'avance pour votre aide et j'espère que j'été assez claire^^
Afficher la suite