MGOS 2.1 beta. I think your current work around is probably fine.
fusion in its place. As fusion does not ship with the mapguide
mapguide from the original fusion to the newly installed one. Not
>
> Hi Paul,
> I have this code in my MapGuideViewerApi.js. I see that there is a
> beta
> version of fusion but I don't know how version I have. How I can get
> this
> info ( I work with MG Enterprise 2010)?
> Thanks
> Matteo
>
>
>
>
> Paul Spencer-2 wrote:
>>
>> Ah I see the problem now. CanvasTool is designed as a mixin class
>> for
>> widgets to provide client-side rendering services. Each widget
>> provides a getMap method which is available to the CanvasTool
>> methods. When CanvasTool is used by the MapGuideViewerApi.js
>> methods,
>> it is created directly (not as a mixin for Widget) and hence has no
>> getMap() method.
>>
>> In MapGuideViewerApi.js in fusion distributed with MGOS 2.1 beta
>> around line 176, there is this:
>>
>> Fusion.Tool.Canvas.prototype.getMap = function() {
>> return Fusion.getWidgetById(mapWidgetId);
>> }
>>
>> which should, theoretically, be doing the same thing you are doing by
>> modifying CanvasTool.js directly. Does the version you have include
>> this definition? If not, can you try adding the above to
>> MapGuideViewerApi.js (anywhere will do) and removing your change to
>> CanvasTool.js and see if it still works?
>>
>> Cheers
>>
>> Paul
>>
>>
>> On 3-Jul-09, at 3:05 AM, Matteo wrote:
>>
>>>
>>> Hi Paul,
>>> I give the same error in IE and Firefox. The file CanvasTool.js
>>> don't
>>> have a getMap function so to resolve the problem I must add this
>>> function to
>>> the file
>>>
>>> getMap: function() {
>>> var map=this.oMap;
>>> if (typeof(map) == "undefined"){
>>> map=this.map;
>>> }
>>> return map;
>>> },
>>>
>>> Now works fine
>>> Regards Matteo
>>>
>>>
>>>
>>> Paul Spencer-2 wrote:
>>>>
>>>> It seems like your template is using the single file, compressed
>>>> build
>>>> of Fusion ... which is singularly unhelpful for debugging problems
>>>> since the code is stripped down. You need to change the template's
>>>> index.html file to using fusion.js instead of fusionSF.js (or
>>>> whatever
>>>> it is) and then we might get some more helpful errors.
>>>>
>>>> What web browser are you using? IE? Do you get the same error in
>>>> other browsers (i.e. Firefox)
>>>>
>>>> Paul
>>>>
>>>> On 2-Jul-09, at 8:27 AM, Matteo wrote:
>>>>
>>>>>
>>>>> Hi,
>>>>> I try to develop an application with Fusion for draw some object.
>>>>> When I
>>>>> call the digitize function of MapGuideViewerApi.js (ex
>>>>> DigitizePolygon) I
>>>>> get an error on activateCanvas function at this line
>>>>> var C=this.getMap()
>>>>> Can you help me?
>>>>> Regards Matteo
>>>>> --
>>>>> View this message in context:
>>>>>
http://n2.nabble.com/MapGuide-Ent-2010%3A-Fusion-and-digitize-error-tp3194766p3194766.html>>>>> Sent from the Fusion Users mailing list archive at Nabble.com.
>>>>>
>>>>> _______________________________________________
>>>>> fusion-users mailing list
>>>>>
[hidden email]
>>>>>
http://lists.osgeo.org/mailman/listinfo/fusion-users>>>>
>>>>
>>>> __________________________________________
>>>>
>>>> Paul Spencer
>>>> Chief Technology Officer
>>>> DM Solutions Group Inc
>>>>
http://research.dmsolutions.ca/>>>>
>>>> _______________________________________________
>>>> fusion-users mailing list
>>>>
[hidden email]
>>>>
http://lists.osgeo.org/mailman/listinfo/fusion-users>>>>
>>>>
>>>
>>>
>>> --
>>> View this message in context:
>>>
http://n2.nabble.com/MapGuide-Ent-2010%3A-Fusion-and-digitize-error-tp3194766p3199859.html>>> Sent from the Fusion Users mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> fusion-users mailing list
>>>
[hidden email]
>>>
http://lists.osgeo.org/mailman/listinfo/fusion-users>>
>>
>> __________________________________________
>>
>> Paul Spencer
>> Chief Technology Officer
>> DM Solutions Group Inc
>>
http://research.dmsolutions.ca/>>
>> _______________________________________________
>> fusion-users mailing list
>>
[hidden email]
>>
http://lists.osgeo.org/mailman/listinfo/fusion-users>>
>>
>
> --
> View this message in context:
http://n2.nabble.com/MapGuide-Ent-2010%3A-Fusion-and-digitize-error-tp3194766p3251856.html> Sent from the Fusion Users mailing list archive at Nabble.com.
> _______________________________________________
> fusion-users mailing list
>
[hidden email]
>
http://lists.osgeo.org/mailman/listinfo/fusion-users