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
mohshaheen
Posts: 4
Registered: ‎06-22-2011
My Device: 9700

Java Script error :TypeError: undefined is not a function

I am tring to integrate google maps in Web app , i am using this code :

 

 

!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" id="viewport" content="height=device-height,width=device-width,user-scalable=no" />


  <title>Google Maps JavaScript API v3 Example: Place Search</title>
  <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true&libraries=places&language=ar"></script>

  <style type="text/css">
    #map {
      height:400px;
      width:400px;
      border: thin solid #333;
      margin-top:0;
    }
  </style>

  <script type="text/javascript">

    var map;
    var service;
    var infowindow;
    var pyrmont ;
 
    function initialize() {
      pyrmont = new google.maps.LatLng(25.100756,55.204411);

it works on BB 6 fine , but it when i try to run over BB5 simulator i have error "

TypeError: undefined is not a function.
    Running  at line    7: pyrmont=new google.maps.LatLng(25.100756,55.204411);.
    Called from line    1: initialize()} } } }.

 

Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Java Script error :TypeError: undefined is not a function

I don't believe the BB5 rendering engine supports google dynamic maps API.  It is an older rendering engine and is not webkit based.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
mohshaheen
Posts: 4
Registered: ‎06-22-2011
My Device: 9700

Re: Java Script error :TypeError: undefined is not a function

Do we have a java script API to do a local search using BB Maps ?