Quantcast

en.json error in mobile viewer

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

en.json error in mobile viewer

SteveS
Hello,

For anyone who has tried the mobile viewer that comes with AIMS 2012, i'm getting an error when starting it up.

When I load the viewer firebug says \MobileViewer\localized\en.json is 404 file not found. I've looked that directory over and the file is definitely there. This leads to a "failed to load localized strings error" and the app hangs.

Seems like I'm missing something obvious, did anyone else encounter this?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: en.json error in mobile viewer

SteveS
Had to add a JSON mime type to IIS and that fixed it.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: en.json error in mobile viewer

SteveS
I'm actually getting errors galore trying to get this thing running. Documentation says all you have to do is modify the map it points to in the index.html file. I've done that, now I get various "syntax" errors in mobileviewerSF-compressed.js as well as the debugging version of that file, mobileviewer.js. I reference the lines in these files that javascript complains about and there are no syntax errors.

Firebug is giving me nothing.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: en.json error in mobile viewer

zspitzer
can u post some of the error messages?

sometimes firebug is flakey in which errors it reports,
also check the native firefox error console, as sometimes
errors only show up there and not in firebug

are there any 404's etc in the net panel?



On Thu, Dec 15, 2011 at 10:31 AM, tmblackflag <[hidden email]> wrote:

> I'm actually getting errors galore trying to get this thing running.
> Documentation says all you have to do is modify the map it points to in the
> index.html file. I've done that, now I get various "syntax" errors in
> mobileviewerSF-compressed.js as well as the debugging version of that file,
> mobileviewer.js. I reference the lines in these files that javascript
> complains about and there are no syntax errors.
>
> Firebug is giving me nothing.
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/en-json-error-in-mobile-viewer-tp7095108p7095545.html
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> _______________________________________________
> mapguide-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapguide-users



--
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: en.json error in mobile viewer

SteveS
2 problems I am seeing:

1) A javascript dialog box - "Error: Message: syntax error
File: https://milp2-dev.macerich.com/mapserver2012/MobileViewer/lib/mobileviewer.js
Line: 242." 'No syntax error found on that file/line.

2) Net tab has a "Get Index.html" Status = 304 not Modified.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: en.json error in mobile viewer

Jackie Ng
Try running javascript lint on that file or any of the other script files

http://www.javascriptlint.com/

It may pick up something.

- Jackie
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: en.json error in mobile viewer

Thomas Lorenzon
Hi Steve, try adding "?map=<yourmap.MapDefinition>" to mobileviewer URL.

For example: "http://yourserver/mapserver2012/mobileViewer/index.html?map=YourMap.MapDefinition"

Thomas

_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: en.json error in mobile viewer

SteveS
I'm further along and have the sheboygan sample map running. When trying to switch to my own map i get an:

Error: Message: invalid label
File: http://127.0.0.1/mapserver2012/MobileViewer/lib/mobileviewerSF.js
Line: 44430


This points to this function but doesn't help me much(I bolded the line with the error). I noticed the sheboygan map was in LL84 coordinate system so I switched to that with no luck.

mapDefinitionLoaded: function(response)
        {
                eval('this.mapDef = ' + response.responseText);
                if(this.mapDef)
                {
                        if(this.mapDiv && this.mapDiv.style)
                        {
                                this.mapDiv.style.backgroundColor = this.mapDef.backgroundColor;
                        }
                        this.createOpenLayersMap();
                        this.mgLayerLoaded = true;
                }
        },
Loading...