Just to follow up of the Link To View error: Webpage error details
Message: 'this.domObj.innerHTML' is null or not an object Line: 52 Char: 9 Code: 0 URI: http://squamish2010.ca/mapguide2010/fusion/widgets/LinkToView.js CODE: this.anchorLabel = json.Label ? json.Label[0] : (this.domObj.innerHTML ? this.domObj.innerHTML : 'Link to View'); GordonL wrote: > > Hi Mike, > I have added the following to the right-click menu: > <Item xsi:type="WidgetItemType"> > <Function>Widget</Function> > <Widget>LinkToView</Widget> > </Item> > > Now I get a javascript error: > > Error: 'this.domObj.nnerHTML' s not an object > > Line 2 > Char 569951 > > gordon > > > > > Mike Adair wrote: >> >> Yes that looks correct for the <Widget> part, but you also need >> something like this to add it to the toolbar: >> >> <Container xsi:type="UiItemContainerType"> >> <Name>Toolbar</Name> >> <Type>Toolbar</Type> >> <Item xsi:type="WidgetItemType"> >> <Function>Widget</Function> >> <Widget>LinkToView</Widget> >> </Item> >> ...... >> >> There should be some way for Studio to put that in, but I'm not sure >> how. You probably also need a label or icon for it in the <Widget> >> element. >> >> Mike >> >> GordonL wrote: >>> Thanks Mike, >>> here is what Studio 2010 automatically puts in the xml >>> >>> <?xml version="1.0" encoding="utf-8"?> >>> <WidgetType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"> >>> <Name>LinkToView</Name> >>> <Type>LinkToView</Type> >>> <Location /> >>> <Extension /> >>> </WidgetType> >>> >>> >>> >>> does this look correct? >>> >>> thanks >>> gordon >>> >>> >>> I think it is a matter of adding a <Widget> entry for it and an entry in >>> the toolbar <Container> in the AppDef. >>> >>> Mike >>> >>> GordonL wrote: >>> >>>> Hi Mike, >>>> I am playing with the "Link to View" widget. What is required to add >>>> it to the toolbar? Is there some documentation for it's use? >>>> >>>> thanks >>>> gordon >>>> >>>> >>>> It does capture map extent/scale and layer state. It doesn't capture >>>> the sessionid since that is likely to expire, it initializes the map >>>> from the MapGuide resource ID, rather than mapname and session. >>>> >>>> Mike >>>> >>>> GordonL wrote: >>>> >>>> >>>>> Hi Mike, >>>>> Does it capture current Map Scale and Layer State? >>>>> >>>>> Also, does it cupture current SESSIONID? >>>>> >>>>> thanks >>>>> gordon >>>>> >>>>> >>>>> >>>>> Mike Adair wrote: >>>>> >>>>> >>>>> >>>>>> Yes there is the LinkToView widget which provides bookmarking. It >>>>>> provides a labeled anchor tag with a link to the current mapview. >>>>>> >>>>>> Mike >>>>>> >>>>>> Chris Claydon wrote: >>>>>> >>>>>> >>>>>> >>>>>>> I think I saw some support for bookmarking go into Fusion 2.0. There >>>>>>> are >>>>>>> some developers from DM Solutions on this list that may be able to >>>>>>> provide more details... >>>>>>> >>>>>>> -----Original Message----- >>>>>>> From: [email protected] >>>>>>> [mailto:[email protected]] On Behalf Of GordonL >>>>>>> Sent: Saturday, March 14, 2009 2:56 PM >>>>>>> To: [email protected] >>>>>>> Subject: [mapguide-users] Bookmarking >>>>>>> >>>>>>> >>>>>>> Hi All, >>>>>>> I was wondering, has anyone seen a bookmarking tool (either FUSION >>>>>>> or >>>>>>> Basic >>>>>>> Web Layout)? >>>>>>> >>>>>>> I think there are different ways of doing this. >>>>>>> 1. I saw one solution that grabbed the URL of the web layout >>>>>>> (including >>>>>>> sessionid) but this expires... >>>>>>> >>>>>>> 2. I thought I could capture the map name, current scale, and the >>>>>>> current >>>>>>> layer visibility in the session and store to a database..then apply >>>>>>> these >>>>>>> parameters after the user logs in. >>>>>>> >>>>>>> 3. I thought I saw a FUSION demo that "save map" would store the map >>>>>>> permanently in the repository and just share it to everyone, but >>>>>>> does >>>>>>> anyone >>>>>>> know if this stored the current status (scale and layer visibility >>>>>>> status)???? >>>>>>> >>>>>>> The issue I have with all these approaches is that this requires >>>>>>> that the >>>>>>> web layout is customized to accommodate the passing of these >>>>>>> parameters... >>>>>>> it would be great if there were URL parameters (GET or POST) that we >>>>>>> can >>>>>>> pass the scale and layer status to the whole Web Layout (FUSION or >>>>>>> BASIC)... >>>>>>> >>>>>>> any feedback on how anyone worked through this issue would be great. >>>>>>> >>>>>>> thanks >>>>>>> >>>>>>> gordon >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> -- >>>>>> Michael Adair >>>>>> Senior Software Architect >>>>>> DM Solutions Group Inc. >>>>>> >>>>>> Office: (613) 565-5056 x26 >>>>>> [email protected] >>>>>> http://www.dmsolutions.ca >>>>>> http://research.dmsolutions.ca >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> mapguide-users mailing list >>>>>> [email protected] >>>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> -- >> Michael Adair >> Senior Software Architect >> DM Solutions Group Inc. >> >> Office: (613) 565-5056 x26 >> [email protected] >> http://www.dmsolutions.ca >> http://research.dmsolutions.ca >> >> >> _______________________________________________ >> mapguide-users mailing list >> [email protected] >> http://lists.osgeo.org/mailman/listinfo/mapguide-users >> >> > > -- View this message in context: http://n2.nabble.com/Bookmarking-tp2479346p3137851.html Sent from the MapGuide Users mailing list archive at Nabble.com. _______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users
