Note that there are some explanatory texts on larger screens.

plurals
  1. POtrouble styling my google map
    primarykey
    data
    text
    <p>I have been trying to style my google map all week and am going round in circles! I have the JSON values I want to use but no idea how to add them into the javascript! I also want to make the zoom bar control thing sit on the right of the window rather than on the left as my map is a full page background so on the left this is hidden behind the site content divs.</p> <p>Can anyone help?</p> <p>:)</p> <p>The JSON I want to add are:</p> <p>[ { stylers: [ { saturation: -90 }, { gamma: 0.87 } ] } ]</p> <p>And the code I have for my map is:</p> <pre><code>&lt;script type="text/javascript"&gt; //&lt;![CDATA[ if (GBrowserIsCompatible()) { // A function to create the marker and set up the event window // Dont try to unroll this function. It has to be here for the function closure // Each instance of the function preserves the contends of a different instance // of the "marker" and "html" variables which will be needed later when the event triggers. function createMarker(point,html) { var marker = new GMarker(point); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; } // Display the map, with some controls and set the initial location var map = new GMap2(document.getElementById("map")); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(50.826910965853585, -0.13648152351379395), 16); // Set up the markers with info windows var point = new GLatLng(50.826910965853585, -0.13648152351379395); var marker = createMarker(point,'&lt;div style="width:300px"&gt;text for pop up here....&lt;/div&gt;') map.addOverlay(marker); } // display a warning if the browser was not compatible else { alert("Sorry, the Google Maps API is not compatible with this browser"); } // This Javascript is based on code provided by the // Community Church Javascript Team // http://www.bisphamchurch.org.uk/ // http://econym.org.uk/gmap/ //]]&gt; &lt;/script&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload