VisioWeb2D 1.8.0

Class

CHANGELOG WEB2D SDK

Here you will find the change log for the VisioWeb2D SDK, i.e in vg.mapviewer.web2d.js and vg.mapviewer.web2d.css See CHANGELOG WEB2D SAMPLE for changes in the sample code.
VisioWeb2D-1.8.0, 2016/11/30
---------------------------------
[renamed] VisioWeb into VisioWeb2D to distinguish it from the new VisioWeb (ex-VisioKiosk)

VisioWeb-1.7.24, 2016/10/05
---------------------------------
[fixed] Calling mapviewer.once('initializeCompleted',...) inside a handler mapviewer.once('initializeCompleted',...)
 would not be called (this only applies to sticky triggers). (#7841)
[fixed] Routing from same start and destination gives an error, should return a simple route (#6945)
[fixed] Routing to/from a position does not work (#7901)
 
[added] Support for building models generated from VisioMapEditor (as opposed to ones designed by hand) (#7647)
[added] Support for background specified from VisioMapEditor (#6912)

VisioWeb-1.7.22, 2016/05/20
---------------------------------
[fixed] mapviewer.off() always removed the first handler of that type. (#7818)
[fixed] mapviewer.getViewpointFromPositions() would change camera's altitude/zoom when only one position
        (or an array of identical positions) is provided.

[added] API mapviewer.once(), similar to mapviewer.on() but removes handler after first execution
        reduces memory consumption and simplifies removing handler. (#7657)
[added] API mapviewer.getFootprints(), to be able to obtain all available footprints. (#7819)
[added] API mapviewer.getPoints(), to be able to obtain all available point data. (#7819)

VisioWeb-1.7.21, 2016/04/27
---------------------------------
[added] mapviewer.camera.position and camera.goTo can take position without radius, eg. ...position = {x:0,y:0} (#7753)

VisioWeb-1.7.19, 2016/03/11
---------------------------------
[fixed] POI.remove() makes unavailable other POIs with the same id via mapviewer.getPoi(). (#7440)
[fixed] calling mapviewer.removePostRenderListener() from a postRenderListener could pose a problem in certain cases. (#7514)

[added] API mapviewer.animateValue() to match the same API of VisioKiosk, can be used to animation positions or any value.
        (#7510)
[added] API mapviewer.requestRedraw() to draw new frame and trigger postRenderListener listeners. (#7811)
[added] API mapviewer.getPoint() and mapviewer.getFootprint() also return .floor attribute. (#7629)
[added] POI.options can take attribute object poi.options({text: 'toto', visible: true}) as well as poi.options('text','toto').
        (#7634)
[added] mapviewer.setPlaceName()/setPlaceIcon() can take options object like {text: 'toto', visibilityRampStartInvisible: 500})
        This can make labels visible when close, thus increasing frame rate. (#7635)
[added] callback mapviewer.addPostRenderListener can be also accessed via mapviewer.on('redraw',function) API. (#7658)

[update] API mapviewer.trigger can send sticky notifications, these notifications will be transmitted to any .on
         handler registrations done later, this applies to 'resize', 'initializeCompleted' and 'initializeFailed' notifications.
         Any mapviewer.on('initializeCompleted') will be called on success. (#7546)
[update] API mapviewer.computeRoute, parameter: pRouteRequest.navigationParameters.firstNodeAsIntersection (default false)
         Treats the first node (not the start) of the first instruction as an intersection after the start or a waypoint,
         used to force the generation of an instruction turn right or left when you leave a POI. (#7640)

[fixed] Pan does not work on Windows 10 Mobile (fixable by updating only vg.mapviewer.web.css). (#7609)


Migrating from 1.7.18 to 1.7.19
- update vg.mapviewer.web.js if you want to use the new APIs
- See CHANGELOG_WEB_SAMPLE for sample changes.

Known issues
- addPOI of type .url or .text is visible regardless of zoom and does not have options.visibilityRampStartInvisible (#5533)
- setPlaceName, setPlaceIcon are not always centered on the shape, and are not centered (uses top left corner).  You may use .vg-setplacename CSS class to restyle some these labels.  See documentation.
- on IE8 one cannot click on the toggle handicap routing or instructions. (#7701)

VisioWeb-1.7.18, 2016/01/05 (hotfix)
---------------------------------
[update] queryNearPlaces documentation.

VisioWeb-1.7.18, 2015/12/22
---------------------------------

[added] mapviewer.computeDistance(point1,point2) to compute distance in meters between two points. (#7411)
[added] mapviewer.getRoutingNode(position...) result contains .position which is the original position and .routePosition
        which is position on routing network. (#7412)
[added] mapviewer.getRoutingNode(id...) result contains .id which is poiID, which can be used after a computeRoute
        to determine that the routeParameters.dst[3] corresponds to poiID routeParameters.dst[3].id, (#7412)
[added] mapviewer.getRoutingNode() result contains .floorName to determine exact layer of routing node. (#7412)
[added] mapviewer.computeRoute result has .destinationIndices to quickly find out the actual visit order or closest destination.
        (#7413)
[added] mapviewer.computeRoute destinationOrder 'closest' to compute the closest (be fastest or shortest) among many destinations.
        (#7413). For example:
        mapviewer.computeRoute({src: 'B2-UL0-ID0087',
                                dst: ['B4-UL05-ID0028','B4-UL05-ID0027','B4-UL05-ID0029'],
                                destinationOrder: 'closest'})
                              .done(function(request,data){
                                  console.log('The closest place is '+ request.dst[ data.destinationIndices[0] ] );
                               })
[added] mapviewer.computeRoute navigation part of result contains the original route in attribute .route, used in conjunction
        with the destination index allows to determine the id of intermediate destinations. (#7419)
[added] mapviewer.computeRoute result contains .request which contain the request parameters for the route, useful for
        determining the destinations (attribute request.dst), this allows to easily determine the poiID of different
        destinationIndices. (#7419,#7424)
[added] mapviewer.queryNearPlaces(position, parameters)  array {.id, .distance, .angle} of places near that position. (#7422)
[added] mapviewer.on('resize', function(ev) { ev.args.mapWidth, ev.args.mapHeight}) allows you to listen to map size changes. (#7423)

Migrating from 1.7.17 to 1.7.18
- update vg.mapviewer.web.js if you want to use the new APIs
- See CHANGELOG_WEB_SAMPLE for sample changes.


VisioWeb-1.7.17, 2015/11/18
---------------------------------
This version introduces Multi-Building Sample!

[added] API mapviewer.computeRoute, new parameter: pRouteRequest.routingParameters.remapResultingModality
        Allows you to remap a modality, like "Travelator", or "vipline" to say "pedestrian" to avoid generating
        extra routing segments, and routing instructions for getting on and off a modality. (#7293)
[added] API mapviewer.computeRoute, new parameter: pRouteRequest.navigationParameters.algorithm='auto']
        by default 'auto', otherwise 'originalAlgorithm' or 'intersectionAlgorithm'
        'auto' will use 'intersection' algorithm where the intersections are explcitly described by the map if
        the 'intersection' attribute exists on the map (see mapviewer.getRoutingAttributes())
        otherwise it will use the 'original' algorithm. (#7293)
[added] API mapviewer.computeRoute, new parameter: pRouteRequest.navigationParameters.firstNodeAsIntersection (default false)
        Treats the first node (not the start) of the first instruction as an intersection,
        used to force the generation of an instruction turn right or left when you leave a POI. (#7293)
[added] API mapviewer.getExtraData(), which returns any extra data embedded in the map, like venue layout for Multibuilding.
[added] API POI.options to be able to retrieve the id of a POI, as well as to be able to change its position. (#7383)
[added] API Floor.setEnabled(),isEnabled(),setContentEnabled(),isContentEnabled. (#7340)
[added] API mapviewer.getPoi() and mapviewer.getPois(). Note: Pois on the map since they are "baked" on the map
        are available via the getAllPlaces() API. (#7364)
[added] mapviewer.addPOI option.clickable, if set to false, it will not call any onObject functions when clicking/mouseover the object. (#7365)


[fixed] Only on multi-point routes: Individual instruction.time not correct for instructions not belonging to first destination)
        Instruction.totalTime not correct, although route.duration is correct. (#7313)
[fixed] if mapviewer.on() handler returns false, it will not call other .on handlers or event handler (in the case of "mouseup" and "floorWillChange")
        mapviewer.trigger() return false, if any handler returned false. (#7330)
[fixed] mapviewer.trigger() returns false, if any handler returned false. (#7330)


[update] mapviewer.computeRoute() updated default navigation parameters:
         mergeFloorChangeInstructions is now default to true and
         modalityParameters..straightAngleThreshold is set to 30
         modalityParameters..nearPlacesThreshold to 10
         to reduce number of instructions. (#7343)
[update] mapviewer.computeRoute() documentation
[update] MyNavigation.js to use the navigation parameter for mergeFloorChangeInstructions that was used by the system.
         this parameter has to match to generate the proper navigation instruction translation.
[update] MyRoute.js add_go_back_pois (new default false, shows POI to be able to click the floor the route comes from). (#7337)
[update] MyNavigation.js to see whole instruction, and hook for multibuilding for better stepping through instructions, fixed minor bug cStringTable without this
         as well as handling Waypoints when using mergeFloorChangeInstructions. (#7386)

Note:
3D models on the map are rasterized as an image.  They are not clickable, like an Icon could be if it has an ID.  In order to make it clickable
you would need to add a footprint with the same name, and do a manual intersection or add a hidden surface.  The former is what is done for making
the buildings clickable in the multi-building example.

Migrating from 1.7.16 to 1.7.17
- update mapviewer.web.js
- navigation parameters: the default value for mergeFloorChangeInstructions has changed.
  If you do nothing, this change will not take into effect since this value is set already in
  mapviewer.common.js to false.
  mapviewer.common.js has been updated not to set these values and let the system use the defaults.
  MyNavigation.js has been updated so it can use the value that was used by the SDK (regardless of default or passed in).
  If you want to take advantage of this update both mapviewer.common.js and MyNavigation.js.
- MyRoute.js can be updated to avoid having certain POIs show a bubble when clicked.


Tested on:
- Windows Phone 8.1 Update 2 Lumia 640 IE OK
- Windows XP IE8 OK (module some CSS icons)
- Windows 10, Edge, 20.10240.16384.0 on Touch Screen, OK
- Windows 10, IE11 11.0.10240.16431 on Touch Screen, OK
- Windows 8.1 IE11 11.0.9600.17905, on Touch Screen, OK
- Firefox 42.0, MacOSX 10.11.1, OK
- Chrome 46.0.2490.86 (64-bit), MacOSX 10.11.1, OK
- Safari 9.0.1 (11601.2.7.2), MacOSX 10.11.1, OK (small lines while dragging)
- Windows 7, SP1  IE11 11.0.9600.18059 desktop, OK
- Windows 8.1 no service pack, IE11 11.0.9600.18053 desktop, OK
- Safari iOS 9.1 (13B143), OK
- Android 4.4.4 Nexus 7, Chrome 35.0.1916.141, OK

VisioWeb-1.7.16, 2015/10/07
---------------------------------
[added] API mapviewer.camera.heading, read-only, exists for compatibility with VisioKiosk. (#7277)
[added] API mapviewer.offsetPosition and mapviewer.computeHeadingAngle, which allows to determine if points are behind/left/right/in front of others. (#7280)

Migrating from 1.7.15 to 1.7.16
- just update mapviewer.web.js, nothing that applies to VisioWeb to update on the sample.

VisioWeb-1.7.15, 2015/09/18
---------------------------------
[added] Support for routes with multiple waypoints.
        Use an array for routeParameters.dst
        Use routeParameters.destinationOrder = 'inOrder'|'optimal'|'optimalFinishOnLast'. (#7131)
[added] Download maps via new map descriptor that allows the SDK to validate the map as
        well as easily implement your own map downloading scripts with full .zip downloading
        as well as map timestamp checking. Can also check other conditions like
        if the map format is too old, too new. (#7130)
[added] API .convertScreenToPoint and .convertPointToScreen.
        Useful to finding out where a point on the map would appear on the screen and vice-versa. (#7166)
[added] API .getRoutingNode now returns a RouteNodeObject or false.
[added] API .minimumDataSDKVersion allows to test if SDK can read data or if it has been deprecated (futureproofing). (#7198)
[added] API .sdkType which returns 'web2d'
[update] SDK and Sample uses jQuery 1.11.3

Sample mapviewer.web.js:
[update] Separated common code with mapviewer.kiosk.js into mapviewer.common.js
[update] removed *_stairs_up.png -> *_up.png (MyRoute.js and navigation icon).  Removed files track_stair_[down|up].png and transit_instruction_stairs_[down|up].png. Note the icon name in the navigation instructions changed, thus make sure you have transit_instruction_down.png and transit_instruction_up.png in your media. (#7135)
[update] MyRoute.js to check if mapviewer.addRoutingPath succeeded before saving the path.
[fixed] Sample download progress bar.

Note: The maps are now loaded via standard AJAX using Cross-Origin Resource Sharing (CORS).
For increased security, the maps should be hosted on an HTTPS site.

Migrating from 1.7.14 to 1.7.15
- just update mapviewer.web.js, like always you are not required to update the example.
- if you want to take advantage of the multi-point routing, you will have to merge the changes to
  MyRoute.js as well as mapviewer.common.js
- to take advantage of the new map description, you need to have your map properly configure
  to publish using this format, and just update your mapURL.

VisioWeb-1.7.14, 2015/06/03
---------------------------------
[added] API mapviewer.on,.off, and .trigger to be notified of certain events:
        routeComputed,initializeCompleted,initializeFailed,floorWillChange,floorChanged,mouseup. (#7044)

[update] tweaked navigation instructions html/css.
[update] refactored use of updateActiveFloorLabel, by using mapviewer.on('floorChanged'...)
         avoids having this all places the floor changes.

[added] API mapviewer.getFootprint() to recover a POI footprint.
        API mapviewer.getPoint() to recover a POI point information.
        needs sdk.web2d=1.7.14 version on VisioMapEditor. (#7020)
[fixes] Clicking on image on visioweb does not have the right center. (#7045)

Sample mapviewer.web.js
[update] uses local dataset, make sure for producation you update the mapURL with your map.
[update] on IE8 hide zoom buttons.
[update] MyRoute.js to display a thicker track.

Migrating from 1.7.12 to 1.7.14
- just update mapviewer.web.js, like always you are not required to update the example.
- though we can recommendto compare the performance of your code and that of the sample
  the sample has been slightly optimized, e.g. string = a + b + c ==> string = [a,b,c].join('')
  the sidebar has been completely removed on the web samples, and the code has been updated to avoid
  updating the sidebar which is not optimal for mobile devices.


Tested on:
- Windows XP IE8 OK
- Chrome 43.0.2357.81 (64-bit), MacOSX 10.10.3, OK
- Windows Phone 8.1 Update 2 Lumia 640 IE OK
- Safari iOS 8.1.3, OK
- Safari 8.0.6 (10600.6.3), MacOSX 10.10.3, OK
- Firefox 38.0.5, MacOSX 10.10.3, OK
- Windows 8.1 IE11 11.0.9600.17801, OK


VisioWeb-1.7.11, 2015/03/27
---------------------------------

[added] API Camera.getBoundary, .setBoundary, initial boundary prevents moving map off screen. (#6710)
[added] mapviewer.camera.panManipulatorEnabled to turn on/off pan/drag manipulation (#6887)
[fixed] mapviewer.web.js doing routes to pois with IDs containing '.'. (#6872)
        jQuery('option[value='+query.src+']',...==> jQuery('option[value="'+query.dst+'"]'
[fixed] mapviewer.camera.zoomManipulatorEnabled to turn on/off any kind of zooming manipulation (#6887)
[fixed] local coordinate system, y used to move from left to right.  see note below. (#6897)


Migrating from 1.7.10 to 1.7.11
- Nothing special, if your IDs contain '.', you may need to update mapviewer.web.js
  jQuery('option[value='+query.src+']',...==> jQuery('option[value="'+query.dst+'"]'
- If you use local coordinates (like {x: 0.123, y: 0.456}) you will need to update them.

NOTE: the local coordinate system has changed
  <1.7.11: x,y: (0,0) top left corner, (0,1) top right, (1,0) bottom left
   1.7.11: x,y: (1,0) top left corner, (1,1) top right, (0,0) bottom left
   to convert to new from old:
   newX = oldY
   newY = 1 - oldX

Tested on:
- Windows 8.1 Pro 32bit 5 touch points 11.0.9600.17498, OK
- Windows 8.1 Pro 32bit 5 touch points Chrome 41.0.2272.101, OK
- Chrome 41.0.2272.104 (64-bit), MacOSX 10.10.2, OK
- Safari 8.0.4 (10600.4.10.7), MacOSX 10.10.2, OK
- Safari iOS 8.1.3, OK
- Chrome Android 4.0, OK
- Firefox 36.0.4, MacOSX 10.10.2, OK
- Windows 7 IE11 11.0.9600.17498, OK
- Windows Phone 8.1 IE (OS version 8.10.12219.341), OK


VisioWeb-1.7.10, 2015/03/06
---------------------------------

IMPORTANT: the mapURL for the sample Visio Island data set for VisioWeb2D has been updated:
new mapURL = '//mapmanager.visioglobe.com/public/web2d15037fdebfd/content/map.tiles.json'


[added] Offline routing (active if getRoutingURL() returns '#javascript'). (#6829)
        Route data now contains .duration
[added] getRoutingNode(), getRoutingModalities(), getRoutingAttributes() API. (#6835)
[added] mapviewer.initialize() parameters mapContentString/mapContentDirectory that allows developer
        to manage the downloading of the map, and pass the map content directly to SDK. (#6825)
[added] mapviewer.getFloors()'s floorInfo object jas .heightMin and .heightMax when available. (#6814)
[added] navigationParameters.modalityParameters.shuttle.straightAngleThreshold = 180.0 in sample code
        reduces to one the number of instructions for shuttle modality.
[added] mapviewer.addPOI() can take .height and .width into account when using .url icons. (#6839)
[added] MyRoute getInitialFloor(), getInitialViewpointPosition() which can allow you to see
        the whole segment on the route on the initial floor.
[update] documentation of mapviewer.addRoutingPath() to require 2 points or more.
[update] example mapviewer.web.js openPlaceBubble() to disable "Set Origin"/"Set Destination" is place is not routable.
[update] MyNavigation.js with MyNavigationTranslation class to handle English and French offline navigation instructions. (#6841)
[update] navigation parameters straight angle threshold to 30 to reduce number of instructions
         controlled from within mapviewer.web.js
[fixed] mapviewer.mobile.web.html when dealing with floor name 0.
[fixed] mapviewer.addPOI() using alignment and url: alignment was not properly taken into account. (#6815)

Migrating from 1.7.9 to 1.7.10
- minimum update vg.mapviewer.web.js
- if necessary, there are many small changes in mapviewer.web.js
- update MyNavigation.js if you use routing/navigation for offline routing (lots of changes)
- MyRoute.js contains new methods


Tested on
- Windows XP, IE8, OK (with all the limitations of IE8)
- Chrome 41.0.2272.76 (64-bit), MacOSX 10.10.2, OK
- Safari 8.0.3 (10600.3.18), MacOSX 10.10.2, OK
- Safari iOS 8.1.3, OK
- Chrome Android 4.0, OK
- Firefox 36.0.1, MacOSX 10.10.2, OK
- Windows 7 IE11 11.0.9600.17498, OK
- Windows 8.1 Pro 32bit 5 touch points 11.0.9600.17498, OK
- Windows Phone 8.1 IE OK

VisioWeb-1.7.9, 2014/12/10
---------------------------------
[update] The navigation instruction css for mobile (mapviewer.web.mobile.html) in order to better fit on the screen.
         It uses MyNavigation.mobile.css
[update] The individual change_floor buttons for mobile (they take up too much room on mobile) with +/- buttons.
[update] mapviewer.initialize().fail(result) takes an argument, with result.message possibly having information about
         the error (#6595)
[fixed] Bug where IDs containing '.' caused errors when choosing Origin or Destination in mapviewer
[fixed] Bug with Chrome (only Chrome at least version 39.0.2171.71) where highlights where not in right position.
	(#6622)

VisioWeb-1.7.8, 2014/08/29
---------------------------------
[fixed] Bug where labels would not have the right orientation while being set and the map zoomed in (#6330)
[update] File format, oriented labels will no longer work on VisioWeb-1.7.7 (#6331)
[update] Support for next file format version handling.

Migrating from 1.7.6 to 1.7.8
- just update vg.mapviewer.web.js, nothing else has changed.

VisioWeb-1.7.7, 2014/08/07
---------------------------------
[added] Support for maps with oriented (angled) labels.  Available on modern browsers (#6254).
NOTE: not available on IE8 and other older browsers.

Migrating from 1.7.6 to 1.7.7
- just update vg.mapviewer.web.js, nothing else has changed.

VisioWeb-1.7.6, 2014/07/11
---------------------------------
[rename] Product renamed VisioWebKitTiled -> VisioWeb to better reflect target devices and not technology
[rename] vg.mapviewer.tiled class to vg.mapviewer.web
[rename] mapviewer.* -> mapviewer.web.*
[fixed] mapviewer.addRoutingPath handling of certain parameters: e.g. visible=false (#6178)
[fixed] clicking on bubble close button would highglight shop behind (needed to return false on jQuery handler, #6208)

[fixed] labels are now centered.  (#5273)
        see documentation mapviewer.initialize options onObjectMouseOver for more information about callbacks
        see documentation mapviewer.addPOI options.text for more information about CSS changes for .vg-setplacename
        NOTE: they are not centered for browsers that don't support "pointer-events: none", like IE8, IE9 and IE10.
[update] documentation on setPlaceIcon, the options for width and height should not use 'px' and icons are now centered
[fixed] instructions text is no longer selectable, annoying on touch devices (#6221)
[fixed] floors labels are updated when changing floors via change floor pins on routes (#6224)

NOTES: the string of addPOI's text and setPlaceName's label are placed on the map UNESCAPED.

Known issues
- addPOI options.text not centered.

Migrating from 1.7.4 to 1.7.6
- replace your include script file from vg.mapviewer.tiled.all.js to vg.mapviewer.web.js
- replace your include css file from vg.mapviewer.tiled.css.js to vg.mapviewer.web.js


VisioWebKitTiled-1.7.5, 2014/03/21
---------------------------------
[update] jQuery updated to 1.7.2
[update] example shows route from/to in a bubble
[update] example's initial floor can be activated via url e.g. mapviewer.html?initialfloor=2
[update] vg.mapviewer.web.all.js easier to wrap for requirejs if needed

VisioWebKitTiled-1.7.4, 2014/02/07
---------------------------------
[fixed] mapviewer.computeRoute was not calling fail() when src and dst where the same.
[fixed] mapviewer.cameraNorthRotation, wrong sign, can be used to draw a North arrow.
[update] major performance improvent on touch devices.
[update] on touch devices, mapviewer.initialize ignores onObjectMouseOut and onObjectMouseOver parameters
  unless overriden by enableObjectMouseOut and enableObjectMouseOver (#5453)
[update] fixed multiple IE8 issues (#5418,#5420)
[fixed] bug with mapviewer.convertPointToLatLon(#5411)
[update] mapviewer.addPOI selectors are not centered on map (#5263)
[update] example, so routing can be activated via url e.g. mapviewer.tiled.html?src=125b&dst=13

Known issues
- addPOI of type .url or .text is visible regardless of zoom and does not have options.visibilityRampStartInvisible (#5533)
- setPlaceName, setPlaceIcon are not always centered on the shape, and are not centered (uses top left corner).  You may use .vg-setplacename CSS class to restyle some these labels.  See documentation.
- on IE8 one cannot click on the toggle handicap routing or instructions. (#7701)

VisioWebKitTiled-1.7.3, 2014/01/17
---------------------------------
- initial release of Tiled mapviewer.  Compatible with most web browsers including mobile phones.
- one sample code with two css (one for PC and one for mobile).

VisioWebKitTiled is made to be widely compatible.
To obtain best performnce minimize the number of labels (via setPlaceName or addPOI's) on the map.
The initial view is such that the whole map is visible on the map view.

Known Issues:
- Text labels in Internet Explorer reduce map performance.

Constructor

new CHANGELOG WEB2D SDK()