Note that there are some explanatory texts on larger screens.

plurals
  1. POSending map boundary via Jquery to google maps ui
    primarykey
    data
    text
    <p>I use this script to get the markers for Google Maps with JSON. It is not working because I need to receive the boundary in the Json script like this:</p> <pre><code>$swLat=$_GET["swLat"]; $swLon=$_GET["swLon"]; $neLat=$_GET["neLat"]; $neLon=$_GET["neLon"]; </code></pre> <p>That is where I need your help.</p> <p>Google maps script</p> <pre><code>&lt;script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://skiweather.eu/gmap3/js/jquery.ui.map.js"&gt;&lt;/script&gt; &lt;script language="javascript" type="text/javascript"&gt; var map = null; map = new google.maps.Map(document.getElementById("map")); var markers = new Array(); var bounds = map.getBounds(); var zoomLevel = map.getZoom(); $(function() { demo.add(function() { $('#map').gmap().bind('init', function() { $.getJSON( 'http://skiweather.eu/gmap3/markers/index.php', {zoom: zoomLevel, swLat: bounds.getSouthWest().lat(), swLon: bounds.getSouthWest().lng(), neLat: bounds.getNorthEast().lat(), neLon: bounds.getNorthEast().lng()}, function(data) { $.each( data.markers, function(i, marker) { $('#map').gmap('addMarker', { 'position': new google.maps.LatLng(marker.latitude, marker.longitude), 'bounds': true }).click(function() { $('#map').gmap('openInfoWindow', { 'content': marker.content }, this); }); }); }); }); }).load(); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="map"&gt;&lt;/div&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.
    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