诺基亚这里的JavaScript API禁用的iOS双指缩放 [英] Nokia Here JavaScript API disables pinch zoom in iOS

查看:144
本文介绍了诺基亚这里的JavaScript API禁用的iOS双指缩放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用诺基亚这里API和它的伟大工程,但我注意到,地图禁用iOS上的双指缩放,在iPhone和iPad。

I've just started using the Nokia Here API and it works great, but I've noticed that the maps disable pinch zoom on iOS, on both iPhone and iPad.

下面是一个例子: http://seemann.com/mapsample/

作品在大多数浏览器罚款在桌面上,但捏缩放是不可能的iOS上。 (有没有在Android上进行测试。)当我关掉行为的构成发生这种情况甚至

Works fine across most browsers on a desktop, but pinch zooming is not possible on iOS. (Haven't tested on Android.) This happens even when I turn off the Behavior component.

思考?

推荐答案

一个基本的双指缩放功能的确实存在作为JavaScript中的HERE地图API中 - 你只需要包括行为部分。

A basic pinch zoom functionality does exist in the HERE Maps API for Javascript - you just need to include the Behavior component as shown.

var map = new nokia.maps.map.Display(mapContainer, {
    // initial center and zoom level of the map
    center: [52.51, 13.4],
    zoomLevel: 10,
    components: [
        // We add the behavior component to allow panning / zooming of the map
        new nokia.maps.map.component.Behavior()]
});

要采取几个例子

  • Basic Map Components on developer.here.net
  • Headline news story from CNN News

如果您不包括行为变焦将无法正常工作 - 在这里是一个例子。

If you don't include Behavior zoom will not work - here is an example

  • Basic Map - no Behavior on developer.here.net

我刚刚测试了使用iPad的例子,他们的工作对我罚款。

I've just tested the examples using an iPad and they work fine for me.

据该API的浏览器支持矩阵将在Safari 5+和iOS 4合作+

According to the browser support matrix the API will work on Safari 5+ and iOS 4+

这篇关于诺基亚这里的JavaScript API禁用的iOS双指缩放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆