()
| 25 | } |
| 26 | |
| 27 | const updateHash = function() { |
| 28 | let hash = |
| 29 | `#${map.getLevel()}/${mapObj.getCenter().lat.toPrecision(7)}` + |
| 30 | `/${mapObj.getCenter().lng.toPrecision(7)}/${mapObj.getZoom()}`; |
| 31 | |
| 32 | if (map.getCategory() > -1) { |
| 33 | hash += `/${map.getCategory()}`; |
| 34 | } |
| 35 | |
| 36 | location.hash = hash; |
| 37 | } |
| 38 | |
| 39 | mapObj.on('moveend', updateHash); |
| 40 | mapObj.on('zoomend', updateHash); |
nothing calls this directly
no outgoing calls
no test coverage detected