Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
kifac
Posts: 5
Registered: ‎02-21-2013
My Device: Blackberry Z10

Maps not appearing?

[ Edited ]

Alright so i went through the sample and im able to get the maps to work just fine.

But now i have two index.html in my app :/

The original index i need because it points to my home.html which is my main page that every user sees.

Do i take those vales from the index found in the maps sample and copy them over to my index that i use now?

 

This is my index right now..

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<!--
* Copyright 2010-2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<html> 
	<head>
		<meta name="x-blackberry-defaultHoverEffect" content="false" />
		<link  rel="stylesheet" type="text/css" href="bbui.css"><link />
		<script type="text/javascript" src="bbui.js"></script>
		<script type="text/javascript" src="local:///chrome/webworks.js"></script>
		<script type="text/javascript">
			var webworksreadyFired = false,
				darkColoring = false,
				darkScreenColor = 'black';
				
			document.addEventListener('webworksready', function(e) {
				// This is code to ensure that if webworksready is fired multiple times we still only init() one time
				if (webworksreadyFired) return;
				webworksreadyFired = true;
				
				var config;
				// Toggle our coloring for testing 
				if (darkColoring) {
					config = {controlsDark: true,
							listsDark: true,
							bb10ForPlayBook: true};
				} else {
					config = {controlsDark: false,
							listsDark: false,
							coloredTitleBar: true,
							bb10ForPlayBook: true};
				}
				// Handle styling of the screen before it is displayed
				config.onscreenready = function(element, id) {
											if (darkColoring && bb.device.isBB10) {
												var screen = element.querySelector('[data-bb-type=screen]');
												if (screen) {
													screen.style['background-color'] = darkScreenColor;
												}
											}
											
											if (id == 'dataOnLoad') {
												dataOnLoad_initialLoad(element);
											} else if (id == 'masterDetail') {
												masterDetail_initialLoad(element);
											} else if (id == 'dataOnTheFly') {
												dataOnTheFly_onScreenReady(element);
											} 
											
											// Remove all titles "except" input and pill buttons screen if running on BB10
											if (bb.device.isBB10 && (id != 'input') && (id != 'pillButtons') && (id != 'titlePillButtons')) {
												var titles = element.querySelectorAll('[data-bb-type=title]');
												if (titles.length > 0) {
													titles[0].parentNode.removeChild(titles[0]);
												}
											} 
											
											// Initialize our title pill buttons screen
											if (bb.device.isBB10 && (id == 'titlePillButtons')) {
												titlePillButtons_Init(element);
											}
											
										};
				// Handle styling of the screen after it is displayed
				config.ondomready = function(element, id, params) {
											if (id == 'dataOnTheFly') {
												dataOnTheFly_initialLoad(element);
											} 
										};
				
				// You must call init on bbUI before any other code loads.  
				// If you want default functionality simply don't pass any parameters.. bb.init();
				bb.init(config);
				if (darkColoring && bb.device.isBB10) {
					document.body.style['background-color'] = darkScreenColor;
					document.body.style['color'] = 'white';
				}
				bb.pushScreen('home.htm', 'home');
			}, false);
			
			// Fire the webworksready event for PlayBook and BBOS
			window.addEventListener('load',function() {
					if (navigator.userAgent.indexOf('Version/10.0') < 0) {
						var evt = document.createEvent('Events');
						evt.initEvent('webworksready', true, true);
						document.dispatchEvent(evt);
					}
				});
		</script>
	
	</head>
	<body>
	</body>
</html>

 As you can see, at the bottom it points to home.htm

Now in my home.htm it has a menu in the bottom with a tab called "Maps"

What should this tab point to? What html file?

 

Thanks