JavaScript Google Maps with Meteor not working google maps with weather,google maps with county lines,google

For my project i need google maps api. I just can serve the api via script tag, so i tried something like that.

my html:

<head>
  <title>app</title>
  <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">    </script>
</head>

<body>
  {{> hello}}
</body>

<template name="hello">
  <div id="map-canvas"/>
</template>

my js:

if (Meteor.isClient) {

  var mapOptions = {
      center: new google.maps.LatLng(-34.397, 150.644),
      zoom: 8,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };

  var map = new google.maps.Map(document.getElementById("map-canvas"),
            mapOptions);    
}

if (Meteor.isServer) {
  Meteor.startup(function () {
    // code to run on server at startup
  });
}

On execution the error is: Uncaught ReferenceError: google is not defined

How can i get this working?

Answer:1

I am trying to disable close on click when clicking the overlay behind the edit form Modal that opens when I edit a row, but I dont know how I have to do it. I were trying something like: editOptions:...

I am trying to disable close on click when clicking the overlay behind the edit form Modal that opens when I edit a row, but I dont know how I have to do it. I were trying something like: editOptions:...

Here I write some js code in kettle Modified Java Script Value step (which use Rhino engine), to use java API. Actually, all the code works well. For example: var fileInputStream = new java.io....

Here I write some js code in kettle Modified Java Script Value step (which use Rhino engine), to use java API. Actually, all the code works well. For example: var fileInputStream = new java.io....

I just got to know about the Symbol Animation offered by Google API. Every thing is working fine in my code but I just want to know if I can pass a Image instead of a symbol in the below code. var ...

I just got to know about the Symbol Animation offered by Google API. Every thing is working fine in my code but I just want to know if I can pass a Image instead of a symbol in the below code. var ...

  1. google maps using latitude longitude

This is really puzzling me. Any idea why this would be happening? This code does work: $.ajax({ type: 'GET', dataType: 'json', url: 'http://localhost:3235/Users/...

This is really puzzling me. Any idea why this would be happening? This code does work: $.ajax({ type: 'GET', dataType: 'json', url: 'http://localhost:3235/Users/...