You have far more fundamental issues. You can't just
put arbitrary javascript into a page directly.

It looks like HTML Box might support it. But will need to make changes to
the code, eg as noted on the page I linked to onload doesnt work. Once you
start putting in the code, the HTML box editor will prompt you about issues
it finds. Quite a few issues to deal with. You still dont get arbitray code
support.


You might find it easier to just host the html page somewhere else. On a
normal webserver.
If you search "iframe" in the Gadgets section, can use that to include your
new html page inside a Google sites page.


On Tue, Oct 30, 2012 at 8:59 PM, Open Source GIS
<[email protected]>wrote:

> Thanks Barry,
>
> Unfortuantley even though the API key is registered to the name of the
> Google Sites it dosent seem to like it. Im totally stumped by this...its
> driving me insane! :(
>
> Thanks for your quick reply though! :)
>
> Ian
>
>
> On Tuesday, 30 October 2012 20:31:22 UTC, Open Source GIS wrote:
>>
>> Hello,
>>
>> I am currently struggling getting a Google Maps javascript code that i
>> have written into a Google Sites. I though this would be easy as they are
>> using the same product...no unfortunatley not.
>>
>> I have created a basic google maps that references a fushion table to
>> give it some data and also points on a map. The code looks like this:
>>
>> <!DOCTYPE html>
>> <html>
>> <head>
>> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
>> <style type="text/css">
>> html { height: 100% }
>>  body { height: 100%; margin: 0; padding: 0 }
>> #map_canvas { height: 100% }
>> </style>
>> <script type="text/javascript"
>>  src="http://maps.googleapis.**com/maps/api/js?key=**
>> AIzaSyBMkubRIxOa4wACTCjMS0CPLo**qHAezFVR0&sensor=false<http://maps.googleapis.com/maps/api/js?key=AIzaSyBMkubRIxOa4wACTCjMS0CPLoqHAezFVR0&sensor=false>
>> ">
>> </script>
>> <script type="text/javascript">
>> var map = null;
>> function initialize() {
>>  var myOptions = {
>> zoom: 7,
>> center: new google.maps.LatLng(52.603047, -1.604003),
>>  mapTypeControl: true,
>> mapTypeCOntrolOptions: {style:
>> google.maps.**MapTypeControlStyle.DROPDOWN_**MENU},
>>  navigationControl: true,
>> mapTypeId: google.maps.MapTypeId.ROADMAP
>> }
>>
>> map = new google.maps.Map(document.**getElementById("map_canvas"),
>> myOptions);
>>
>> var layer = new google.maps.FusionTablesLayer(**{
>>  query: {
>> select: 'Latitude',
>> from: '1g1TJN9-**M0JSmP2fXpAnSkJ5A2zW6KXxGtW4uI**-s'
>>  },
>> });
>>
>> layer.setMap(map);
>>
>> };
>> </script>
>> </head>
>> <body onload="initialize()">
>> <div id="map_canvas" style="width:100%; height:100%">
>> </div>
>> </body>
>> </html>
>>
>> Now unfortunatley, even though the API is registered to the Google Sites
>> page it just dosent like it. I would really appreciate a little help with
>> getting this map into a google site application. Any advice or guidance
>> that people could give would be massivley helpful!
>>
>> Many Thanks,
>>
>> Ian Usher
>> GIS Consultant
>> Open Source GIS
>> www.open-source-gis.co.uk
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-maps-js-api-v3/-/-jzX2A_P-gEJ.
>
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to