Skip to content

Changes to the API in MapsAlive V4

Some API methods have been added, removed, or renamed in MapsAlive V4; however, most V3 functions are still supported and can be called without modifying existing JavaScript code.

Compatibility with MapsAlive V3

V4 uses a different naming convention for methods and callbacks than V3; however, the V3 convention still works.

The V4 and V3 conventions are shown below.

V4 API methods are access via the API object as shown in the following examples:

api.liveData.requestXml(60, "getemployee.php", "employeeId", id);
V4 callback function names begin with onEvent. For example:

V3 API methods start with mapsalive (all lower case) or maLiveData as shown in the following examples:

maLiveDataRequestHotspotXml(60, "getemployee.php", "employeeId", id);
V3 callback function names begin with maOn. V3 callback functions pass zero or more parameters as shown in the following examples:

Changes in V4

The table below lists API methods and callbacks that are new in MapsAlive V4. The V3 methods still work in V4. Methods and callbacks that are not listed have not changed.

V4 API method V3 API method
changeMarkerShapeAppearance changeMarkerNormalShapeAppearance
changeMarkerStyleAppearance New in V4
currentHotspot getCurrentHotspot
currentPage getCurrentPage
disableMarkerDrawing New in V4
drawAllMarkers New in V4
getElementByUniqueId New in V4
isSmallMobileDevice New in V4
getApi New in V4
getEvent New in V4
hotpots New in V4
liveData.flushCache flushLiveDataCache
liveData.requestData maLiveDataRequestHtml
liveData.requestHotspot maLiveDataRequestHotspotHtml
liveData.setCustomError maLiveDataSetCustomError
Not needed in V4 mapIsHtml5
media.pauseAudio stopSound
media.playAudio playSound
pages New in V4
playOrResumeAudio New in V4
reportErrors New in V4
restoreMarkerShapeAppearance restoreMarkerNormalShapeAppearance
restoreMarkerStyleAppearance New in V4
runSlideShow New in V4
setDefaultInstance New in V4
setHotspotUsesLiveData New in V4
setMapPan New in V4
showMarkerSelected setMarkerAppearanceNormal
setTourSetting New in V4
showHelpPanel New in V4
showNavPanel New in V4
waitingForLiveData New in V4
V4 Callback Function V3 Callback Function
onEventDirectoryEntryClicked maOnDirectoryEntryClick
onEventHotspotAction New in V4
onEventHotspotChanged maOnHotspotChanged
onEventLiveDataResponse maOnLiveDataResponse
onEventLiveDataResponseComplete New in V4
onEventPageLoaded maOnMapLoaded
onEventPageLoading New in V4
onEventPopupClosed maOnPopupClosed
onEventTourLoaded New inV4
Not needed in V4 maOnSoundManagerReady