Search Results

Search found 103627 results on 4146 pages for 'google code'.

Page 17/4146 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Efficient Map Overlays in on Android Google Map...

    - by Ahsan
    Hi Friends, I want to do the following and am kind of stuck on these for a few days.... 1) I have used helloItemizedOverlay to add about 150 markers and it gets very very slow.....any idea what to do ? I was thinking about threads....(handler) ... 2) I was trying to draw poly lines ( I have encoded polylines, but have managed to decoded those) that move when I move the map.....(the only solution that I found was for Geopoints to be transformed into screen co-ordinates...which wont move if I move the map !) 3) I was looking for some sort of a timer function that executes a given function, say, every 1 minute or so.... 4) I was also looking for ways to clear the Google map from all the markers/lines etc.... Thanks a lot... :) - ahsan

    Read the article

  • Google maps nearest points avoiding rivers / by itinerary

    - by Karl Lacroix
    Here is the deal : I need to find the closest points from a point with a radius. For example, I need to get all the points in a 15 km radius. Thats easy with Google Maps Radius and all the examples on the web ;) The problem is that from my office, a point is under the 15km radius, but it's on the other side of a river, so the car itinerary is about 30 km (using a bridge)! Is there a simple solution to exclude those points or to calculate by intineraries ? I supposed that I'll need to calculate all itineraries with returned points? DirectionsRequest API? Thanks! :)

    Read the article

  • Creating multiple markers in Google Maps using XML

    - by Jessica Stanley
    I'm almost sure this question has been asked before, but for the love of me I just can't find the answer anywhere. Basically what I want to do is create multiple markers on a custom Google Map I'm building. I already have an XML file with the coordinates (lat/lng) and title of each item. I'd like to take the data from the XML file and use it to create markers on the map. I've found how to do this using KML files and MySQL/PHP, but I need to know how to do it in Javascript. One more thing: I have a .xml file of my own, so it won't be like I'll be getting the data from a webpage because I believe (from research I've done today) that the code for that may be different. If anyone knows if this has been posted somewhere else before, could you please direct me there? I've literally been searching all day, this is my last resort. Thanks a ton!!!

    Read the article

  • Google Maps: openInfoWindowTabsHtml + GDownloadUrl (Ajax call) question

    - by Spiros
    I am facing the following problem. On an Google Map I want to add info windows with tabs, where content is loaded from an external file using the GDownloadUrl method. The code works about fine, but with two problems. a) The first time I click on a marker, nothing hapens. I need to click twice to get an info box. After that it works ok. b) When I close an info box and open it again, the tabs repeat themselves. Every time I reopen the info box, those tabs get repeated. So, if using the code below and open the info box 3 times, I get 6 tabs (Info, Photos, Info, Photos, Info, Photos). Any idea of what I am doing wrong here? I have also tried this with JQuery's $.get method, but the results are exactly the same. function createREMarker(lat,long,reID) { var reMarker = new GMarker(rePoint,iconRE); GEvent.addListener(reMarker, "click", function() { GDownloadUrl('testcontent.php?reID='+reID+'&what=info', function(data) { content1 = data; }); GDownloadUrl('testcontent.php?reID='+reID+'&what=photos', function(data) { content2 = data; }); tabs.push(new GInfoWindowTab('Info', '<div id="mapOverlayContent" style="width:375px; height:220px; overflow:auto;">'+content1+'</div>')); tabs.push(new GInfoWindowTab('Photos', '<div id="mapOverlayContent" style="width:375px; height:220px; overflow:auto;">'+content2+'</div>')); reMarker.openInfoWindowTabsHtml(tabs); }); return reMarker; };

    Read the article

  • google maps api v2 - dynamic load (tens of thousands of) markers

    - by Adam
    Hello, how made with JavaScript+PHP+MYSQL and Google Maps API v2 dynamic load of markers? atm I have map follow example http://googlemapsapi.martinpearman.co.uk/infusions/google_maps_api/basic_page.php?map_id=8 but my marker_data_01.php (where are all markers listed - look code of example) have atm 4MB and will only have more, and more. So the question is: how load only this markers to marker_data_01.php (of some other modification of it, can be on same file as map, meaningless, I load it all from MySQL atm) what I look now: so for example (I dont know what number will good but I write this only for show what I wanna made OR JUST something like it), so top left corner for example have position: 10, top right corner for example have position: 30, bottom left corner for example have position: 5, bottom right corner for example have position: 15. -- so load only this markers what are in this box 10-30-5-15 with for example GET, and when I move map for example to 17-12-48-20 box then made next GET request and with this mysql quote and download next markers that what I see now, with this I can have map with unlimited markers, and when will be a lot of markers then clustering can link them, so with this ppl dont will need do "preload" of all markers DB (what have 4mb now and will have more), but only download that what they see at the moment, I know that is possible because a lot sites have it but I am not master of code langs, I know only a bit php and mysql (and html) :) // sorry for my english

    Read the article

  • Random strange behaviour on Google Maps v2

    - by fesja
    hi, I'm having a particular fight with Google Maps v2 on Chrome. The map is shown well on all browsers except Chrome, that without any particular reason, it does any of these things as you can see on the image: Moving the center to the south Showing the markers to the right, but if i move the map, they moved too to the next section of the map. Perfect I have the following javascript: if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); var bounds = new GLatLngBounds(); map.enableScrollWheelZoom(); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.removeMapType(G_HYBRID_MAP); var zoomout = 1; var pcenter_0 = new GLatLng(40.420300, -3.705770); var marker_0 = new GMarker(pcenter_0, {draggable: false}); map.addOverlay(marker_0); marker_0.bindInfoWindowHtml('info', {pixelOffset:new GSize(32,5), maxWidth:200} ); bounds.extend(marker_0.getPoint()); var pcenter_1 = new GLatLng(41.385719, 2.170050); var marker_1 = new GMarker(pcenter_1, {draggable: false}); map.addOverlay(marker_1); marker_1.bindInfoWindowHtml('', {pixelOffset:new GSize(32,5), maxWidth:200} ); bounds.extend(marker_1.getPoint()); var pcenter_2 = new GLatLng(48.856918, 2.341210); var marker_2 = new GMarker(pcenter_2, {draggable: false}); map.addOverlay(marker_2); marker_2.bindInfoWindowHtml('info', {pixelOffset:new GSize(32,5), maxWidth:200} ); bounds.extend(marker_2.getPoint()); var pcenter_3 = new GLatLng(37.779160, -122.420052); var marker_3 = new GMarker(pcenter_3, {draggable: false}); map.addOverlay(marker_3); marker_3.bindInfoWindowHtml('', {pixelOffset:new GSize(32,5), maxWidth:200} ); bounds.extend(marker_3.getPoint()); var pcenter_4 = new GLatLng(48.202541, 16.368799); var marker_4 = new GMarker(pcenter_4, {draggable: false}); map.addOverlay(marker_4); marker_4.bindInfoWindowHtml('', {pixelOffset:new GSize(32,5), maxWidth:200} ); bounds.extend(marker_4.getPoint()); zoomToBounds(zoomout); } function zoomToBounds(zoomout) { map.setCenter(bounds.getCenter()); var zoom = map.getBoundsZoomLevel(bounds)-zoomout; if(zoom < 1) zoom = 1; map.setZoom(zoom); map.checkResizeAndCenter(); } Do you have any idea or clue of what can be happening? It's very annoying to have this random javascript errors.. If you need more info, please ask! thanks! Update to add html code (before javascript) <div id="index_map"> <div id="map"></div> </div> I've aldo updated the markers code

    Read the article

  • loading google maps drawing manager object

    - by psychok7
    So i am using Google Maps Drawing Manager to draw some polygons and i am saving the lat e long coordinates to my database. Now my question is, after i load that to my array, how can i rebuild the saved polygon back into my map? I can't seem to find a code to understand that. this is what i have now : window.initialize_2 = function () { var mapOptions = { center: new google.maps.LatLng(-34.397, 150.644), zoom: 8, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = maplimits; var drawingManager = new google.maps.drawing.DrawingManager({ drawingMode: google.maps.drawing.OverlayType.MARKER, drawingControl: true, drawingControlOptions: { position: google.maps.ControlPosition.TOP_CENTER, drawingModes: [ google.maps.drawing.OverlayType.POLYGON] }, markerOptions: { icon: 'images/beachflag.png' }, polygonOptions: { fillColor: '#ffff00', fillOpacity: 10, strokeWeight: 5, clickable: true, editable: true, zIndex: 1 } }); var coord_listener = google.maps.event.addListener(drawingManager, 'polygoncomplete', function (polygon) { var coordinates = (polygon.getPath().getArray()); console.log(coordinates); window.poly = polygon; }); //delete shape google.maps.event.addListener(drawingManager, 'overlaycomplete', function (e) { if (e.type != google.maps.drawing.OverlayType.MARKER) { // Switch back to non-drawing mode after drawing a shape. drawingManager.setDrawingMode(null); // Add an event listener that selects the newly-drawn shape when the user // mouses down on it. var newShape = e.overlay; newShape.type = e.type; google.maps.event.addListener(newShape, 'click', function () { setSelection(newShape); }); setSelection(newShape); } }); // Clear the current selection when the drawing mode is changed, or when the // map is clicked. google.maps.event.addListener(drawingManager, 'drawingmode_changed', clearSelection); google.maps.event.addListener(map, 'click', clearSelection); drawingManager.setMap(map); }

    Read the article

  • Create folder and insert file in Google Drive

    - by web_student
    I am trying to create a new folder in Drive and upload one (or more) files to that created folder. I use the code below, but the result is that both the folder and the file are placed in the root of my Drive. $client->setAccessToken($_SESSION['accessToken']); //create folder $folder_mime = "application/vnd.google-apps.folder"; $folder_name = 'New Folder'; $service = new Google_DriveService($client); $folder = new Google_DriveFile(); $folder->setTitle($folder_name); $folder->setMimeType($folder_mime); $service->files->insert($folder); //upload file $file_name = $_FILES["uploadFile"]["name"]; $file_mime = $_FILES["uploadFile"]["type"]; $file_path = $_FILES["uploadFile"]["tmp_name"]; $service = new Google_DriveService($client); $file = new Google_DriveFile(); $file->setParents(array($folder_name)); $file->setTitle($file_name); $file->setDescription('This is a '.$file_mime.' document'); $file->setMimeType($file_mime); $service->files->insert( $file, array( 'data' => file_get_contents($file_path) ) );

    Read the article

  • Google Docs: Tie the Form with a Spreadsheet to email addresses and responses?

    - by Nick Gorbikoff
    Hello. I'm just trying to figure out if I'm doing something wrong or it's not possible. I created a small form ( I'm trying to get current mailing addresses from my friends and relatives - since I lost my address book) and it ties to a Google Spreadsheet. I sent out a sample to my work address - filled out a form and saved it. However when I go to see the responses - in a spreadsheet - it has a time stamp but it has no email associated with a response - so I don't know who made it ( well in this case I know it's me - but when you have 100 replies?) I understand - it may be great for anonymous surveys - but in this case I'd like to know who responded with what - and I don't wan to make them fill out Email and First Name & Last Name - I already have this information. Any suggestions?

    Read the article

  • Google Drive and sync?

    - by Royi Namir
    Two questions please: Where are Google Drive offline docs stored in my computer? which folder ? (*when accessing docs.google.com/offline) I have a text file in my Google Drive. When I click on it, I can view it only (no edit). The only option to edit is to export it to Google Docs, but now I have 2 files: the original text file and the the editable one. So now I have to sync both the regular file AND the version created by Google Docs. Is that the normal behavior?

    Read the article

  • Announcing RSS feeds of Microsoft All-In-One Code Framework code samples

    - by Jialiang
    Today, we are not only announcing Sample Browser v2 CTP, but we are also excited to announce the availability of RSS feeds of All-In-One Code Framework code samples. By using these feeds, you can easily track and download the new code samples. English RSS feeds All code samples: http://support.microsoft.com/rss/en/rss.xml ASP.NET code samples: http://support.microsoft.com/rss/en/ASPNET.xml Silverlight code samples: http://support.microsoft.com/rss/en/Silverlight.xml Azure code samples: http://support.microsoft.com/rss/en/Azure.xml COM code samples: http://support.microsoft.com/rss/en/COM.xml Data Platform code samples: http://support.microsoft.com/rss/en/Data%20Platform.xml Library code samples: http://support.microsoft.com/rss/en/Library.xml Office dev code samples: http://support.microsoft.com/rss/en/Office.xml VSX code samples: http://support.microsoft.com/rss/en/VSX.xml Windows 7 code samples: http://support.microsoft.com/rss/en/Windows%207.xml Windows Forms code samples: http://support.microsoft.com/rss/en/Windows%20Forms.xml Windows General code samples: http://support.microsoft.com/rss/en/Windows%20General.xml Windows Service code samples: http://support.microsoft.com/rss/en/Windows%20Service.xml Windows Shell code samples: http://support.microsoft.com/rss/en/Windows%20Shell.xml Windows UI code samples: http://support.microsoft.com/rss/en/Windows%20UI.xml WPF code samples: http://support.microsoft.com/rss/en/WPF.xml ??RSS?? ??????:http://support.microsoft.com/rss/zh-cn/codeplex/rss.xml ASP.NET????:http://support.microsoft.com/rss/zh-cn/codeplex/ASPNET.xml Silverlight????:http://support.microsoft.com/rss/zh-cn/codeplex/Silverlight.xml Azure ????: http://support.microsoft.com/rss/zh-cn/codeplex/Azure.xml COM ????: http://support.microsoft.com/rss/zh-cn/codeplex/COM.xml Data Platform ????: http://support.microsoft.com/rss/zh-cn/codeplex/Data%20Platform.xml Library ????: http://support.microsoft.com/rss/zh-cn/codeplex/Library.xml Office dev ????: http://support.microsoft.com/rss/zh-cn/codeplex/Office.xml VSX ????: http://support.microsoft.com/rss/zh-cn/codeplex/VSX.xml Windows 7 ????: http://support.microsoft.com/rss/zh-cn/codeplex/Windows%207.xml Windows Forms ????: http://support.microsoft.com/rss/zh-cn/codeplex/Windows%20Forms.xml Windows General ????: http://support.microsoft.com/rss/zh-cn/codeplex/Windows%20General.xml Windows Service ????: http://support.microsoft.com/rss/zh-cn/codeplex/Windows%20Service.xml Windows Shell ????: http://support.microsoft.com/rss/zh-cn/codeplex/Windows%20Shell.xml Windows UI ????: http://support.microsoft.com/rss/zh-cn/codeplex/Windows%20UI.xml WPF ????: http://support.microsoft.com/rss/zh-cn/codeplex/WPF.xml

    Read the article

  • Google Maps API v3 - Different markers/labels on different zoom levels

    - by krikara
    I was wondering if it is possible that Google has a feature to view different markers on different zoom levels. For example, on zoom level 1, I want one marker over China with the label saying "5". And as the user zooms in, lets say on zoom level 4, I want the previous marker and label to disappear. And I want to have 5 new markers/labels, each on a different city in China all saying "1". Thus China will say a number and all the cities in China will say numbers adding up to China's number. The key concept I am trying to figure out here is how to hide markers and labels based on zoom levels. A constraint for me is that I am living in China currently where google is censored, so a lot of online documents are censored for me, including many of google's documentations. Here is my code thus far <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <title>TM China</title> <style type="text/css"> html, body, #map_canvas { margin: 0; padding: 0; height: 100% } .labels { color: red; background-color: white; font-family: "Lucida Grande", "Arial", sans-serif; font-size: 10px; font-weight: bold; text-align: center; width: 60px; border: 2px solid black; white-space: nowrap; } </style> <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDV0lcdK7C2GHbQAmdkBID70Uppuf-D030&sensor=true"> </script> <script type="text/javascript"> eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7 m(a){2.3=a;2.8=V.1E("1u");2.8.4.C="I: 1m; J: 1g;";2.k=V.1E("1u");2.k.4.C=2.8.4.C}m.l=E 6.5.22();m.l.1Y=7(){n c=2;n h=t;n f=t;n j;n b;n d,K;n i;n g=7(e){p(e.1v){e.1v()}e.2b=u;p(e.1t){e.1t()}};2.1s().24.G(2.8);2.1s().20.G(2.k);2.11=[6.5.9.w(V,"1o",7(a){p(f){a.s=j;i=u;6.5.9.r(c.3,"1n",a)}h=t;6.5.9.r(c.3,"1o",a)}),6.5.9.o(c.3.1P(),"1N",7(a){p(h&&c.3.1M()){a.s=E 6.5.1J(a.s.U()-d,a.s.T()-K);j=a.s;p(f){6.5.9.r(c.3,"1i",a)}F{d=a.s.U()-c.3.Z().U();K=a.s.T()-c.3.Z().T();6.5.9.r(c.3,"1e",a)}}}),6.5.9.w(2.k,"1d",7(e){c.k.4.1c="2i";6.5.9.r(c.3,"1d",e)}),6.5.9.w(2.k,"1D",7(e){c.k.4.1c=c.3.2g();6.5.9.r(c.3,"1D",e)}),6.5.9.w(2.k,"1C",7(e){p(i){i=t}F{g(e);6.5.9.r(c.3,"1C",e)}}),6.5.9.w(2.k,"1A",7(e){g(e);6.5.9.r(c.3,"1A",e)}),6.5.9.w(2.k,"1z",7(e){h=u;f=t;d=0;K=0;g(e);6.5.9.r(c.3,"1z",e)}),6.5.9.o(2.3,"1e",7(a){f=u;b=c.3.1b()}),6.5.9.o(2.3,"1i",7(a){c.3.O(a.s);c.3.D(2a)}),6.5.9.o(2.3,"1n",7(a){f=t;c.3.D(b)}),6.5.9.o(2.3,"29",7(){c.O()}),6.5.9.o(2.3,"28",7(){c.D()}),6.5.9.o(2.3,"27",7(){c.N()}),6.5.9.o(2.3,"26",7(){c.N()}),6.5.9.o(2.3,"25",7(){c.16()}),6.5.9.o(2.3,"23",7(){c.15()}),6.5.9.o(2.3,"21",7(){c.13()}),6.5.9.o(2.3,"1Z",7(){c.L()}),6.5.9.o(2.3,"1X",7(){c.L()})]};m.l.1W=7(){n i;2.8.1r.1q(2.8);2.k.1r.1q(2.k);1p(i=0;i<2.11.1V;i++){6.5.9.1U(2.11[i])}};m.l.1T=7(){2.15();2.16();2.L()};m.l.15=7(){n a=2.3.z("Y");p(H a.1S==="P"){2.8.W=a;2.k.W=2.8.W}F{2.8.G(a);a=a.1R(u);2.k.G(a)}};m.l.16=7(){2.k.1Q=2.3.1O()||""};m.l.L=7(){n i,q;2.8.S=2.3.z("R");2.k.S=2.8.S;2.8.4.C="";2.k.4.C="";q=2.3.z("q");1p(i 1L q){p(q.1K(i)){2.8.4[i]=q[i];2.k.4[i]=q[i]}}2.1l()};m.l.1l=7(){2.8.4.I="1m";2.8.4.J="1g";p(H 2.8.4.B!=="P"){2.8.4.1k="1j(B="+(2.8.4.B*1I)+")"}2.k.4.I=2.8.4.I;2.k.4.J=2.8.4.J;2.k.4.B=0.1H;2.k.4.1k="1j(B=1)";2.13();2.O();2.N()};m.l.13=7(){n a=2.3.z("X");2.8.4.1h=-a.x+"v";2.8.4.1f=-a.y+"v";2.k.4.1h=-a.x+"v";2.k.4.1f=-a.y+"v"};m.l.O=7(){n a=2.1G().1F(2.3.Z());2.8.4.12=a.x+"v";2.8.4.M=a.y+"v";2.k.4.12=2.8.4.12;2.k.4.M=2.8.4.M;2.D()};m.l.D=7(){n a=(2.3.z("14")?-1:+1);p(H 2.3.1b()==="P"){2.8.4.A=2h(2.8.4.M,10)+a;2.k.4.A=2.8.4.A}F{2.8.4.A=2.3.1b()+a;2.k.4.A=2.8.4.A}};m.l.N=7(){p(2.3.z("1a")){2.8.4.Q=2.3.2f()?"2e":"1B"}F{2.8.4.Q="1B"}2.k.4.Q=2.8.4.Q};7 19(a){a=a||{};a.Y=a.Y||"";a.X=a.X||E 6.5.2d(0,0);a.R=a.R||"2c";a.q=a.q||{};a.14=a.14||t;p(H a.1a==="P"){a.1a=u}2.1y=E m(2);6.5.18.1x(2,1w)}19.l=E 6.5.18();19.l.17=7(a){6.5.18.l.17.1x(2,1w);2.1y.17(a)};',62,143,'||this|marker_|style|maps|google|function|labelDiv_|event|||||||||||eventDiv_|prototype|MarkerLabel_|var|addListener|if|labelStyle|trigger|latLng|false|true|px|addDomListener|||get|zIndex|opacity|cssText|setZIndex|new|else|appendChild|typeof|position|overflow|cLngOffset|setStyles|top|setVisible|setPosition|undefined|display|labelClass|className|lng|lat|document|innerHTML|labelAnchor|labelContent|getPosition||listeners_|left|setAnchor|labelInBackground|setContent|setTitle|setMap|Marker|MarkerWithLabel|labelVisible|getZIndex|cursor|mouseover|dragstart|marginTop|hidden|marginLeft|drag|alpha|filter|setMandatoryStyles|absolute|dragend|mouseup|for|removeChild|parentNode|getPanes|stopPropagation|div|preventDefault|arguments|apply|label|mousedown|dblclick|none|click|mouseout|createElement|fromLatLngToDivPixel|getProjection|01|100|LatLng|hasOwnProperty|in|getDraggable|mousemove|getTitle|getMap|title|cloneNode|nodeType|draw|removeListener|length|onRemove|labelstyle_changed|onAdd|labelclass_changed|overlayMouseTarget|labelanchor_changed|OverlayView|labelcontent_changed|overlayImage|title_changed|labelvisible_changed|visible_changed|zindex_changed|position_changed|1000000|cancelBubble|markerLabels|Point|block|getVisible|getCursor|parseInt|pointer'.split('|'),0,{})) var map; var mapOptions = { center: new google.maps.LatLng(35, 105), zoom: 3, mapTypeId: google.maps.MapTypeId.ROADMAP }; var locations = [ ['Hong Kong', 22.39, 114.10, 1885], ['Shanghai', 31.232, 121.47, 5885], ['Beijing', 39.88, 116.40, 6426], ['Guangzhou', 23.129, 113.264, 4067], ['Shenzhen', 22.54, 114.05, 3089], ['Hangzhou', 30.27, 120.15, 954] ]; var infowindow = new google.maps.InfoWindow(); var i; /* for (i = 0; i < locations.length; i++) { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map }); google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { infowindow.setContent(locations[i][0]); infowindow.open(map, marker); } })(marker, i)); } */ function myMarker(options) { if(!options.labelAnchor) { options.labelAnchor = new google.maps.Point(30, 50); } if(!options.labelClass) { options.labelClass = "labels"; } options.map = map; return new MarkerWithLabel(options); } function initialize() { map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); for (i = 0; i < locations.length; i++) { var marker = new MarkerWithLabel({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), draggable: false, map: map, labelContent: locations[i][3], labelAnchor: new google.maps.Point(30, 0), labelClass: "labels", // the CSS class for the label labelStyle: {opacity: 0.75} }); } /* var marker2 = new myMarker({ position: new google.maps.LatLng(20,20), draggable: true, labelContent: "second" }); */ } google.maps.event.addDomListener(window, 'load', initialize); </script> </head> <body onload="initialize()"> <div id="map_canvas" style="width:85%; height:85%"></div> <script type="text/javascript"> </script> </body> </html> EDIT I have been trying to experiment with the MarkerManager, but I can't get the markers to create successfully on different zoom levels. First, I changed my default zoom level to 1, and then I changed my code to what is shown below. function initialize() { map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); /* for (i = 0; i < locations.length; i++) { var marker = new MarkerWithLabel({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), draggable: false, map: map, labelContent: locations[i][3], labelAnchor: new google.maps.Point(30, 0), labelClass: "labels", // the CSS class for the label labelStyle: {opacity: 0.75} }); } */ var listener = google.maps.event.addListener(map, 'bounds_changed', function(){ setupMarkers(); google.maps.event.removeListener(listener); }); } function createCityMarkers() { for (i = 0; i < locations.length; i++) { var marker = new MarkerWithLabel({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), draggable: false, map: map, labelContent: locations[i][3], labelAnchor: new google.maps.Point(30, 0), labelClass: "labels", // the CSS class for the label labelStyle: {opacity: 0.75} }); } } function setupMarkers() { mgr = new MarkerManager(map); google.maps.event.addListener(mgr, 'loaded', function(){ mgr.addMarkers(createCityMarkers(), 4); mgr.refresh(); }); } I have also tried applying the source code of this link as well, but nothing is working out. And when I copy the source code directly to my computer and replace all the icons with markers, the markers still don't appear. I can't seem to figure how to make markers appear using the marker Manager. http://google-maps-utility-library-v3.googlecode.com/svn/tags/markermanager/1.0/examples/weather_map.html

    Read the article

  • google spreadsheet api from android: google-api-java-client or handmade?

    - by yetanothercoderu
    For working with google spreadsheet api from android (2.2) - google suggests using google-api-java-client for android. For that you have to include 5 jars to your android application: guava-r09.jar google-http-client-extensions-android2-1.6.0-beta.jar google-api-client-extensions-android2-1.6.0-beta.jar google-http-client-1.6.0-beta.jar google-api-client-1.6.0-beta.jar and digging into google-api-java-client javadocs for fast-changing api. Does it worth the effort? in term of android specifics and device fragmentation? Isn't it reasonable to write your own simple http response parser or take small existing library like google-spreadsheet-lib-android ? Thanks! UPD: choosed google-api-java-client finally as it has all routine stuff (like parsing http, xml) out of box

    Read the article

  • Jquery mobile and Google maps [on hold]

    - by Jack
    I have been trying to get my google maps to display within a page of a mobile app. The map will display for a second, and then disappear. I have read about a jquery bug, but i can't seem to find a way to get this code to work. any help would be greatly appreciated. <script> var geocoder; var currentLocation; var searchResults; var map; var directionsDisplay; var directionsService; function init(){ geocoder = new google.maps.Geocoder(); if (navigator.geolocation){ navigator.geolocation.watchPosition(showLocation, locationError); } else { alert("Geolocation not supported on this device"); return; } }//init function function showLocation(location){//start showlocation currentLocation = new google.maps.LatLng(location.coords.latitude, location.coords.longitude); $('#lat').attr("value", currentLocation.lat()); $('#lng').attr("value", currentLocation.lng()); geocoder = new google.maps.Geocoder(); geocoder.geocode({'latLng': currentLocation}, function(results, status){ if (status == google.maps.GeocoderStatus.OK){ if (results[0]){ var address = results[0].formatted_address; $('#loc').html(results[0].formatted_address); var info = "Latitude: " + location.coords.latitude + " Longitude: " + location.coords.longitude + "<br />"; info += "Location accurate within " + location.coords.accuracy + " meters <br /> Last Update: " + new Date(location.timestamp).toLocaleString(); $('#acc').html(info); $('#address').attr("value", results[0].formatted_address); }else{ alert('No results found'); }//end else //if(!map) initMap(); }else { $('#loc').html('Geocoder failed due to: ' + status); }//end else });//end of function if (!map) initMap(); }//end showlocation function function locationError(error){ switch(error.code) { case error.PERMISSION_DENIED: alert("Geolocation access denied or disabled. To enable geolocation on your iPhone, go to Settings > General> Location Services"); break; case error.POSITION_UNAVAILABLE: alert("Current location not available"); break; case error.TIMEOUT: alert("Timeout"); break; default: alert("unkown error"); break; }//endswitch }//endlocationerror function initMap(){ var mapOptions = { zoom: 14, mapTypeId: google.maps.MapTypeId.ROADMAP, center: currentLocation };//var mapOptions map = new google.maps.Map(document.getElementById('mapDiv'), mapOptions); google.maps.event.trigger(map, 'resize'); var bounds = new google.maps.LatLngBounds(); bounds.extend(currentLocation); map.fitBounds(bounds); //new code //var center; //function calculateCenter(){ //center = map.getCenter(); //} //google.maps.even.addDomListener(map, 'idle', function(){ //calculateCenter(); //}); //google.maps.even.addListenerOnce(map, 'idle', function(){ //google.maps.even.trigger(map,'resize'); //}); //google.maps.event.addDomListener(window, 'resize', function() { //map.setCenter(center); //});//end new code }//end initMap() //------------------------------------------------------------------------------- $(document).on("pageinit", init);

    Read the article

  • Is Google tracking our web history even when we do not visit Google or if affiliate websites?

    - by Anoyon-12
    I have recently updated to Google Chrome 29.0.1547.76. And when I click a the new tab button there is a new homepage now. Ok. My current settings forbid from third party cookies being set. And I clear all of my browsing data every time I close or well if its been too long browsing. Ok so there is this help dialog that appears first time you open the new tab page. What I did was Cleared all my browsing settings (From Beginning of time) and then again I went to the new tab, the Help dialog appears. And for the third time I did the same and the Same thing Happened. So For the fourth time I cleared all my Browsing data. Clicked open new tab and then. navigate myself to chrome://settings/cookies. and there were So does this mean google is tracking our web History just for using Chrome. I know Its not Illegal because these cookies only appear when you click the new tab Google Chrome 29.0.1547.76. maybe that was the reason google redesigned the entire New:tab page. From this Google is forcing us to allow them track us. I don't want to set another page as my new:tab page. I just want the old one. Google has a long History of invading Privacy without users consent. There was that Safari incident. I am sure you people remember. So can anyone tell me about this issue? I maybe wrong. So please explain.

    Read the article

  • Google chrome cannot be installed

    - by Zxy
    I downloaded latest version of google chrome and then tried to install it. However it gave me errors. I searched through the net and noticed that most of the people's problem solved when they installed missing dependecies. Therefore I tried to install them too but seems like it does not work. zero@ubuntu:~/Downloads$ sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages will be REMOVED: google-chrome-stable:i386 0 upgraded, 0 newly installed, 1 to remove and 23 not upgraded. 1 not fully installed or removed. After this operation, 116 MB disk space will be freed. Do you want to continue [Y/n]? Y (Reading database ... 169296 files and directories currently installed.) Removing google-chrome-stable:i386 ... Processing triggers for man-db ... Processing triggers for desktop-file-utils ... Processing triggers for bamfdaemon ... Rebuilding /usr/share/applications/bamf.index... Processing triggers for gnome-menus ... zero@ubuntu:~/Downloads$ sudo dpkg -i google-chrome-stable_current_i386.deb Selecting previously unselected package google-chrome-stable:i386. (Reading database ... 169201 files and directories currently installed.) Unpacking google-chrome-stable:i386 (from google-chrome-stable_current_i386.deb) ... dpkg: dependency problems prevent configuration of google-chrome-stable:i386: google-chrome-stable:i386 depends on xdg-utils (>= 1.0.2). dpkg: error processing google-chrome-stable:i386 (--install): dependency problems - leaving unconfigured Processing triggers for desktop-file-utils ... Processing triggers for bamfdaemon ... Rebuilding /usr/share/applications/bamf.index... Processing triggers for gnome-menus ... Processing triggers for man-db ... Errors were encountered while processing: google-chrome-stable:i386 Could you please help me? Thanks.

    Read the article

  • Soapi.CS : A fully relational fluent .NET Stack Exchange API client library

    - by Sky Sanders
    Soapi.CS for .Net / Silverlight / Windows Phone 7 / Mono as easy as breathing...: var context = new ApiContext(apiKey).Initialize(false); Question thisPost = context.Official .StackApps .Questions.ById(386) .WithComments(true) .First(); Console.WriteLine(thisPost.Title); thisPost .Owner .Questions .PageSize(5) .Sort(PostSort.Votes) .ToList() .ForEach(q=> { Console.WriteLine("\t" + q.Score + "\t" + q.Title); q.Timeline.ToList().ForEach(t=> Console.WriteLine("\t\t" + t.TimelineType + "\t" + t.Owner.DisplayName)); Console.WriteLine(); }); // if you can think it, you can get it. Output Soapi.CS : A fully relational fluent .NET Stack Exchange API client library 21 Soapi.CS : A fully relational fluent .NET Stack Exchange API client library Revision code poet Revision code poet Votes code poet Votes code poet Revision code poet Revision code poet Revision code poet Votes code poet Votes code poet Votes code poet Revision code poet Revision code poet Revision code poet Revision code poet Revision code poet Revision code poet Revision code poet Revision code poet Revision code poet Revision code poet Votes code poet Comment code poet Revision code poet Votes code poet Revision code poet Revision code poet Revision code poet Answer code poet Revision code poet Revision code poet 14 SOAPI-WATCH: A realtime service that notifies subscribers via twitter when the API changes in any way. Votes code poet Revision code poet Votes code poet Comment code poet Comment code poet Comment code poet Votes lfoust Votes code poet Comment code poet Comment code poet Comment code poet Comment code poet Revision code poet Comment lfoust Votes code poet Revision code poet Votes code poet Votes lfoust Votes code poet Revision code poet Comment Dave DeLong Revision code poet Revision code poet Votes code poet Comment lfoust Comment Dave DeLong Comment lfoust Comment lfoust Comment Dave DeLong Revision code poet 11 SOAPI-EXPLORE: Self-updating single page JavaSript API test harness Votes code poet Votes code poet Votes code poet Votes code poet Votes code poet Comment code poet Revision code poet Votes code poet Revision code poet Revision code poet Revision code poet Comment code poet Revision code poet Votes code poet Comment code poet Question code poet Votes code poet 11 Soapi.JS V1.0: fluent JavaScript wrapper for the StackOverflow API Comment George Edison Comment George Edison Comment George Edison Comment George Edison Comment George Edison Comment George Edison Answer George Edison Votes code poet Votes code poet Votes code poet Votes code poet Revision code poet Revision code poet Answer code poet Comment code poet Revision code poet Comment code poet Comment code poet Comment code poet Revision code poet Revision code poet Votes code poet Votes code poet Votes code poet Votes code poet Comment code poet Comment code poet Comment code poet Comment code poet Comment code poet 9 SOAPI-DIFF: Your app broke? Check SOAPI-DIFF to find out what changed in the API Votes code poet Revision code poet Comment Dennis Williamson Answer Dennis Williamson Votes code poet Votes Dennis Williamson Comment code poet Question code poet Votes code poet About A robust, fully relational, easy to use, strongly typed, end-to-end StackOverflow API Client Library. Out of the box, Soapi provides you with a robust client library that abstracts away most all of the messy details of consuming the API and lets you concentrate on implementing your ideas. A few features include: A fully relational model of the API data set exposed via a fully 'dot navigable' IEnumerable (LINQ) implementation. Simply tell Soapi what you want and it will get it for you. e.g. "On my first question, from the author of the first comment, get the first page of comments by that person on any post" my.Questions.First().Comments.First().Owner.Comments.ToList(); (yes this is a real expression that returns the data as expressed!) Full coverage of the API, all routes and all parameters with an intuitive syntax. Strongly typed Domain Data Objects for all API data structures. Eager and Lazy Loading of 'stub' objects. Eager\Lazy loading may be disabled. When finer grained control of requests is desired, the core RouteMap objects may be leveraged to request data from any of the API paths using all available parameters as documented on the help pages. A rich Asynchronous implementation. A configurable request cache to reduce unnecessary network traffic and to simplify your usage logic. There is no need to go out of your way to be frugal. You may set a distinct cache duration for any particular route. A configurable request throttle to ensure compliance with the api terms of usage and to simplify your code in that you do not have to worry about and respond to 50X errors. The RequestCache and Throttled Queue are thread-safe, so can make as many requests as you like from as many threads as you like as fast as you like and not worry about abusing the api or having to write reams of management/compensation code. Configurable retry threshold that will, by default, make up to 3 attempts to retrieve a request before failing. Every request made by Soapi is properly formed and directed so most any http error will be the result of a timeout or other network infrastructure. A retry buffer provides a level of fault tolerance that you can rely on. An almost identical javascript library, Soapi.JS, and it's full figured big brother, Soapi.JS2, that will enable you to leverage your server cycles and bandwidth for only those tasks that require it and offload things like status updates to the client's browser. License Licensed GPL Version 2 license. Why is Soapi.CS GPL? Can I get an LGPL license for Soapi.CS? (hint: probably) Platforms .NET 3.5 .NET 4.0 Silverlight 3 Silverlight 4 Windows Phone 7 Mono Download Source code lives @ http://soapics.codeplex.com. Binary releases are forthcoming. codeplex is acting up again. get the source and binaries @ http://bitbucket.org/bitpusher/soapi.cs/downloads The source is C# 3.5. and includes projects and solutions for the following IDEs Visual Studio 2008 Visual Studio 2010 ModoDevelop 2.4 Documentation Full documentation is available at http://soapi.info/help/cs/index.aspx Sample Code / Usage Examples Sample code and usage examples will be added as answers to this question. Full API Coverage all API routes are covered Full Parameter Parity If the API exposes it, Soapi giftwraps it for you. Building a simple app with Soapi.CS - a simple app that gathers all traces of a user in the whole stackiverse. Fluent Configuration - Setting up a Soapi.ApiContext could not be easier Bulk Data Import - A tiny app that quickly loads a SQLite data file with all users in the stackiverse. Paged Results - Soapi.CS transparently handles multi-page operations. Asynchronous Requests - Soapi.CS provides a rich asynchronous model that is especially useful when writing api apps in Silverlight or Windows Phone 7. Caching and Throttling - how and why Apps that use Soapi.CS Soapi.FindUser - .net utility for locating a user anywhere in the stackiverse Soapi.Explore - The entire API at your command Soapi.LastSeen - List users by last access time Add your app/site here - I know you are out there ;-) if you are not comfortable editing this post, simply add a comment and I will add it. The CS/SL/WP7/MONO libraries all compile the same code and with the exception of environmental considerations of Silverlight, the code samples are valid for all libraries. You may also find guidance in the test suites. More information on the SOAPI eco-system. Contact This library is currently the effort of me, Sky Sanders (code poet) and can be reached at gmail - sky.sanders Any who are interested in improving this library are welcome. Support Soapi You can help support this project by voting for Soapi's Open Source Ad post For more information about the origins of Soapi.CS and the rest of the Soapi eco-system see What is Soapi and why should I care?

    Read the article

  • Site too large to officially use Google Analytics?

    - by Jeff Atwood
    We just got this email from the Google Analytics team: We love that you love our product and use it as much as you do. We have observed however, that a website you are tracking with Google Analytics is sending over 1 million hits per day to Google Analytics servers. This is well above the "5 million pageviews per month per account" limit specified in the Google Analytics Terms of Service. Processing this amount of data multiple times a day takes up valuable resources that enable us to continue to develop the product for all Google Analytics users. Processing this amount of data multiple times a day takes up valuable resources that enable us to continue to develop the product for all Google Analytics users. As such, starting August 23rd, 2010, the metrics in your reports will be updated once a day, as opposed to multiple times during the course of the day. You will continue to receive all the reports and features in Google Analytics as usual. The only change will be that data for a given day will appear the following day. We trust you understand the reasons for this change. I totally respect this decision, and I think it's very generous to not kick us out. But how do we do this the right way -- what's the official, blessed Google way to use Google Analytics if you're a "whale" website with lots of hits per day? Or, are there other analytics services that would be more appropriate for very large websites?

    Read the article

  • Show count of all google map markers

    - by aland
    Is there any easy way using the api to get a count of all markers on a map? I have a page similar to this http://www.gorissen.info/Pierre/maps/googleMapLocationv3.php where a user can add markers by clicking on the map. I'd also like to show a count of all the markers. I could do this by declaring a global count var and incrementing it in the event listener, but I thought it would be better if there was an API method I could use and I can find it in the docs.

    Read the article

  • Retrieving of coordinates from google maps and search

    - by cheesebunz
    I know there is a way to retrieve the coordinates by clicking on the map, using specifically document.getElementById("lonTb").value=point.x; document.getElementById("latTb").value=point.y; Firstly, i have a html file namely MapToolKit.html, a mapGPS.js and a mapSearch.js. how do i input the coordinates returns into the js? I just need to be able to click the map for coordinates, not neccessary the search returns. Here's the file which i uploaded. http://www.mediafire.com/?0minqxgwzmx

    Read the article

  • google maps api v2 - tens of thousands of markers

    - by Adam
    Hello, my problem is with XXk (aka XX000) markers, atm I have 7k markers and will be more, and more, problem is in marker database, because atm this is 4MB (link to my DB http://tinyurl.com/ybau9ce) and problem is, how load that fast? for example DOWNLOAD only this what are show now, DOWNLOAD because load I have with ClusterMarker and problem is not with java but with download that database I think...

    Read the article

  • Where to post code for open source usage?

    - by Douglas
    I've been working for a few weeks now with the Google Maps API v3, and have done a good bit of development for the map I've been creating. Some of the things I've done have had to be done to add usability where there previously was not any, at least not that I could find online. Essentially, I made a list of what had to be done, searched all over the web for the ways to do what I needed, and found that some were not(at the time) possible(in the "grab an example off the web" sense). Thus, in my working on this map, I have created a number of very useful tools, which I would like to share with the development community. Is there anywhere I could use as a hub, apart from my portfolio ( http://dougglover.com ), to allow people to view and recycle my work? I know how hard it can be to need to do something, and be unable to find the solution elsewhere, and I don't think that if something has been done before, it should necessarily need to be written again and again. Hence open source code, right? Firstly, I was considering coming on here and asking a question, and then just answering it. Problem there is I assume that would just look like a big reputation grab. If not, please let me know and I'll go ahead and do that so people here can see it. Other suggestions appreciated. Some stuff I've made: A (new and improved) LatLng generator Works quicker, generates LatLng based on position of a draggable marker Allows searching for an address to place the marker on/near the desired location(much better than having to scroll to your location all the way from Siberia) Since it's a draggable marker, double-clicking zooms in, instead of creating a new LatLng marker like the one I was originally using The ability to create entirely custom "Smart Paths" Plot LatLng points on the map which connect to each other just like they do using the actual Google Maps Using Dijkstra's algorithm with Javascript, the routing is intelligent and always gives the shortest possible route, using the points provided Simple, easy to read multi-dimensional array system allows for easily adding new points to the grid Any suggestions, etc. appreciated.

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >