问题
Trying to get a map with pins to display in internet explorer which this page claims to support https://developer.here.com/documentation/maps/topics/overview.html but none of the examples in the developer documentation seem to run in IE 11
Table from url
+===============================+==============================+
| Support Level | Browser |
+===============================+==============================+
| Supported with optimizations: | Edge 17+ |
+-------------------------------+------------------------------+
| | Firefox (latest) |
+-------------------------------+------------------------------+
| | Google Chrome (latest) |
+-------------------------------+------------------------------+
| | Apple Safari 11+ |
+-------------------------------+------------------------------+
| Legacy support: | Internet Explorer 9, 10, 11 |
+-------------------------------+------------------------------+
| | iOS WebView |
+-------------------------------+------------------------------+
| Not supported: | Opera |
+-------------------------------+------------------------------+
| | Internet Explorer < 9 |
+-------------------------------+------------------------------+
Here is an example map that won't load https://developer.here.com/api-explorer/maps-js/maps/interactive-basemap
Does anyone have any working examples of the 3.1 api in IE?
回答1:
In order to have working map on legacy browsers, you need to include mapsjs-core-legacy.js package. See https://developer.here.com/documentation/maps/topics/overview.html#overview__modules
Also you need to set engineType parameter when creating map object:
engineType: H.map.render.RenderEngine.EngineType.P2D
See https://developer.here.com/documentation/maps/topics_api/h-map-options.html
Unfortunately the example you attached (Interactive base map) as well as example Change map style at runtime won't work on legacy browsers as they need WebGL rendering engine for vector rendering.
来源:https://stackoverflow.com/questions/57464976/here-maps-javascript-api-3-1-and-internet-explorer-support