[mapguide-users] Session Map and Settings Serverside

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Fri Jan 9 02:38:56 EST 2009


I think it does refresh the legend.
But not everything is refreshed, see this:
http://trac.osgeo.org/mapguide/ticket/167

The map frame has the function "GetLegendCtrl()" even though it is not 
documented.

Regards, Kenneth Skovhede, GEOGRAF A/S



Rock Beans skrev:
> Is there a GetLegendFrame() viewer command? There seems to be one for
> everything else. I need to refresh Legend and I don't want to hard
> code but if needed will do. I got the map doing what I want with
> layers and scale. Then call ZoomToView with refresh = true. That
> should in my mind refresh the legend tooooooo. Why does it not?
>
> On Thu, Jan 8, 2009 at 3:48 PM, Kenneth Skovhede, GEOGRAF A/S
> <ks at geograf.dk> wrote:
>   
>> No, that value is only present in the client.
>>
>> It would be difficult to detect the scale value if you were drawing multiple
>> maps,
>> eg. a "real" map, a print preview and an overview map.
>>
>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>
>>
>> Rock Beans skrev:
>>
>> Thanks I got the layer control figured out now. I wish you could set
>> the map.viewscale= is the only thing. I would still have to do a
>> Javascript refresh. So this ZoomToView(x, y, scale, refresh) might be
>> just as good either way. Is there a way to set the scale serverside
>> using the map object?
>>
>> Thanks!
>>
>> On Thu, Jan 8, 2009 at 3:39 PM, Kenneth Skovhede, GEOGRAF A/S
>> <ks at geograf.dk> wrote:
>>
>>
>> What do you mean when you say that "visible" is read only?
>> You can use the "getVisible()" and "setVisible()" functions to set layer
>> visibility.
>>
>> An example here:
>> http://discussion.autodesk.com/forums/thread.jspa?threadID=629000&tstart=75
>>
>> The "Session:xxx//MapName.Map" is an almost empty placeholder document.
>> The document has a binary object attached, which is what you modify with
>> operations like the above.
>> You probably don't want to go there.
>>
>> AFAIK, the map center and scale values are only stored in the client (aka:
>> javascript).
>> So you have to use the Viewer API to get/set those values.
>> (The DWF viewer may be different)
>>
>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>
>>
>>
>> Rock Beans skrev:
>>
>>
>> I can use the API to get layer information like what is turned on and
>> off but I can't set visible since it is read only. It would be nice if
>> you could just make the changes there save and issue a javascript map
>> refresh. What is the best method for remembering the last location
>> viewed and returning to the location with a click of a button. I
>> really want to stay away from the viewer API if at all possible except
>> for the refresh of course.
>>
>> I first thought I could just go layer.visible=false... no go
>> Then I played with Session:xxx//MapName.Map with SetResource... is
>> this the best route?
>>
>> Any ideas?
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
>>
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
>>
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
>>     
> _______________________________________________
> 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/20090109/7f840eea/attachment.html


More information about the mapguide-users mailing list