Search Results

Search found 413 results on 17 pages for 'markers'.

Page 2/17 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Google Maps v3 - Adding makers results in duplicate markers

    - by Richard
    Hi guys, I'm having some problems with Google Maps v3. I have an event listener on "bounds_change" that adds all accommodations(markers) within the active bounds. When i move the map slightly, the same markers are added again because they are located in the bounds. So every time I move the map, duplicate markers are added. How can I make sure these markers stay unique? Thanks!! Richard

    Read the article

  • Google Maps API v3.9: Blurry custom markers when zooming

    - by Mike
    So it appears that Google have fixed the blurry map issue with the 3.9 / 3.10 API, which is great. But there's a new one with custom markers. As soon as you zoom in one level, the custom markers become corrupted / blurry. They rectify themselves if zooming out, although the process of zooming out also makes the markers slightly blurry. The 3.8 API does not exhibit this problem with custom markers. Here's a picture illustrating the problem (I suggest you open the image in a new tab; the blurriness isn't as easily visible when the image is scaled to fit this post). The blurring is most noticeable with the straight lines of the paper crane marker: I've had a prod through the HTML, but I can't really tell how the markers are placed on the map. But I thought that I'd put this issue out there for anyone who has experienced similar, or if anyone has any thoughts on how this can be resolved, save waiting to see if it's a glitch in the API.

    Read the article

  • Create Marker Categories & Display Markers on Click Only

    - by MizAkita
    I am trying to create marker categories and display markers on click... For example, "Eat", "Banks", "Places of Interest" and clicking on them would produce only the markers in those categories. You can see it live HERE Here is a code snippet: //<![CDATA[ //<![CDATA[ var map = null; var gmarkers = []; var gicons = []; var icon = []; function initialize() { var myOptions = { zoom: 13, center: new google.maps.LatLng(37.979183,-121.302381), 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); google.maps.event.addListener(map, 'click', function() { infowindow.close(); }); // Add markers to the map // Set up three markers with info windows ///////////////////////// EATS ////////////////////////////////////////////// var point = new google.maps.LatLng(37.988012,-121.311901); var image = 'icons/orangepointer.png'; var marker = createMarker(point,'<div style="width:205"><center><img src="icons/tigeryogurt.jpg" /></center><br><b>Tiger Yogurt</b><small><br>4343 Pacific Avenue<br>209.952.6042<br><br><a href="http://maps.google.com/maps?saddr=&daddr=' + point.toUrlValue() + '" target ="_blank">Get Directions<\/a></small><\/div>', image); // this will be gmarkers[0] var point = new google.maps.LatLng(37.987054,-121.311655); var image = 'icons/orangepointer.png'; var marker = createMarker(point,'<div style="width:205"><center><img src="icons/mwbakery.jpg" /></center><br><b>M&W Bakery<br>Cakes & Sandwiches</b><small><br>4343 Pacific Avenue<br>209.473.3828<br><br>On the web visit:<br><a href="http://www.mandwdutchamericanbakery.com" target ="_blank">MandWDutchAmericanBakery.com<\/a><br><br><a href="http://maps.google.com/maps?saddr=&daddr=' + point.toUrlValue() + '" target ="_blank">Get Directions<\/a></small><\/div>', image); // this will be gmarkers[1] Currently, all markers display. I can easily get the markers not to display... however, i am trying to have only categories display and individual listings to display on click only! CREATE MARKER FUNCTION: } var infowindow = new google.maps.InfoWindow( { size: new google.maps.Size(150,50) }); function triggerClick(i) { google.maps.event.trigger(gmarkers[i],"click") }; function createMarker(latlng, html, img) { var contentString = html; var marker = new google.maps.Marker({ position: latlng, map: map, icon: img, zIndex: Math.round(latlng.lat()*-100000)<<5 }); google.maps.event.addListener(marker, 'click', function() { infowindow.setContent(contentString); infowindow.open(map,marker); }); gmarkers.push(marker); }

    Read the article

  • Large number of Google Map Markers and IE6?

    - by Sivakanesh
    I'm working on an application that generates a large number of Google Map markers (2000 - 7000) via JSON. I'm also using MarkerCluster. It works quick on Chrome and FF but IE6 takes few minutes and just crashes the first time I try to zoom in. I'm not doing any more than just adding the markers to a map using JQuery & GMap API. So I looked at the following URL of the regular Google Map. http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&q=hotel&sll=53.182996,-2.581787&sspn=1.494529,4.927368&ie=UTF8&split=1&rq=1&ev=p&hq=hotel&hnear=&ll=53.123702,-2.730103&spn=1.496594,4.927368&t=h&z=8 It shows a lot of tiny markers (~1000) and works fine on IE6. Do you have any ideas why this works and the markers added via the API struggles? Thanks

    Read the article

  • Determine the lat lngs of markers within a polygon

    - by subh
    I have a google maps app which plots markers as it loads. One of the new requirment is to to add a Polygon overlay encompassing a selection of markers by the user. I was able to achieve that using the Geometry Controls of the GMaps Utility Library Now, the next step is to form a group of the selected markers for which I would need to determine if the lat lngs of the markers falls within the lat lngs of the polygon? Is there a way to determine the lat lngs of a polygon and compute if the marker's lat lng is within its boundaries?

    Read the article

  • Drupal + GMap macro, map markers not displayed

    - by mingos
    Hi. I've run into a strange problem in the GMap module for Drupal. When I display a map inside a node using a GMap macro, everything is displayed correctly (according to what I specify in the macro or leave at default), save for map markers. I'm trying to specify a map marker, but it refuses to be displayed. My macro is the following: [gmap zoom=17 |center=53.77420697757659,20.474138259887695 |markers=big blue::53.77420697757659,20.474138259887695] I was unable to find any help on Drupal forums, both the official one and one local to my country. For completeness' sake, I do not wish to use a GMap view, just add a macro in a regular node. Hope you can help me find a solution. Thanks in advance for your replies...

    Read the article

  • Move markers of line chart/ Format legend

    - by user68753
    Hi all, I have a combination chart with a bar chart and 2 line graphs on secondary axis. have to exactly match the formatting in the screenshot attached ( I do not have the actual excel file. just have a screenshot). If you have a look - you can see the markers on line graphs do not align. The red line markers are skewed slightly to the left. Also, in the legend at the bottom - secondary axis legends are separated out to the bottom. I don't know how to do that either. Any help is greatly appreciated

    Read the article

  • Passing XML markers to Google Map

    - by djmadscribbler
    I've been creating a V3 Google map based on this example from Mike Williams http://www.geocodezip.com/v3_MW_example_map3.html I've run into a bit of a problem though. If I have no parameters in my URL then I get the error "id is undefined idmarkers [id.toLowerCase()] = marker;" in Firebug and only one marker will show up. If I have a parameter (?id=105 for example) then all the sidebar links say 105 (or whatever the parameter in the URL was) instead of their respective label as listed in the XML file and a random infowindow will be opened instead of the window for the id in the URL. Here is my javascript: var map = null; var lastmarker = null; // ========== Read paramaters that have been passed in ========== // Before we go looking for the passed parameters, set some defaults // in case there are no parameters var id; var index = -1; // these set the initial center, zoom and maptype for the map // if it is not specified in the query string var lat = 42.194741; var lng = -121.700301; var zoom = 18; var maptype = google.maps.MapTypeId.HYBRID; function MapTypeId2UrlValue(maptype) { var urlValue = 'm'; switch (maptype) { case google.maps.MapTypeId.HYBRID: urlValue = 'h'; break; case google.maps.MapTypeId.SATELLITE: urlValue = 'k'; break; case google.maps.MapTypeId.TERRAIN: urlValue = 't'; break; default: case google.maps.MapTypeId.ROADMAP: urlValue = 'm'; break; } return urlValue; } // If there are any parameters at eh end of the URL, they will be in location.search // looking something like "?marker=3" // skip the first character, we are not interested in the "?" var query = location.search.substring(1); // split the rest at each "&" character to give a list of "argname=value" pairs var pairs = query.split("&"); for (var i = 0; i < pairs.length; i++) { // break each pair at the first "=" to obtain the argname and value var pos = pairs[i].indexOf("="); var argname = pairs[i].substring(0, pos).toLowerCase(); var value = pairs[i].substring(pos + 1).toLowerCase(); // process each possible argname - use unescape() if theres any chance of spaces if (argname == "id") { id = unescape(value); } if (argname == "marker") { index = parseFloat(value); } if (argname == "lat") { lat = parseFloat(value); } if (argname == "lng") { lng = parseFloat(value); } if (argname == "zoom") { zoom = parseInt(value); } if (argname == "type") { // from the v3 documentation 8/24/2010 // HYBRID This map type displays a transparent layer of major streets on satellite images. // ROADMAP This map type displays a normal street map. // SATELLITE This map type displays satellite images. // TERRAIN This map type displays maps with physical features such as terrain and vegetation. if (value == "m") { maptype = google.maps.MapTypeId.ROADMAP; } if (value == "k") { maptype = google.maps.MapTypeId.SATELLITE; } if (value == "h") { maptype = google.maps.MapTypeId.HYBRID; } if (value == "t") { maptype = google.maps.MapTypeId.TERRAIN; } } } // this variable will collect the html which will eventually be placed in the side_bar var side_bar_html = ""; // arrays to hold copies of the markers and html used by the side_bar // because the function closure trick doesnt work there var gmarkers = []; var idmarkers = []; // global "map" variable var map = null; // A function to create the marker and set up the event window function function createMarker(point, icon, label, html) { var contentString = html; var marker = new google.maps.Marker({ position: point, map: map, title: label, icon: icon, zIndex: Math.round(point.lat() * -100000) << 5 }); marker.id = id; marker.index = gmarkers.length; google.maps.event.addListener(marker, 'click', function () { lastmarker = new Object; lastmarker.id = marker.id; lastmarker.index = marker.index; infowindow.setContent(contentString); infowindow.open(map, marker); }); // save the info we need to use later for the side_bar gmarkers.push(marker); idmarkers[id.toLowerCase()] = marker; // add a line to the side_bar html side_bar_html += '<a href="javascript:myclick(' + (gmarkers.length - 1) + ')">' + id + '<\/a><br>'; } // This function picks up the click and opens the corresponding info window function myclick(i) { google.maps.event.trigger(gmarkers[i], "click"); } function makeLink() { var mapinfo = "lat=" + map.getCenter().lat().toFixed(6) + "&lng=" + map.getCenter().lng().toFixed(6) + "&zoom=" + map.getZoom() + "&type=" + MapTypeId2UrlValue(map.getMapTypeId()); if (lastmarker) { var a = "/about/map/default.aspx?id=" + lastmarker.id + "&" + mapinfo; var b = "/about/map/default.aspx?marker=" + lastmarker.index + "&" + mapinfo; } else { var a = "/about/map/default.aspx?" + mapinfo; var b = a; } document.getElementById("idlink").innerHTML = '<a href="' + a + '" id=url target=_new>- Link directly to this page by id</a> (id in xml file also entry &quot;name&quot; in sidebar menu)'; document.getElementById("indexlink").innerHTML = '<a href="' + b + '" id=url target=_new>- Link directly to this page by index</a> (position in gmarkers array)'; } function initialize() { // create the map var myOptions = { zoom: zoom, center: new google.maps.LatLng(lat, lng), mapTypeId: maptype, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU }, navigationControl: true, mapTypeId: google.maps.MapTypeId.HYBRID }; map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var stylesarray = [ { featureType: "poi", elementType: "labels", stylers: [ { visibility: "off" } ] }, { featureType: "landscape.man_made", elementType: "labels", stylers: [ { visibility: "off" } ] } ]; var options = map.setOptions({ styles: stylesarray }); // Make the link the first time when the page opens makeLink(); // Make the link again whenever the map changes google.maps.event.addListener(map, 'maptypeid_changed', makeLink); google.maps.event.addListener(map, 'center_changed', makeLink); google.maps.event.addListener(map, 'bounds_changed', makeLink); google.maps.event.addListener(map, 'zoom_changed', makeLink); google.maps.event.addListener(map, 'click', function () { lastmarker = null; makeLink(); infowindow.close(); }); // Read the data from example.xml downloadUrl("example.xml", function (doc) { var xmlDoc = xmlParse(doc); var markers = xmlDoc.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { // obtain the attribues of each marker var lat = parseFloat(markers[i].getAttribute("lat")); var lng = parseFloat(markers[i].getAttribute("lng")); var point = new google.maps.LatLng(lat, lng); var html = markers[i].getAttribute("html"); var label = markers[i].getAttribute("label"); var icon = markers[i].getAttribute("icon"); // create the marker var marker = createMarker(point, icon, label, html); } // put the assembled side_bar_html contents into the side_bar div document.getElementById("side_bar").innerHTML = side_bar_html; // ========= If a parameter was passed, open the info window ========== if (id) { if (idmarkers[id]) { google.maps.event.trigger(idmarkers[id], "click"); } else { alert("id " + id + " does not match any marker"); } } if (index > -1) { if (index < gmarkers.length) { google.maps.event.trigger(gmarkers[index], "click"); } else { alert("marker " + index + " does not exist"); } } }); } var infowindow = new google.maps.InfoWindow( { size: new google.maps.Size(150, 50) }); google.maps.event.addDomListener(window, "load", initialize); And here is an example of my XML formatting <marker lat="42.196175" lng="-121.699224" html="This is the information about 104" iconimage="/about/map/images/104.png" label="104" />

    Read the article

  • Google Maps and Json structure

    - by mark
    I found a great script to plot markers on Google Maps. It uses an Json file to laod it. The problem is I don't know what the structure looks like in this case. Can you help? function loadMarkers() { var bounds = map.getBounds(); var zoomLevel = map.getZoom(); $.post("/gmaps/markers/index.php", {zoom: zoomLevel, swLat: bounds.getSouthWest().lat(), swLon: bounds.getSouthWest().lng(), neLat: bounds.getNorthEast().lat(), neLon: bounds.getNorthEast().lng()}, function(data) { processMarkers(data, _smallMarkerSize); }, "json" ); } function processMarkers(webcams, markerSize) { var marker = null; var markersInView = new Array(); var idsInView = new Array(); // Loop through the new webcams for (var i = 0; i < webcams.length; i++) { var idx = markers.indexOf(webcams[i].id); if (idx == -1) { var info_html = "<table class='infowindow'>"; info_html += "<tr><td class='img'>"; info_html += "<img src='" + webcams[i].smallimg + "' /><td>"; info_html += "<td><p><b>" + webcams[i].loc + "</b>"; info_html += "<br /><a href='/webcam/" + webcams[i].url + "' target='_blank'>Show webcam</a></p></td></tr>"; info_html += "</table>"; marker = new WebcamMarker(new GLatLng(webcams[i].latitude, webcams[i].longitude), {image: "" + webcams[i].smallimg + "", height: markerSize, width: markerSize}); marker.myhtml = info_html; map.addOverlay(marker); markersInView[webcams[i].id] = marker; } else { markersInView[webcams[i].id] = markers[webcams[i].id]; } idsInView.push(webcams[i].id); } // Now remove the markers outside of the viewport for (var i = 0; i < webcamids.length; i++) { var idx = markersInView.indexOf(webcamids[i]); if (idx == -1) { marker = markers[webcamids[i]]; map.removeOverlay(marker); } } markers = markersInView; webcamids = idsInView; }

    Read the article

  • Google maps api v3 - multiple markers, multiple infowindows, 3 icons

    - by Adam
    Hello, I wanna made "WiFi maps" and I have problem with do that, I wanna have 3 icons OPEN/WEP/WPA, and a lot of markers, and every marker with own infowindow, and only 1 infowindow on top, so when I will click #1 and then #2 then #1 will hide. And if I will have XXXX markers there will be problem with them on map in zoom out, there is possible to made it like when is much markers in one place all will not show in zoom out but in zoom in yes? I have all info about networks in MySQL database, so in PHP will be easy to show it like in tutorial http://code.google.com/intl/pl/apis/maps/documentation/v3/overlays.html#ComplexIcons <- so follow this can I have for example var nodes = [ ['WKKOZ',50.192843,18.967801,nodewep,1], ['airlive',50.193056,18.967974,nodeopen,2], ['Zurawia-3',50.198398,18.974723,nodeopen,3], ['siec dol',50.19303,18.96796,nodewep,4], ['KP_8_1',50.193092,18.96801,nodewep,5], ['Natalia',50.19286,18.967812,nodewpa,6], ['Z104',50.192591,18.967588,nodewep,7], ['D2',50.192499,18.96876,nodewep,8], ['Niesia',50.192474,18.968239,nodewpa,9], ['boolean',50.192539,18.967545,nodewpa,10], ['neostrada_0d65',50.192179,18.96758,nodewep,11], ['neostrada_2d38',50.192216,18.96761,nodewep,12], ['Belkin_G_Wireless_9B7BF7',50.192191,18.969261,nodeopen,13], ['Trans_FijPn',50.1939,18.979565,nodeopen,14], ['dlinklis',50.193113,18.968024,nodewpa,15] Please help me!:)

    Read the article

  • After Effects CS4: Using layer markers.

    - by GuruAbyss
    I have a question regarding Layer Markers in AE. What I'm trying to do is have a layer start off normal then in the time line I'll place a marker and have it change its color using Effect Color correction Change color to. The hue will change from 0% to 50% for 10 frames then turn back to normal. How would I go about doing this?

    Read the article

  • Change default markers for directions on google maps

    - by Elaine Marley
    I'm a complete noob with google maps api and I started with a given script that I'm editing to what I need to do. In this case I have a map with some points in it that come from a database. They are like this (after I get the lat/lng from the database): var route1 = 'from: 37.496764,-5.913379 to: 37.392587,-6.00023'; var route2 = 'from: 37.392587,-6.00023 to: 37.376964,-5.990838'; routes = [route1, route2]; Then my script does the following: for(var j = 0; j < routes.length; j++) { callGDirections(j); document.getElementById("dbg").innerHTML += "called "+j+"<br>"; } And then the directions: function callGDirections(num) { directionsArray[num] = new GDirections(); GEvent.addListener(directionsArray[num], "load", function() { document.getElementById("dbg").innerHTML += "loaded "+num+"<br>"; var polyline = directionsArray[num].getPolyline(); polyline.setStrokeStyle({color:colors[num],weight:3,opacity: 0.7}); map.addOverlay(polyline); bounds.extend(polyline.getBounds().getSouthWest()); bounds.extend(polyline.getBounds().getNorthEast()); map.setCenter(bounds.getCenter(),map.getBoundsZoomLevel(bounds)); }); // === catch Directions errors === GEvent.addListener(directionsArray[num], "error", function() { var code = directionsArray[num].getStatus().code; var reason="Code "+code; if (reasons[code]) { reason = reasons[code] } alert("Failed to obtain directions, "+reason); }); directionsArray[num].load(routes[num], {getPolyline:true}); } The thing is, I want to change the A and B markers that I get from google on the map to the ones for each of the points that I'm using (each has it's particular icon in the database) but I don't know how to do this. Furthermore, what would be fantastic but I'm clueless if it's even possible is the following: when I get the directions I get something like this: (a) Street A directions (b) Street B And I want (a) Name of first point directions (b) Name of second point (also from database) I understand that my knowledge of the subject is very lacking and the question might be a bit vague, but I would appreciate any tip pointing me in the right direction. EDIT: Ok, I learned a lot from the google api with this problem but I'm still far from what I need. I learned how to hide the default markers doing this: // Hide the route markers when signaled. GEvent.addListener(directionsArray[num], "addoverlay", hideDirMarkers); // Not using the directions markers so hide them. function hideDirMarkers(){ var numMarkers = directionsArray[num].getNumGeocodes() for (var i = 0; i < numMarkers; i++) { var marker = directionsArray[num].getMarker(i); if (marker != null) marker.hide(); else alert("Marker is null"); } } And now when I create new markers doing this: var point = new GLatLng(lat,lng); var marker = createMarker(point,html); map.addOverlay(marker); They appear but they are not clickable (the popup with the html won't show)

    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 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

  • Javascript indexOf() always returns -1

    - by Thomas
    I try to retrieve the index of en element in an array. This works perfectly var onCreate = function (event) { console.assert(markers[markerId] === undefined); var markerId = event.markerId; markers[markerId] = {}; var marker = markers[markerId]; // create the container object marker.object3d = new THREE.Object3D(); marker.object3d.matrixAutoUpdate = false; scene.add(marker.object3d); //UPDATE ARRAY HOLDING CURRENT MARKERS console.log("ON CREATE"); console.log("current detected markers: " + currentMarkers); var idx = currentMarkers.indexOf(markerId); // Find the index console.log("marker " + event.markerId + " has index: " + idx); if(idx==-1) // if does not exist currentMarkers.push(markerId); But this doesnt... var onDelete = function (event) { console.assert(markers[event.markerId] !== undefined); var markerId = event.markerId; //UPDATE ARRAY HOLDING CURRENT MARKERS console.log("ON DELETE"); console.log("current detected markers: " + currentMarkers); var idxx = currentMarkers.indexOf(markerId); // Find the index console.log("marker " + markerId + " has index: " + idxx); if(idxx != -1) {// if DOES exist currentMarkers.splice(idxx, 1); //Delete var idxxx = currentMarkersCoverChecked.indexOf(markerId); // Find the index if(idxxx == -1) // if does NOT exist, so if not being checked checkMarkerCovered(markerId); } onDeleteRandom(markerId); var marker = markers[markerId]; scene.remove(marker.object3d); delete markers[markerId]; Look at my console output: ON CREATE current detected markers: 2,1,4 marker 3 has index: -1 ON CREATE main.js:266 current detected markers: 2,1,4,3 marker 4 has index: 2 ON DELETE current detected markers: 2,1,4,3 marker 2 has index: -1 ON CREATE current detected markers: 2,1,4,3 marker 2 has index: 0 ON DELETE current detected markers: 2,1,4,3 marker 1 has index: -1

    Read the article

  • Using Google Maps v3, PHP and Json to plot markers

    - by bateman_ap
    Hi, I am creating a map using the new(ish) v3 of the Google Maps API I have managed to get a map displaying using code as below: var myLatlng = new google.maps.LatLng(50.8194000,-0.1363000); var myOptions = { zoom: 14, center: myLatlng, mapTypeControl: false, scrollwheel: false, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("location-map"), myOptions); However I now want to add a number of markers I have stored in a PHP array. The Array currently looks like this if I print it out to screen: Array ( [0] => Array ( [poiUid] => 20 [poiName] => Brighton Cineworld [poiCode] => brighton-cineworld [poiLon] => -0.100450 [poiLat] => 50.810780 [poiType] => Cinemas ) [1] => Array ( [poiUid] => 21 [poiName] => Brighton Odeon [poiCode] => brighton-odeon [poiLon] => -0.144420 [poiLat] => 50.821860 [poiType] => Cinemas ) ) All the reading I have done so far suggests I turn this into JSON by using json_encode If I run the Array though this and echo it to the screen I get: [{"poiUid":"20","poiName":"Brighton Cineworld","poiCode":"brighton-cineworld","poiLon":"-0.100450","poiLat":"50.810780","poiType":"Cinemas"},{"poiUid":"21","poiName":"Brighton Odeon","poiCode":"brighton-odeon","poiLon":"-0.144420","poiLat":"50.821860","poiType":"Cinemas"}] The bit now is where I am struggling, I am not sure the encoded array is what I need to start populating markers, I think I need something like the code below but not sure how to add the markers from my passed through JSON var locations = $jsonPoiArray; for (var i = 0;i < locations.length; i += 1) { // Create a new marker };

    Read the article

  • Google Maps 3.0 - Sometimes after removing markers, they stay around...

    - by ewindsor
    Sometimes when I remove markers they stay around in a "ghost" fashion -- they are clickable but there's no more icon. This is not every time and usually only happens when I remove more than one at a time. Here's my code for removing markers: for(var i in markers) { google.maps.event.clearListeners(markers[i], "click"); markers[i].setMap(null); markers[i] = null; delete markers[i]; } The only way to guarantee that they get removed 100% of the time is to move the map to another position. Then when I move it back they are gone 100% of the time. Thanks for your help.

    Read the article

  • Dynamic Overlays slowing down Google Maps (Android 2.1) on Nexus One

    - by Soumya Simanta
    Hi, I'm trying to create a dynamic ItemizedOverylay (please see the code below) on Google Maps (Android 2.1) on a Nexus One. In my Activity (that extends MapActivity) I'm creating a data thread that is receiving data from the network. A 'handler' is used to communicate the data from the receiving thread to map activity. This data contains the locations (lat, lon) of the markers that I want to overlay on my map. The location of each marker is dynamic (i.e., it changes every time I receive new data from the network.) refreshItems(ArrayList<OverlayItem> newItems) method in invoked inside the handleMessage() of the handler. There are around 11 markers in the ArrayList that is passed to refreshItems I can see the markers overlayed on the map. However, I've two issues: The old markers are not removed from the map. After a while I see a trail of markers. The map doesn't respond to any touch commands. I cannot move the map or zoom in or zoom out. After a while I see a system warning that my app is not responding message. Any idea what's wrong here ? Thanks. public class MyItemizedOverlay extends ItemizedOverlay { private ArrayList<OverlayItem> overlayItems; public CoTItemizedOverlay(Drawable defaultMarker) { super(boundCenter(defaultMarker)); overlayItems = new ArrayList<OverlayItem>(); populate(); } public void addNewItem(GeoPoint location, String markerText, String snippet) { overlayItems.add(new OverlayItem(location, markerText, snippet)); populate(); } public void removeItem(int index) { overlayItems.remove(index); populate(); } public void refreshItems(ArrayList<OverlayItem> newItems) { // remove all existing items for (int i = 0; i < cotoverlayItems.size(); i++) { overlayItems.remove(i); } // copy all the times if (newItems != null && cotoverlayItems.size() == 0) { overlayItems.addAll(newItems); } populate(); } @Override protected OverlayItem createItem(int index) { return overlayItems.get(index); } @Override public int size() { return overlayItems.size(); } }

    Read the article

  • Multiple infowindows - tearing my hair out

    - by thewinchester
    Ok, I'll admit I'm nowhere near the best programmer on the planet - and I'm used to the answer staring me right in the face but not making sense of it. Problem I need to display multiple markers on a map, each with their own infowindow. I have created the individual markers without a problem, but don't know how to create the infowindows for each. Steps so far I am generating a map using the V3 API within an ASP-based website, with markers being created from a set of DB records. The markers are created by looping through a rs and defining a marker() with the relevant variables: var myLatlng = new google.maps.LatLng(lat,long); var marker = new google.maps.Marker({ map: map, position: myLatlng, title: 'locationname', icon: 'http://google-maps-icons.googlecode.com/files/park.png' }); This is creating all the relevant markers in their correct locations. What I need to do now, and am not sure of how to achieve is give each of them their own unique infowindow which I can use to display information and links relevant to that marker. Source <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script language="javascript"> $(document).ready(function() { //Google Maps var myOptions = { zoom: 5, center: new google.maps.LatLng(-26.66, 122.25), mapTypeControl: false, mapTypeId: google.maps.MapTypeId.ROADMAP, navigationControl: true, navigationControlOptions: { style: google.maps.NavigationControlStyle.SMALL } } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); <!-- While locations_haslatlong not BOF.EOF --> <% While ((Repeat1__numRows <> 0) AND (NOT locations_haslatlong.EOF)) %> var myLatlng = new google.maps.LatLng(<%=(locations_haslatlong.Fields.Item("llat").Value)%>,<%=(locations_haslatlong.Fields.Item("llong").Value)%>); var marker = new google.maps.Marker({ map: map, position: myLatlng, title: '<%=(locations_haslatlong.Fields.Item("ldescription").Value)%>', icon: 'http://google-maps-icons.googlecode.com/files/park.png', clickable: true, }); <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 locations_haslatlong.MoveNext() Wend %> <!-- End While locations_haslatlong not BOF.EOF --> google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); google.maps.event.addListener(marker, 'dblclick', function() { map.setZoom(14); }); });

    Read the article

  • Java Swing - Drawing markers on JSlider.

    - by Tony Day
    Hi, I have a progress bar which inherits from JSlider to provide highlighting functionality. Highlights can be added to the slider at a point (and a Color) and these are then painted onto the control. As follows: The problem is that I cannot get the highlights in the right place, they need to be in the same location as the markers. I also do not know how to retrieve the left and right margins to where the markers start and end. Is there anyway to get the coordinates of each marker? Or perhaps a better way of performing this task? Many Thanks!

    Read the article

  • Adding ID's to google map markers

    - by Nick
    I have a script that loops and adds markers one at a time. I am trying to get the current marker to have an info window and and only have 5 markers on a map at a time (4 without info windows and 1 with) How would i add an id to each marker so that i can delete and close info windows as needed. this is the function i am using to set the marker function codeAddress(address, contentString) { var infowindow = new google.maps.InfoWindow({ content: contentString }); if (geocoder) { geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location }); infowindow.open(map,marker); } else { alert("Geocode was not successful for the following reason: " + status); } }); } }

    Read the article

  • Show certain InfoWindow in Google Map API V3

    - by pash
    Hello. I wrote the following code to display markers. There are 2 buttons which show Next or Previous Infowindow for markers. But problem is that InfoWindows are not shown using google.maps.event.trigger Can someone help me with this problem. Thank you. Here is code: <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Google Maps JavaScript API v3 Example: Common Loader</title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> var infowindow; var map; var bounds; var markers = []; var markerIndex=0; function initialize() { var myLatlng = new google.maps.LatLng(41.051407, 28.991134); var myOptions = { zoom: 5, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); markers = document.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var latlng = new google.maps.LatLng(parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var marker = createMarker(markers[i].getAttribute("name"), latlng, markers[i].getAttribute("phone"), markers[i].getAttribute("distance")); } rebound(map); } function createMarker(name, latlng, phone, distance) { var marker = new google.maps.Marker({position: latlng, map: map}); var myHtml = "<table style='width:100%;'><tr><td><b>" + name + "</b></td></tr><tr><td>" + phone + "</td></tr><tr><td align='right'>" + distance + "</td></tr></table>"; google.maps.event.addListener(marker, "click", function() { if (infowindow) infowindow.close(); infowindow = new google.maps.InfoWindow({content: myHtml}); infowindow.open(map, marker); }); return marker; } function rebound(mymap){ bounds = new google.maps.LatLngBounds(); for (var i = 0; i < markers.length; i++) { bounds.extend(new google.maps.LatLng(parseFloat(markers[i].getAttribute("lat")),parseFloat(markers[i].getAttribute("lng")))); } mymap.fitBounds(bounds); } function showNextInfo() { if(markerIndex<markers.length-1) markerIndex++; else markerIndex = 0 ; alert(markers[markerIndex].getAttribute('name')); google.maps.event.trigger(markers[markerIndex],"click"); } function showPrevInfo() { if(markerIndex>0) markerIndex--; else markerIndex = markers.length-1 ; google.maps.event.trigger(markers[markerIndex],'click'); } </script> </head> <body onload="initialize()"> <div id="map_canvas" style="width:400px; height:300px"></div> <markers> <marker name='Name1' lat='41.051407' lng='28.991134' phone='+902121234561' distance=''/> <marker name='Name2' lat='40.858746' lng='29.121666' phone='+902121234562' distance=''/> <marker name='Name3' lat='41.014604' lng='28.972256' phone='+902121234562' distance=''/> <marker name='Name4' lat='41.012386' lng='26.978350' phone='+902121234562' distance=''/> </markers> <input type="button" onclick="showPrevInfo()" value="prev">&nbsp;<input type="button" onclick="showNextInfo()" value="next"> </body> </html>

    Read the article

  • Multiple markers in Googe Maps API v3 that link to different pages when clicked

    - by Dave
    I have a map with multiple markers, which I populate via an array. Each marker is clickable and should take the user to a different url per marker. The problem is that all the markers, while displaying the correct title, all use the url of the last entry in the array. Here is my code: var myOptions = { zoom: 9, center: new google.maps.LatLng(40.81940575,-73.95647955), mapTypeId: google.maps.MapTypeId.TERRAIN } var map = new google.maps.Map(document.getElementById("bigmap"), myOptions); setMarkers(map, properties); var properties = [ ['106 Ft Washington Avenue',40.8388485,-73.9436015,'Mjg4'], ['213 Bennett Avenue',40.8574384,-73.9333426,'Mjkz'], ['50 Overlook Terrace',40.8543752,-73.9362542,'Mjky'], ['850 West 176 Street',40.8476012,-73.9417571,'OTM='], ['915 West End Avenue',40.8007478,-73.9692155,'Mjkx']]; function setMarkers(map, buildings) { var image = new google.maps.MarkerImage('map_marker.png', new google.maps.Size(19,32), new google.maps.Point(0,0), new google.maps.Point(10,32)); var shadow = new google.maps.MarkerImage('map_marker_shadow.png', new google.maps.Size(28,32), new google.maps.Point(0,0), new google.maps.Point(10,32)); var bounds = new google.maps.LatLngBounds; for (var i in buildings) { var myLatLng = new google.maps.LatLng(buildings[i][1], buildings[i][2]); bounds.extend(myLatLng); var marker = new google.maps.Marker({ position: myLatLng, map: map, shadow: shadow, icon: image, title: buildings[i][0] }); google.maps.event.addListener(marker, 'click', function() { window.location = ('detail?b=' + buildings[i][3]); }); } map.fitBounds(bounds); } Using this code, clicking any marker take the user to 'detail?b=Mjkx' What am I doing wrong?

    Read the article

  • Adding visible "Markers" to represent Geopoints to a MapView using ItemizedOverlay in Android

    - by LordSnoutimus
    Hello, I am building an application which stores GPS locations in a SQLite database and then outputs the data onto a MapView using an Overlay by drawing a red line between the points. I want to be able to show graphical markers (images) for each of these points as well as the red line. My code is as follows: public class MyOverlay extends ItemizedOverlay { // private Projection projection; private Paint linePaint; private Vector points; public MyOverlay(Drawable defaultMarker) { super(defaultMarker); points = new Vector<GeoPoint>(); //set colour, stroke width etc. linePaint = new Paint(); linePaint.setARGB(255, 255, 0, 0); linePaint.setStrokeWidth(3); linePaint.setDither(true); linePaint.setStyle(Style.FILL); linePaint.setAntiAlias(true); linePaint.setStrokeJoin(Paint.Join.ROUND); linePaint.setStrokeCap(Paint.Cap.ROUND); } public void addPoint(GeoPoint point) { populate(); points.addElement(point); } //public void setProjection(Projection projection) { // this.projection = projection; // } public void draw(Canvas canvas, MapView view, boolean shadow) { populate(); int size = points.size(); Point lastPoint = new Point(); if(size == 0) return; view.getProjection().toPixels(points.get(0), lastPoint); Point point = new Point(); for(int i = 1; i<size; i++){ view.getProjection().toPixels(points.get(i), point); canvas.drawLine(lastPoint.x, lastPoint.y, point.x, point.y, linePaint); lastPoint = point; } } @Override protected OverlayItem createItem(int arg0) { // TODO Auto-generated method stub return null; } @Override public int size() { // TODO Auto-generated method stub return 0; } } What would be the easiest way to implement adding markers for each GeoPoint? Thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >