[mapguide-users] Steps to query and zoom Mapguide layer on
Fusion?
Kori Maleski
kori.maleski at gmail.com
Wed Mar 24 18:59:16 EDT 2010
1)
>From in the task pane:
parent.zoomToExtents(minx,miny,maxx,maxy)
In your template index.html:
zoomToExtents: function (minx,miny,maxx,maxy) {
var a = [];
a[0] = parseFloat(minx);
a[1] = parseFloat(miny);
a[2] = parseFloat(maxx);
a[3] = parseFloat(maxy);
var mapWidget = Fusion.getWidgetById('Map');
mapWidget.setExtents(new OpenLayers.Bounds(a[0], a[1], a[2],
a[3]));
}
2)
>From in the task pane:
var mapWidget = parent.Fusion.getWidgetById('Map');
mapWidget.redraw();
3)
>From in the task pane:
var mapWidget = parent.Fusion.getWidgetById('Map');
var mapOL = mapWidget.oMapOL;
var mgLayers = mapOL.getLayersByClass('OpenLayers.Layer.MapGuide');
var mapguideLayer = mgLayers[0]
mapguideLayer.clearSelection();
mapguideLayer.removeQueryLayer();
var mapDef = 'Library://mymap.MapDefinition'
mapguideLayer.loadMap(mapDef);
etc...
Cheers,
Kori Maleski
On Wed, Mar 24, 2010 at 5:43 AM, Jose Cerrejon <gis at mapas-sll.com> wrote:
>
> I goes crazy with this. Remember I'm newbie in the fascinating world of JS
> OOP.
>
> Questions:
>
> 1) I've created a main.php inside taskpane (Fusion) without widget. Now I
> want to call any function to query a layer in mapguide (inside taskpane in
> Fusion) and zoomtoview. Any idea?
>
> 2) What's the magic frame to call the Refresh() function inside
> MapguideViewer.js? (I'm calling from taskpane iframe) Tried windows.top,
> windows.parent,...
>
> 3) Anybody can show me an example to make a call to any function in
> Mapguide.js?
>
> Thks to think.
>
> --
> View this message in context:
> http://n2.nabble.com/Steps-to-query-and-zoom-Mapguide-layer-on-Fusion-tp4790660p4790660.html
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20100324/b54a6c1b/attachment.html
More information about the mapguide-users
mailing list