- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如果我删除“,zoomLevel:10”部分,那么我可以看到“Hello World”div。如果我将其添加回来,那么mapContainer div将占据整个页面,这样我就看不到“Hello World”div。您能给我举一个示例,说明如何编写 html/css/javascript 来控制 map 元素占用的页面大小吗?
<div>Hello World</div>
<div id="mapContainer"></div>
~
~
~
var map = new nokia.maps.map.Display(mapContainer, {
center: [52.51, 13.4], zoomLevel: 10
});
最佳答案
两者的某种组合:
width:100%; height:90%; left: 0;
top: 1em; position: absolute;
width:600px; height:600px;
换句话说,是这样的:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="X-UA-Compatible" content="IE=7; IE=EmulateIE9" />
<title>Map with a DIV</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script language="javascript" src="http://api.maps.nokia.com/2.2.4/jsl.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div> I'm a DIV</div>
<div id="mapcanvas" style="width:100%; height:600px;" > </div><br/><br/>
<script type="text/javascript">
// <![CDATA[
/////////////////////////////////////////////////////////////////////////////////////
// Don't forget to set your API credentials
//
// Replace with your appId and token which you can obtain when you
// register on http://api.developer.nokia.com/
//
nokia.Settings.set( "appId", "YOUR APP ID GOES HERE");
nokia.Settings.set( "authenticationToken", "YOUR AUTHENTICATION TOKEN GOES HERE");
/////////////////////////////////////////////////////////////////////////////////////
map = new nokia.maps.map.Display(document.getElementById('mapcanvas'), {
'components': [
// Behavior collection
new nokia.maps.map.component.Behavior(),
new nokia.maps.map.component.ZoomBar()
],
'zoomLevel': 5, // Zoom level for the map
'center': [41.0125,28.975833] // Center coordinates
});
// ]]>
</script>
</body>
</html>
关于Javascript API - 使用 ZoomLevel 调用 nokia.maps.map.Display 会导致 map 容器 div 填充整个页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16965768/
我最近对修改诺基亚 s40 手机产生了兴趣,部分原因是我们家里有一部库存手机,还因为我从小就在 s40 系统中成长,所以我想我会去记忆一下车道。 我将为诺基亚 s40v5 开发,但我有点困惑。关注此
我收到一个错误: The Internal RMI Registry port 1099 may be in use by another application. 我将其更改为不同的端口,但仍然出现
我想为非智能手机诺基亚手机开发应用程序,真的是现在市场上的基本手机,比如诺基亚 1800。有可能吗?此类链接将不胜感激。 最佳答案 好吧,自 2000 年代初以来,Symbian 手机一直是智能手机。
我有 nokia c6。我可以用 dos-box 编译和运行 c 和 c++ 代码。但是如何用 java 做同样的事情,这可能吗??有没有其他方法可以在 nokia c6-00 中运行 java 程序
我正在使用 Qtcreator 为诺基亚设备开发应用程序。但问题是用户界面不是那么吸引人。在桌面应用程序中,我们可以使用样式表来更改小部件的设计和颜色,但我们也可以对诺基亚使用相同的样式表吗? 最佳答
例如,我有 500 个路线坐标,我想使用此坐标从 A 点到 B 点构建路线 现在我使用了这段代码: router = new nokia.maps.routing.Manager(); //
诺基亚 8110 4G 没有菜单项可以切换到开发者模式。如何在不破解固件的情况下启用它? 最佳答案 在诺基亚 8110 4G 中有一个特殊的键码可以切换开发者模式。只需调用*#*#33284#*#*启
Nokia Here 劫持窗口的 DOMMouseScroll 事件。 我这样注册事件: window.addEventListener('DOMMouseScroll',
我正在尝试使用 Qt Creator 在 Symbian 上编写数独游戏。 我的数独游戏是用 9 x 9 矩形的 Grid(QML 元素)制作的,其中有一些限制为一个字符(数字)的 TextInput
目标:通知应该在点击它时自动取消并且应该打开我的 Activity (待定 Intent ).. 我有一个运行代码,它在 Android 设备上完美运行,期望 Nokia-X。这是代码: Notifi
我正在为运行 Nokia Belle 的诺基亚 N8 开发一个应用程序,我想在左箭头按钮和屏幕底部栏上的菜单按钮之间添加按钮。 在 Nokia Internet Radio 应用程序中播放电台时可以看
诺基亚 E61、E71 等有不同的键盘布局变体,如 QWERTY、QWERTZ、AZERTY 等。有没有一种方法可以通过 J2ME 检测当前的键盘布局? 还有一些有趣的事情正在发生,我们测试的一些 E
我为诺基亚 X、诺基亚 X+ 和诺基亚 XL 制作安卓游戏。我想在我的应用程序中添加应用程序购买。我尝试了很多方法,但它对我不起作用。请看下面的代码。我从 onCreate 方法调用此代码。
我想使用“here sdk”在 android 中开发一个应用程序,但我无法找到要包含在我的 android 项目中的任何库或文件。我在这里搜索过https://developer.here.com/
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于 Stack Overflow 来说是偏离主题的,
我正在启动我的应用程序,它运行良好……但是之后……: 转到“设置-> 电话-> 日期和时间”,将时间向后更改。(MyApp 处于后台) 重新打开经过测试的应用程序 尝试使用左命令操作和右命令操作...
有谁知道诺基亚成像 SDK 是否仅限于诺基亚硬件?换句话说,如果我使用 SDK 创建 Windows Phone 8 应用程序,该应用程序会在 HTC 或三星设备上运行吗? 我在 Nokia Deve
我刚刚开始使用 Nokia Here API,它运行良好,但我注意到 map 在 iOS 上、iPhone 和 iPad 上禁用捏合缩放。 这是一个例子:http://seemann.com/maps
如果我的应用程序在 ovi 商店客户端中被点击后,有什么方法可以让 qml 图像将用户带到专业版? 最佳答案 与 Ovi/Nokia Store 网站上相同的链接应该会打开设备上的商店应用程序。 例如
我正在尝试保存一个 IFilter 列表(接口(interface)类型),它使用 XML 序列化应用于图像,以便用户可以从他离开的地方编辑相同的图像。 [XmlRoot] public class
我是一名优秀的程序员,十分优秀!