API key, Dreamweaver and Eclipse

26 views
Skip to first unread message

Victor Unda

unread,
May 15, 2012, 5:18:18 PM5/15/12
to phon...@googlegroups.com
Hello

I'm new in google group. It may be very easy to answer this question
or give me a step to get my google map working. I'm using eclipse to
run my application, but I had moved all my content from Dreamweaver. I
have all the files and I tested them with eclipse emulator which
worked fine. But I have a problem with my Map API. I got an error
about my API key. I configured it correctly but it is still not
working. My original file where my map should show up is under the
file called map.html. There I set my java script code to show my map
"this is working in any browser right now". Here is an example of the
code.

<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?key=Mykey&sensor=true">
</script>


var map;
var directionsDisplay;
var directionsService;
var stepDisplay;
var markerArray = [];

function initialize() {
// Instantiate a directions service.
directionsService = new google.maps.DirectionsService();

// Create a map and center it on Pullman WA.
var pullman = new google.maps.LatLng(46.730155, -117.181494);
var myOptions = {
zoom: 16,
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: pullman
}
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

// Create a renderer for directions and bind it to the map.
var rendererOptions = {
map: map
}
directionsDisplay = new google.maps.DirectionsRenderer(rendererOptions)

// Instantiate an info window to hold step text.
stepDisplay = new google.maps.InfoWindow();
}

This code runs in my "map.html" file. I have an index.html file linked
to the map.html. So, my question is: is it possible to do this type of
building application without configuring the manifest.xml file. And if
I have to do it, which I did, is there any example to get this idea
working. I also got my certificate working too by adding the code into
the main.xml file. Is it possible to run this map.html file without
adding extra code to the manifest file or main file? Thanks.
Reply all
Reply to author
Forward
0 new messages