Search Results

Search found 40 results on 2 pages for 'gmaps'.

Page 1/2 | 1 2  | Next Page >

  • Loading GMaps via ajax

    - by Marco
    Hi to all, I'm loading a page containing a GMaps using the ajax() method of jQuery. The HTML page i'm loading is: <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=MY_API_KEY" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); var geocoder = new GClientGeocoder(); geocoder.getLatLng("San Francisco, California",function(point) { if (point) { map.setCenter(point, 7); } }); map.setUIToDefault(); } }); </script> <div id="map_canvas"></div> After retrieving this page, I'm setting its contents to a div using the html() method. The map is not showed, while other pages containing scripts, loaded in the same way, are correctly shown. Is this a specific issue about GMaps, that doesn't allow to be loaded via an ajax request? Thanks

    Read the article

  • gmaps Address Component Types get country name

    - by gmapsuser
    hi .. iam trying to get the country name using the Address Component Types available from gmaps V3. i dont know how i can get it the right way.. http://code.google.com/apis/maps/documentation/javascript/services.html#GeocodingAddressTypes iam trying to alert the country name liks here : alert(results[1].address_component[country]); and here`s the code.. any help is really appreciated..thanks function codeLatLng() { var input = document.getElementById("latlng").value; var latlngStr = input.split(",",2); var lat = parseFloat(latlngStr[0]); var lng = parseFloat(latlngStr[1]); var latlng = new google.maps.LatLng(lat, lng); if (geocoder) { geocoder.geocode({'latLng': latlng}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { if (results[1]) { alert(results[1].address_component[country]); } else { alert("No results found"); } } else { alert("Geocoder failed due to: " + status); } }); } }

    Read the article

  • Google maps Geometry Controls from GMaps Utility Library

    - by TiagoMartins
    hi everybody, i'm working on google maps in specifically on geometry controls the point is, in this example when I click in line or polygon infowindow show up, but the language is english (by default I think) can I change the language? in the tooltips i can replace the text, but in this particular case i have no place do replace it, this let me thinking that "language" is automatic, i'm wrong? best regards

    Read the article

  • gMaps suddenly stopped working : Can't find variable: G_NORMAL_MAP

    - by Luca
    hello! i inject a map on my div called "concessionario-map" with GMap, a jquery plugin. Gmap everything works fine until this morning. now the debugger says: ReferenceError: Can't find variable: G_NORMAL_MAP i just search on google and i read some similar situation, but i dont find a case like mine. please, can you help me? thanks a lot in advance :) (full code) $.getJSON("http://maps.google.com/maps/geo?q="+loc+"&key=ABQIAAAAgDXoBEgIn38xaRBBqo6ygxTDjF32IQ1zA0BVcGSuGouGRvo0kRRKiyipbCniJWSso2scatdz36K-Mg&sensor=false&output=json&callback=?",function(data, textStatus) { long = data.Placemark[0].Point.coordinates[0]; lat = data.Placemark[0].Point.coordinates[1]; console.log(data); $('#concessionario-map').gMap( { scrollwheel: false, latitude: lat, longitude: long, zoom: 15, markers: [{ latitude: lat, longitude: long }], icon: { image: "files/images/gmap_pin_orange.png", shadow: "files/images/gmap_pin_orange_shadow.png", iconsize: [26, 46], shadowsize: [28, 48], iconanchor: [12,46], infowindowanchor: [12, 0] } }) });

    Read the article

  • google maps everytime fails to place some markers on the map

    - by Luca
    hello! im trying to place like 130/140 markers on a custom google map. i inject the map with jquery and gmaps (http://gmap.nurtext.de/) everytime, at random (not related to specific markers) a lots of markers are not shown. firebug report this error: a is null and this error comes from this file: http://maps.gstatic.com/intl/it_ALL/mapfiles/285c/maps2.api/main.js if i refresh the page...some other markers are "hidden" and other ones are shown. anyone had this problem/can help me or suggest another safe way to show all markers? thanks a lot! EDIT: this is how i inject the map and the markers (with a lots of address, but in this example only few) $(document).ready(function() { $("#container").gMap( { scrollwheel: false, maptype: G_PHYSICAL_MAP, icon: { image: "files/images/gmap_pin.png", iconsize: [32, 37], iconanchor: [32, 37], infowindowanchor: [12, 0] }, address: "Milano", zoom: 4, markers: [ { address: "Viale Certosa, Milano" }, { address: "Viale Ceccarini, Milano" }, { address: "Viale Italia, Milano" }, { address: "Via Rodi, Milano" }, ] }); });

    Read the article

  • increasing speed and efficiency of ajax call

    - by user1048824
    I'm not the most disciplined dev, dont know standards and am self-taught so bear with me. I create stuff very logically and fast but not always using 'programming standards'. I have a mobile app using geolocation API. it gets thousands of places from my db and makes gmaps v3 markers for the ones around the user's current location. there is an ajax call from my JS to an aspx page that calls the database, makes a json string, and sends the json string to the javascript that then creates the google map markers. would i save time if the json string was in a flat file? im not sure if, generally speaking, accessing a sql db from an aspx page is faster than c# file i/o on a flat file with pre-rendered JSON. (of course, using the flat file, it would update everytime the db is updated)

    Read the article

  • Adding simple marker clusterer to google map

    - by take2
    Hi, I'm having problems with adding marker clusterer functionality to my map. What I want is to use custom icon for my markers and every marker has its own info window which I want to be able to edit. I did accomplish that, but now I have problems adding marker clusterer library functionality. I read something about adding markers to array, but I'm not sure what would it exactly mean. Besides, all of the examples with array I have found, don't have info windows and searching through the code I didn't find appropriate way to add them. Here is my code (mostly from Geocodezip.com): <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer.js"></script> <style type="text/css"> html, body { height: 100%; } </style> <script type="text/javascript"> //<![CDATA[ var map = null; function initialize() { var myOptions = { zoom: 8, center: new google.maps.LatLng(43.907787,-79.359741), 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 mcOptions = {gridSize: 50, maxZoom: 15}; var mc = new MarkerClusterer(map, [], mcOptions); google.maps.event.addListener(map, 'click', function() { infowindow.close(); }); // Add markers to the map // Set up three markers with info windows var point = new google.maps.LatLng(43.65654,-79.90138); var marker1 = createMarker(point,'Abc'); var point = new google.maps.LatLng(43.91892,-78.89231); var marker2 = createMarker(point,'Abc'); var point = new google.maps.LatLng(43.82589,-79.10040); var marker3 = createMarker(point,'Abc'); var markerArray = new Array(marker1, marker2, marker3); mc.addMarkers(markerArray, true); } var infowindow = new google.maps.InfoWindow( { size: new google.maps.Size(150,50) }); function createMarker(latlng, html) { var image = '/321.png'; var contentString = html; var marker = new google.maps.Marker({ position: latlng, map: map, icon: image, zIndex: Math.round(latlng.lat()*-100000)<<5 }); google.maps.event.addListener(marker, 'click', function() { infowindow.setContent(contentString); infowindow.open(map,marker); }); } //]]> </script>

    Read the article

  • jQuery UI + Gmaps = Problems (for me at least) HELP!!

    - by Luis
    Hi there! I started using jQuery as soon as I found out about it, it is very powerfull but I started struggling when I tried to load Gmaps api into the tabs jQuery UI brings. Strangly enough in IE 6,7,8 it works fine, but in Firefox, Safari (I'm using mac but tested it in windows and they both give the same problems) the map doesn't load entirely. When I click on the tab where the map loads in, only part of the map is fully operational, the rest is grey and not clickable. Please take a look at the link below and click the third tab in firefox/safari and IE and you will see the problem. http://movewithusoverseas.com/index-new.php?z=product-info.html&pid=1 I don't know if it is a bug in the jQuery UI code or I'm doing something wrong. If I load the map out of the tabs the map is shown OK. I'm fighting with this problem for a week and a half... any help will be much appreciated. Thanks in advance. Luis

    Read the article

  • Durandal Google Maps not showing properly

    - by user1891037
    Trying to show Google Maps using the Durandal. I'm now simply working with Durandal HTML Starter Kit so the other modules and all engine works properly. The thing is when I added the Google Map it doesn't fit the div size (the big part of div is just grey). As I understand, the problem is causing because Google Maps added before page is completely loaded. But I can't figure out how can I hook on page load event. Here is the module code: define(['knockout', 'gmaps'], function (ko, gmaps) { return { displayName: 'Google Maps', myMap: ko.observable({ lat: ko.observable(32), lng: ko.observable(10)}), activate: function () { console.log('activate'); ko.bindingHandlers.map = { init: function (element, valueAccessor, allBindingsAccessor, viewModel) { console.log('init'); var mapObj = ko.utils.unwrapObservable(valueAccessor()); var latLng = new gmaps.LatLng( ko.utils.unwrapObservable(mapObj.lat), ko.utils.unwrapObservable(mapObj.lng)); var mapOptions = { center: latLng, zoom: 5, mapTypeId: gmaps.MapTypeId.ROADMAP}; mapObj.googleMap = new gmaps.Map(element, mapOptions); } } }, attached: function() { console.log('attached'); }, compositionComplete: function() { console.log('compositionComplete'); } }; }); And a very simple HTML code: <section> <div id="gmap-canvas" data-bind="map:myMap"></div> </section> I'm loading Google Maps with async plug-in in my shell.js. It works fine. Screenshot with trouble here - http://clip2net.com/s/ibswAa P.S. div size is defined in .CSS file. P.S. I tried to use getElementById approach provided here and it's work great if placed in compositionComplete block. But when I tried to move my bindings to this block nothing happens at all. Thanks!

    Read the article

  • JavaScript: how to create a JS event that requires 2 seperate JS files to be loaded first while down

    - by Teddyk
    I want to perform asynchronous JavaScript downloads of two files that have dependencies attached to them. // asynch download of jquery and gmaps function addScript(url) { var script = document.createElement('script'); script.src = url; document.getElementsByTagName('head')[0].appendChild(script); } addScript('http://google.com/gmaps.js'); addScript('http://jquery.com/jquery.js'); // define some function dependecies function requiresJQuery() { ... } function requiresGmaps() { ... } function requiresBothJQueryGmaps() { ... } // do some work that has no dependencies on either JQuery or Google maps ... // QUESTION - Pseudo code below // now call a function that requires Gmaps to be loaded if (GmapsIsLoaded) { requiresGmaps(); } // QUESTION - Pseudo code below // then do something that requires both JQuery & Gmaps (or wait until they are loaded) if (JQueryAndGmapsIsLoaded) { requiresBothJQueryGmaps(); } Question: How can I create an event to indicate when: JQuery is loaded? Google Maps is loaded JQuery & Google Maps are both loaded?

    Read the article

  • whJavaScript: how to create a JS event that requires 2 seperate JS files to be loaded first while d

    - by Teddyk
    I want to perform asynchronous JavaScript downloads of two files that have dependencies attached to them. function addScript(url) { var script = document.createElement('script'); script.src = url; document.getElementsByTagName('head')[0].appendChild(script); } addScript('http://google.com/gmaps.js'); addScript('http://jquery.com/jquery.js'); function requiresJQuery() { ... } function requiresGmaps() { ... } function requiresBothJQueryGmaps() { ... } // do some work that has no dependencies on either JQuery or Google maps ... // now call a function that requires Gmaps to be loaded if (GmapsIsLoaded) { requiresGmaps(); } // then do something that requires both JQuery & Gmaps (or wait until they are loaded) if (JQueryAndGmapsIsLoaded) { requiresBothJQueryGmaps(); } Question: How can I create an event to indicate when: JQuery is loaded? Google Maps is loaded JQuery & Google Maps are both loaded?

    Read the article

  • Using google maps as an input method

    - by Vasiliy Sharapov
    I'm wondering if it's possible to use gmaps pretty much as a type of input. Normally for Location a user has to enter: street address town/city state/province postal code country This seems too clunky to me, does anyone here know of a more elegant process? My perfect address-entering interface is a gmaps search bar with a map under it. When the user clicks a marker instead of a speech bubble containing location information they get one containing a submit button or equivalent. I'm not sure anything like this has been implemented before.

    Read the article

  • Android: Using GEO uri

    - by Sebastian
    Hi, I have read the doc and some tutorials to get a .kml file working launching the google maps activity. When I hosted the file in a server, this works perfectly: Intent myIntent = new Intent( android.content.Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=http://somedomain.com/file.kml") ); Now, reading this link on how to use intents for gmaps with the developing stage of GEO uri I can't manage how to load a kml file from within the device, I have tried with "q=file:///path-to-file.kml" and with an absolute path too. Has anyone done this yet? PS: in IRC channel recommend me to use apps based on openstreetmaps, but the docs is much more poor than the gmaps doc althought they are OS.

    Read the article

  • Why does Chromium run so slow in portable mode?

    - by NoCatharsis
    I am using Chromium on a flash drive through LiberKey and it does everything I want it to do as far as syncing my Chrome bookmarks from home, etc. But it's soooooo slow. If I open more than 1 tab, or if a tab is heavy with code such as Gmail or GMaps, then the entire program hangs for about 5-10 seconds. I don't exactly know how portable apps work when run from a flash drive, so is there a way to speed up load times?

    Read the article

  • google maps based desktop application

    - by dramaticlook
    I want to build a desktop application which has google maps embedded to it. This app should have a thread to read coordinate data online a usb microphone to use. This application will move the google map markers to their new locations based on the data retrieved from online connections on each refresh. As far as I know gmaps has a javascript API so the first idea in my mind was to embed this mapview into a java applet. So the application will run on a browser. Im not sure if this will work. Do you guys have any idea about this or any other advices you might have? Thanks in advance!!!

    Read the article

  • Need Google Map InfoWindow Hyperlink to Open Content in Overlay (Fusion Table Usage)

    - by McKev
    I have the following code established to render the map in my site. When the map is clicked, the info window pops up with a bunch of content including a hyperlink to open up a website with a form in it. I would like to utilize a function like fancybox to open up this link "form" in an overlay. I have read that fancybox doesn't support calling the function from within an iframe, and was wondering if there was a way to pass the link data to the DOM and trigger the fancybox (or another overlay option) in another way? Maybe a callback trick - any tips would be much appreciated! <style> #map-canvas { width:850px; height:600px; } </style> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> <script src="http://gmaps-utility-gis.googlecode.com/svn/trunk/fusiontips/src/fusiontips.js" type="text/javascript"></script> <script type="text/javascript"> var map; var tableid = "1nDFsxuYxr54viD_fuH7fGm1QRZRdcxFKbSwwRjk"; var layer; var initialLocation; var browserSupportFlag = new Boolean(); var uscenter = new google.maps.LatLng(37.6970, -91.8096); function initialize() { map = new google.maps.Map(document.getElementById('map-canvas'), { zoom: 4, mapTypeId: google.maps.MapTypeId.ROADMAP }); layer = new google.maps.FusionTablesLayer({ query: { select: "'Geometry'", from: tableid }, map: map }); //http://gmaps-utility-gis.googlecode.com/svn/trunk/fusiontips/docs/reference.html layer.enableMapTips({ select: "'Contact Name','Contact Title','Contact Location','Contact Phone'", from: tableid, geometryColumn: 'Geometry', suppressMapTips: false, delay: 500, tolerance: 8 }); ; // Try W3C Geolocation (Preferred) if(navigator.geolocation) { browserSupportFlag = true; navigator.geolocation.getCurrentPosition(function(position) { initialLocation = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); map.setCenter(initialLocation); //Custom Marker var pinColor = "A83C0A"; var pinImage = new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|" + pinColor, new google.maps.Size(21, 34), new google.maps.Point(0,0), new google.maps.Point(10, 34)); var pinShadow = new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_shadow", new google.maps.Size(40, 37), new google.maps.Point(0, 0), new google.maps.Point(12, 35)); new google.maps.Marker({ position: initialLocation, map: map, icon: pinImage, shadow: pinShadow }); }, function() { handleNoGeolocation(browserSupportFlag); }); } // Browser doesn't support Geolocation else { browserSupportFlag = false; handleNoGeolocation(browserSupportFlag); } function handleNoGeolocation(errorFlag) { if (errorFlag == true) { //Geolocation service failed initialLocation = uscenter; } else { //Browser doesn't support geolocation initialLocation = uscenter; } map.setCenter(initialLocation); } } google.maps.event.addDomListener(window, 'load', initialize); </script>

    Read the article

  • infoWindow on MarkerClusterer in google maps

    - by vishwanath
    I need infoWindow to be opened instead of zooming in map, when clicking on the ClusterMarker. I am using Gmaps util library MarkerClusterer for creating cluster of markers. I tried changing following line in markerclusterer.js ClusterMarker_.prototype = new GOverlay(); with ClusterMarker_.prototype = new GMarker(); so that I can get the openInfoWindow() function in the clustermarker, but that didnt worked out. Got some error. If possible, Please suggest solution so that this can be done with MarkerClusterer. Or else any other library which will be able to do this. Any help will be appreciated.

    Read the article

  • mootools errors in Joomla...

    - by Luis
    Hi.. I'm having a problem.. the site is working correctly in safari, chrome and firefox (mac and win) but in Internet explorer I get an error related with mootools: Line: 59 Character: 102. The site URL is: http://my-essencia.com I've noticed that mootools is being loaded two times, maybe another component is calling it again, how can I remove this call?? or how can I locate witch component is making this call?? Another thing is the gmaps doesn't work (only in IE)(it worked before) This map is generated by a component named iproperty, I've asked in the support forums but no responses. This is very frustrating because I didn't make the site and I don't know what was installed wrong. Any advice or directions will be very appreciated. Thank you guys, Luis.

    Read the article

  • gmaps4rails version 2 build method

    - by BrainLikeADullPencil
    I installed gmaps4rails for my Rails app, ran the generator, and required the two files like this in my application.js file, along with underscore.js //= require underscore //= require gmaps4rails/gmaps4rails.base //= require gmaps4rails/gmaps4rails.googlemaps adding, as instructed on github https://github.com/apneadiving/Google-Maps-for-Rails, these dependencies in layout.html.erb When I tried to create the demo map from the github page with this code, I got an error that the object doesn't have a build method. Uncaught TypeError: Object # has no method 'build' handler = Gmaps.build('Google'); handler.buildMap({ provider: {}, internal: {id: 'map'}}, function(){ markers = handler.addMarkers([ { "lat": 0, "lng": 0, "picture": { "url": "https://addons.cdn.mozilla.net/img/uploads/addon_icons/13/13028-64.png", "width": 36, "height": 36 }, "infowindow": "hello!" } ]); handler.bounds.extendWith(markers); handler.fitMapToBounds(); }); Indeed, when I look inside the base file that I require in the manifest file there is no build method for that object. How does one create a map in the new version for gmaps4rails?

    Read the article

  • infoWindow on MarkerClusterer

    - by vishwanath
    I need infoWindow to be opened instead of zooming in map, when clicking on the ClusterMarker. I am using Gmaps util library MarkerClusterer for creating cluster of markers. I tried changing following line in markerclusterer.js ClusterMarker_.prototype = new GOverlay(); with ClusterMarker_.prototype = new GMarker(); so that I can get the openInfoWindow() function in the clustermarker, but that didnt worked out. Got some error. If possible, Please suggest solution so that this can be done with MarkerClusterer. Or else any other library which will be able to do this. Any help will be appreciated.

    Read the article

1 2  | Next Page >