#1 Sun 12 June 2011 23:49
- FranckZ
- Juste Inscrit !
- Date d'inscription: 6 Feb 2009
- Messages: 8
[Mapguide os] widget search donne un zoom 1:1
Bonjour,
je bloque sur l'utilisation du widget search avec fusion. Je souhaiterais paramétrer le niveau mini du zoom effectué suite à une recherche grâce au widget search. J'ai testé plusieurs solutions comme insérer ce code dans le search.templ mais cela ne donne rien :
function CellClicked(sel)
{
GetParent().SetSelectionXML(sel);
GetParent().ExecuteMapAction(10);
var initTimer = setInterval(waitForMap, 200);
// Wait for the map to be initialized.
function waitForMap ()
{
try
{
// The Refresh method will exist when the
// map has been initialized.
if (GetParent().mapFrame.Refresh)
{
clearInterval(initTimer);
var x= GetParent().mapFrame.GetCenter().X;
var y= GetParent().mapFrame.GetCenter().Y;
parent.parent.mapFrame.ZoomToView(x,y,5000,false);
}
}
catch(Exception) {}
}
}
ensuite, autre test à partir d'un billet (http://sandbox.mapguide.com/index.php/S … imum_scale) mais qui ne donne rien:
In Fusion you can modify the minscale value (about line 284) in the LoadMap.php in the fusion\layers\MapGuide\php folder and this appears to do the trick.
quelqu'un aurait une solution svp, merci !!!
Hors ligne