Note that there are some explanatory texts on larger screens.

plurals
  1. POGmap3 / Jquery Syntax
    primarykey
    data
    text
    <p>I'm trying to create a map using gmap3.net plugin with Jquery, the script should then monitor it for movement and if any is seen run xml update based on current location &amp; radius ( proximity ) of the viewable map. </p> <p>I've also had to put in a resize check as this is been used in a single html5 page hidden at first so I'm seeing the map in one tile until you refresh the view.....</p> <p>All that said I'm running in to a problem around line 75 character 5 ( marked ) with the dev console saying SCRIPT16386: No such interface supported.I would appreciated it if some one can see where I am going wrong as I'm still trying to learn the formatting of this plugin as well as jquery and a few other things too for this app and I think I'm starting to go code blind lol.....</p> <pre><code> var mylatLng = new google.maps.LatLng(); $(this).gmap3({action:'trigger', name:'resize'}); jQuery.noConflict(); jQuery(document).ready(function(){ //MAP ZOOM (0 to 20) var zoomLevel = 10, gMap = jQuery("#map_canvas"), //iPad,iPhone,iPod... deviceAgent = navigator.userAgent.toLowerCase(), iPadiPhone = deviceAgent.match(/(iphone|ipod|ipad)/); //iPad Stuff if (iPadiPhone) { //ADD MAP CONTROLS AND POST ARROWS // jQuery("#footer").prepend('&lt;div class="markerNav" title="Prev" id="prevMarker"&gt;&amp;lsaquo;&lt;/div&gt;&lt;div id="markers"&gt;&lt;/div&gt;&lt;div class="markerNav" title="Next" id="nextMarker"&gt;&amp;rsaquo;&lt;/div&gt;&lt;div id="mapTypeContainer"&gt;&lt;div id="mapStyleContainer"&gt;&lt;div id="mapStyle" class="satellite"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="mapType" title="Map Type" class="satellite"&gt;&lt;/div&gt;&lt;/div&gt;'); } else {//IF NOT iPad jQuery('#zoomIn').live('click',function(){ zoomLevel += 1; gMap.gmap3({action: 'setOptions', args:[{zoom:zoomLevel}]}); }); jQuery('#zoomOut').live('click',function(){ zoomLevel -= 1; gMap.gmap3({action: 'setOptions', args:[{zoom:zoomLevel}]}); }); //ADD MAP CONTROLS AND POST ARROWS //jQuery("#footer").prepend('&lt;div class="markerNav" title="Prev" id="prevMarker"&gt;&amp;lsaquo;&lt;/div&gt;&lt;div id="markers"&gt;&lt;/div&gt;&lt;div class="markerNav" title="Next" id="nextMarker"&gt;&amp;rsaquo;&lt;/div&gt;&lt;div id="mapTypeContainer"&gt;&lt;div id="mapStyleContainer"&gt;&lt;div id="mapStyle" class="satellite"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="mapType" title="Map Type" class="satellite"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="zoomControl" title="Zoom Out" id="zoomOut"&gt;&lt;img src="images/zoomOut.png" alt="-" /&gt;&lt;/div&gt;&lt;div class="zoomControl" title="Zoom In" id="zoomIn"&gt;&lt;img src="images/zoomIn.png" alt="+" /&gt;&lt;/div&gt;'); } // jQuery('body').prepend("&lt;div id='target'&gt;&lt;/div&gt;"); gMap.gmap3({ action: 'init', onces: { bounds_changed: function(){ var number = 0; jQuery(this).gmap3({ action:'getBounds', callback: function (){ if (!bounds) return; // Get Gmap radius / proximity start var bounds = new google.maps.LatLngBounds(); var sw = bounds.getSouthWest(); var ne = bounds.getNorthEast(); var proximitymeterswne = google.maps.geometry.spherical.computeDistanceBetween (sw, ne); var proximity = proximitymeterswne * 0.000621371192; // Get Gmap radius / proximity End } }); } } },{ action: 'setOptions', args:[{ zoom:zoomLevel, scrollwheel:true, disableDefaultUI:false, disableDoubleClickZoom:false, draggable:true, mapTypeControl:true, panControl:true, scaleControl:true, streetViewControl:true, zoomControl:true, //MAP TYPE: 'roadmap', 'satellite', 'hybrid' mapTypeId:'roadmap' }] }); }); // PROBLEM WITH THE FOLLOWING LINE $(function(){ // PROBLEM WITH THE ABOVE LINE $("#map_canvas").gmap3( { action : 'geoLatLng', callback : function(latLng){ if (latLng){ //$('#resultat-geolocalisation').html('sucess !'); $(this).gmap3({action:'trigger', name:'resize'}); $(this).gmap3( { action: 'addMarker', latLng:latLng, options:{ icon:new google.maps.MarkerImage("2.png") }, callback: function (){ if (!bounds) return; // Get Gmap radius / proximity start var bounds = new google.maps.LatLngBounds(); var sw = bounds.getSouthWest(); var ne = bounds.getNorthEast(); var proximitymeterswne = google.maps.geometry.spherical.computeDistanceBetween (sw, ne); var proximity = proximitymeterswne * 0.000621371192; // Get Gmap radius / proximity End }, }, { action: 'addTrafficLayer'}, { action: 'addKmlLayer', url: 'http://www.mykml', options:{ suppressInfoWindows: true, preserveViewport: false } } ); } else { //$('#resultat-geolocalisation').html('cant geolocate!'); alert('Location Not Found'); } } } ); }); </code></pre>
    singulars
    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