Quantcast
Channel: Geospecialling » Mapguide Enterprise
Viewing all articles
Browse latest Browse all 5

Mapguide 2011 Javascript error ‘OpenLayers.Lang’ is null or not an object

$
0
0

We’ve finally moved Mapguide Enterprise support back up the list of priorities for =)  The ability to add Google, Yahoo, and Bing data into the map with OpenLayers is very compelling.  So I’ve spent a little time (actually kind of a lot of time)  in the past little bit trying to get my Mapguide development environment setup.   To avoid cross site scripting (xss) errors when developing on my workstation I needed to install the web tier locally.   After muchos problems with license servers and the likes I came across an annoying javascript error whenever I would load a using  the local web tier:

   1: Line: 2
   2: Char: 2498
   3: Error: 'OpenLayers.Lang' is null or not an object
   4: Code: 0

Loading the web tier on the Mapguide server worked fine.  Very odd.  I ended up doing a file comparison between the two web tiers and noticed the only significant difference was this in the web.config:

   1: <staticContent>
   2:     <mimeMap fileExtension=".json" mimeType="application/json" />
   3: </staticContent>

Adding this tag to IIS 7 on Vista resulted in an error, the tag must be something new in IIS 7.5.  However, after manually adding the mime type mapping to the server – my flexible layout now loads perfectly on the local Vista web tier.SNAGHTML15f08bbe

This mime type mapping can be added on either the virtual directory, or the server level.  I chos to add it to the server.  Either way, to add it select the appropriate level in IIS manager.  In the right hand window double click “Mime Types”.  Click Add and you can enter the .json extension and the mime type.  Once this is added, Vista/IIS7 was now properly serving out flexible layers

 


Viewing all articles
Browse latest Browse all 5

Trending Articles