The Mapping Component and Sage CRM v7.3

If your customers like, and use, the Mapping Component, you may encounter an issue when upgrading them to 7.3.

The component as it currently stands uses its own jquery library file, and a local copy of the OpenLayer api & style sheet. Both of these can conflict with the new UI in 7.3 and as a result, the mapping component doesn’t work properly, and it also causes issues with the CRM Interface.

The fix for this is quite simple and will require a slight change to the main mapping component ASP page (MapsTab.asp).

The first thing to do is to remove any references to local jquery and the openlayer javascript file. The following lines in the MapsTab.asp should be commented out:

CRM.AddContent('<script src="jquery.js"></script>');

CRM.AddContent('<script src="OpenLayers.js"></script>');

Now we need to add the script pointer the OpenLayer API. You can either uncomment this next line, or add it if it is missing.

CRM.AddContent('<script src="">www.openlayers.org/.../OpenLayers.js"></script>');

This script source will also provide the stylesheet used by the maps.

Once this has been done, the mapping component will start to regain functionality however it still does not render properly on the screen.

To get the rendering fixed, we have to override part of the OpenLayer API stylesheet. The MapsTab.asp page already applies some local style elements so we need to extend this with the following style:

.olMap {

position: relative !important;'

padding: 10px !important;'

width: 100% !important;

height: 100% !important;

}'

This worked for us so I hope it can and will work for you.

There are also some other tweaks that may need to be made so that buttons and text boxes are displayed correctly but you can adjust these to suit your implementation.

Attached to this post is zip file containing my working copy of this ASP page.