Search Results

Search found 22769 results on 911 pages for 'google maps markers'.

Page 12/911 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Google Analytics HTTP vs HTTPS

    - by Pelangi
    I want to use Google Analytics on a website that uses both HTTP and HTTPS that works as explained below: Secure pages accessed through https://mydomain.com/secure/* are always on HTTPS. Any access to these pages through HTTP will be redirected to HTTPS. Any other pages will be accessible through both HTTP and HTTPS I have a Google Analytics profile with URL using HTTPS. Will I cover all traffic? Do I need to create another profile using HTTP and how should I apply the other profile?

    Read the article

  • Google crawling the site but refusing to index dynamic content

    - by Omeoe
    I am trying to get Google to index an AJAX site (davidelifestyle.com). It's crawlable with JavaScript turned off and I have also recently implemented _escaped_content_ snapshot mechanism but all that's indexed is a home page and PDF files that are not directly available from the home page. Also when I use Fetch as Google in Webmaster Tools, it downloads the dynamic page but does not index it ("Submit to Index" just reloads the page). Any ideas what might be wrong?

    Read the article

  • Webmaster Tools - Preferred Domain and Google entries

    - by xylar
    Our client has two websites with the same content: example.com somethingelse.com When a user searchs in google for "something else" the example.com site appears in the top 10 results on google. What would happen if we switched the preferred domain in webmaster tools to somethingelse.com? Our client is hoping it will replace the "example.com" result with "somethingelse.com" but I assume this is not the case.

    Read the article

  • Google Ads Blocking Other Site Elements From Loading

    - by Scott Schluer
    I'm using Google DFP to serve Adsense ads. In Google Chrome (this doesn't seem to happen in other browsers), the page will get stuck loading pagead2.googlesyndication.com. It will just load for hours if I let it. In the meantime, only about half or slightly more of the dynamic images on my page will have completed loading. It appears this is blocking other elements on my site from loading. Any suggestions on what I can do to fix this?

    Read the article

  • How to achieve Bing maps like InfoWindow in Google Maps?

    - by BillB
    I'm using Google Maps v3. I really like the InfoWindows found in Bing, as opposed to Google. Screenshots & functionality found here comparing the two: http://www.axismaps.com/blog/2009/07/data-probing-and-info-window-design-on-web-based-maps/ Question: How can I replicate Bing like InfoWindows while using Google Maps v3? UPDATE: To be more specific, what I like about Bing's InfoWindows include: - The pointer dynamically changes sides from left/right/bottom/top, as opposed to Google limited to only have the InfoWindow pointer on the bottom - Bing's InfoWindows use less space - You can configure Bing's InfoWindows to pop up outside of the map bounders so that you don't have to autopan the map to display the marker's InfoWindow

    Read the article

  • Blacklisting specific roads from Google Maps/Mapquest?

    - by Aaron
    I'm looking to build a custom view of a Google Maps type of application for providing directions, but I need to blacklist specific roads or sections of roads. I'm not talking just avoiding highways or Toll Roads. I've been looking through the Google Maps and Mapquest APIs but haven't found anything of use yet. Initially I'm just looking to manually blacklist specific roads that I do not want to drive on, but eventually would like there to be some sort of automatic detection or suggestion. Is there built-in functionality to support blacklisting specific roads in Google Maps or Mapquest? Or is there any known way to hack it together?

    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

  • How to obtain Bing maps like InfoWindow in Google Maps?

    - by BillB
    I'm using Google Maps v3. I really like the InfoWindows found in Bing, as opposed to Google. Screenshots & functionality found here comparing the two: http://www.axismaps.com/blog/2009/07/data-probing-and-info-window-design-on-web-based-maps/ Question: How can I replicate Bing like InfoWindows while using Google Maps v3? UPDATE: To be more specific, what I like about Bing's InfoWindows include: - The pointer dynamically changes sides from left/right/bottom/top, as opposed to Google limited to only have the InfoWindow pointer on the bottom - Bing's InfoWindows use less space - You can configure Bing's InfoWindows to pop up outside of the map bounders so that you don't have to autopan the map to display the marker's InfoWindow

    Read the article

  • Google Chrome Omnibox truncating searches after "#" - I.E. "c# foo" becomes "c"

    - by tony722
    I have recently been finding myself stymied trying to perform searches for c#-related things in Chrome. The problem is that the omnibox truncates the # and everything after it. This means typing c# foo" in the omnibox in Chrome and hitting enter returns highly unhelpful search results for "c" Google. Any tricks or extensions that would allow me to type "c# foo" into the omnibox and return results that are related to c# and foo? Am I the only person with this problem?

    Read the article

  • Google Analytics and Whos.amung.us in realtime visitors, why such an enormous discrepancy?

    - by jacouh
    Since years I use in a site both Google Analytics and Whos.amung.us, both Google analytics and whos.amung.us javascripts are inserted in the same pages in the tracked part of the site. In real-time visitors, why such an enormous discrepancy ? for example at the moment, Google analytics gives me 9 visitors, whos.amung.us indicates 59, a ratio of 6 times? Why whos.amung.us is 6 times optimistic than Google Analytics in terms of the realtime visitors? Google whos.amung.us My question is: whos.amung.us does not detect robots while Google does? GA ignores visitors from some countries, not whos.amung.us? Some robots/bots execute whos.amung.us javascript for tracking? While no robots/bots can execute the tracking javascript provided by Google Analytics? To facilitate your analysis, I copy JS code used below: Google analytics: <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'MyGaAccountNo']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> Whos.amung.us: <script>var _wau = _wau || []; _wau.push(["tab", "MyWAUAccountNo", "c6x", "right-upper"]);(function() { var s=document.createElement("script"); s.async=true; s.src="http://widgets.amung.us/tab.js";document.getElementsByTagName("head")[0].appendChild(s);})();</script> I've aleady signaled this to WAU staff some time ago, NR, I've not done this to Google as they don't handle this kind of feedback. Thank you for your explanations.

    Read the article

  • Google Chrome freezes for seconds

    - by Levan
    I do not know if this is the right place to write about google chrome or not so sorry if it is not after the update ,,Google Chrome 20.0.1132.47" google chrome started to lag ,,It gets stuck for couple of seconds and then it resumes" i think it starts lagging when i enter any flash site when i started chrome from the terminal it showed this before the update non of this appeared ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream ALSA lib pcm_direct.c:980:(snd1_pcm_direct_initialize_slave) unable to install hw params ALSA lib pcm_dsnoop.c:623:(snd_pcm_dsnoop_open) unable to initialize slave ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream ALSA lib pcm_direct.c:980:(snd1_pcm_direct_initialize_slave) unable to install hw params ALSA lib pcm_dsnoop.c:623:(snd_pcm_dsnoop_open) unable to initialize slave ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream ALSA lib pcm_direct.c:980:(snd1_pcm_direct_initialize_slave) unable to install hw params ALSA lib pcm_dsnoop.c:623:(snd_pcm_dsnoop_open) unable to initialize slave ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream ALSA lib pcm_direct.c:980:(snd1_pcm_direct_initialize_slave) unable to install hw params ALSA lib pcm_dsnoop.c:623:(snd_pcm_dsnoop_open) unable to initialize slave ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream ALSA lib pcm_direct.c:980:(snd1_pcm_direct_initialize_slave) unable to install hw params ALSA lib pcm_dsnoop.c:623:(snd_pcm_dsnoop_open) unable to initialize slave ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream ALSA lib pcm_direct.c:980:(snd1_pcm_direct_initialize_slave) unable to install hw params ALSA lib pcm_dsnoop.c:623:(snd_pcm_dsnoop_open) unable to initialize slave Firefox does not have any problem is there a way to fix this and thank you for your time

    Read the article

  • Track a Adobe Flash app hosted on multiple domains with Google Analytics

    - by roberkules
    I'm working on a flash app that's gonna be distributed to more and more partners (and obviously domains). It needs to be tracked aggregated and also separately. I implemented Google Analytics using gaforflash, tracking virtual pageviews and events inside the flash app. What I want to achieve: View an aggregated report of all partners. Identify the partner not by the domain (where the flash is used), but by a partnerID. Each partner needs access to the report of his domain. (no admin rights needed) I came up with this solution: Using only one "Web property" in Google Analytics. UA-XXXXXX-4 .example.com Set a custom/virtual hostname per partner. (GA's "utmhn" parameter) partner1.example.com partner2.example.com Create a profile for each partner, setting the filter to include only the relevant "subdomain" Problems that came up: The gaforflash library doesn't support overriding the host name. Possible workaround: The gaforflash source code is available, so I could add the functionality. Any goal from the "master" profile is not copied to the partners profile. profile 1: include traffic from hostname ^partner1\. profile 2: include traffic from hostname ^partner2\. Is it (very) bad to fake the hostname? Are there better approaches? Or what improvements could you think of? UPDATE: I'm looking primarily for a solid data structure inside Google Analytics regardless of the flash implementation. The only limitations: We need an aggregated view across all partners Our partners need to have access to their subset of data We want to identify the partner by a custom partnerID, not the domain

    Read the article

  • Major Google not follow increase since introducing 301 to site

    - by jakob
    Recently we implemented Varnish in front of our web nodes so that the backend would get some rest from time to time. Since varnish is case sensitive and our app was not we implemented a 301 in varnish to redirect to small case. Example: You search for PlumBer StockHOLM you will get a 301 redirect to plumber stockholm and then plumber stockholm will be cached. This worked as a charm, but when checking the Google webmaster tools we suddenly got a crazy amount of Status - Not able to follow errors. As you can see in the image below: This of course stirred up some panic and I started to read up on the documentation once again. If I pressed on one of the links I got to the help section where i found this: Well this is strange, but as the day progressed more and more errors were thrown by Google. We took the decision to make varnish return 200 instead of the 301. Now when testing the links that appears in the Not able to follow section I get a 200 back. I have tested with Chrome, curl and lynx reader and everything looks ok but the amount of errors are still increasing. What is a little bit comforting is that the links that appears in the Not able to follow section are dated before the 200 change in varnish. Why do I get these errors and why do they keep increasing? Did google release something new on October 31? Maybe I do not understand the docs correctly?

    Read the article

  • https:// search results appearing on Google for purely http:// site

    - by hydrurga
    I started weeding through my site's search results from Google today, using a site: search, to determine if there are any links that cause 404s and thus need redirecting. To my amazement I noticed numerous https:// results relating to various pages. My site doesn't have a SSL certificate, doesn't serve such pages, doesn't internally link to https:// pages, doesn't include any such files in its sitemap.xml and, for all of these, never has. I decided to do a Google search for https://<my site> and found one site that incorrectly refers to the root of my site with a https:// prefix - I will try to contact them to get them to correct this. I'm not sure however how Googlebot managed to index the non-root files as https://. I can't find any external links to them and surely, without certification, Googlebot should have stalled at the first request? I've just added the following lines to the site's .htaccess (although the surfer still has to navigate through the browser's "This site is a security risk. Abandon hope all ye who enter here!" message(s) first to get there): RewriteEngine On RewriteCond %{HTTPS} on RewriteRule ^(.*)$ http://www.<my site>.org/$1 [R=301,L] replacing <my site> with my domain name. My big question is this though - I would like to use the Google Webmaster Tools Remove URLs feature to remove the https:// pages from the index. Can I be guaranteed that this will only remove the https:// versions of each relevant page and not the valid http:// versions? My thanks to anyone who can help me out with this particular question and the issue in general.

    Read the article

  • My parked domain was de-indexed by Google - what to do?

    - by Programmer Joe
    I have a question about how to handle my domain. In a nutshell, I bought a domain last year from Go Daddy. My intention was to launch a real site with this domain and I have spent the last year working on my site. For the last year, I have been using the default Go Daddy page display for an up and coming site. When I first bought this site, it was indexed by Google - you could search for "alphabanter" and my site would show up on the search result page for Google. Several months ago, it seemed Google de-indexed my domain and if you type "alphabanter," my domain no longer shows up on the list of search results. However, if you search for "www.alphabanter.com", that's the only way it shows up in the search results for Google. Anyways, I am about to launch my site for real. However, I don't quite know if I can get my site back into Google's index. I have a few questions: 1) Was my domain permanently penalized by Google and removed from their index just because it was a parked domain? I don't believe I have done anything abusive other than using the Go Daddy default page for almost a year because my site was not ready. 2) Should I just launch my site, put a few backlinks to my site, and hope that Google indexes my site again? 3) Should I submit my site to Google at Google submit your content I assume getting Google to reconsider my site is the last option if none of the above works.

    Read the article

  • Google suddenly only indexes https and not http

    - by spender
    So all of a sudden, searches for our site "radiotuna" give out the result as an HTTPS link. https://www.google.com/?q=radiotuna#hl=en&safe=off&output=search&sclient=psy-ab&q=radiotuna&oq=radiotuna&gs_l=hp.12...0.0.0.3499.0.0.0.0.0.0.0.0..0.0.les%3B..0.0...1c.LnOvBvgDOBk&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=177c7ff705652ec3&biw=1366&bih=602 We only use https for the download of two specific files (these urls are resources used for autoupdate functionality of an app we distribute). All other parts of the site should be served over http. We wouldn't like to see any other traffic over https, nor any of our site links to appear in search engines as https. I'd like to address this issue. It seems that the following solutions are available: hand out an https specific robots.txt as such: User-agent: * Disallow: / and/or at app-level, 301 permanent redirect all requests (except the two above) to HTTP if they come in as HTTPS. My concern with the robots method is that, say (for some reason) google decided not to index http pages, disallowing https pages might mean that google has nothing left to index with disastrous consequences for our ranking. This means I'm inclined to go with a 301 redirect. Any thoughts?

    Read the article

  • Need help writing jQuery to loop through table and inject markers into google map?

    - by abemonkey
    I am new to jQuery. I've done some simple things with it but what I am attempting now is a over my head and I need some help. I am building a locator for all the firearms dealers in the US for a client. I am working within Drupal. I have a proximity search by zip code that works great. If you search by zip a list of paginated results shows up in an html table that can by paged through via ajax. I would like a map to be above this list with markers corresponding to the names and addresses being listed. I already have all the lat and long values in the table results. I want the script to update the markers and automatically zoom to fit the markers in the view when a user changes the sort order of the table or pages through the results. Also, I'd like to have a hover highlight effect over the rows of the table that simultaneously highlight the corresponding marker, and have a click on the table row equal a click on a marker that pops up a marker info window to be populated using jQuery to read the name and address fields of the table. Hope this all makes sense. I know I'm putting a lot out there, I'm not asking for someone to write the whole script, just wanted to give as many details as possible. Thanks for any help. I'm just lost when it comes to looping and moving data around. If you want to check out what I have so far on the project please visit: www.axtsweapons.com and login with the username: "test" and the password: "1234" and then visit this direct link: www.axtsweapons.com/ffllocator. For just a simple page that would be easy to manipulate and play with goto: http://www.axtsweapons.com/maptest.html Thanks!

    Read the article

  • Google Maps API Geocode gives error "Invalid label" in Firefox

    - by Bennystijn
    Today I struggled with the following: $.ajax({url:'http://maps.google.com/maps/api/geocode/jsonaddress=Karachi&sensor=false&output=json&callback=?', dataType: 'json', success: function(data){ //eval("("+data+")"); alert(data); } }); Firefox gives the error "Invalid Label" and Chrome "Uncaught SyntaxError: Unexpected token :". I found a lot of posts about this, and I tried all kinds of things like eval(), but also: $.getJSON('http://maps.google.com/maps/api/geocode/jsonaddress=Karachi&sensor=false&output=json&callback=?', function(data){ //eval("("+data+")"); alert(data); } ); Same result. Also, other json data works fine, for instance flickr ("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?). So it has something to do with the Google Maps API output i guess.. Thanks in advance.

    Read the article

  • Google Maps: Multimarker not working

    - by HyperDevil
    Hi, I want to plot several markers on my map. Found some code on the internet, for that user it worked. The array is generated by PHP, example: var ships = [['61','10.2']['60.5','10.1']]; My Javascript: var map; function load(ships) { initialize(); createShips(ships); } function initialize() { //build the map var myLatlng = new google.maps.LatLng(63.65,10.65); var myOptions = { zoom: 9, center: myLatlng, mapTypeId: google.maps.MapTypeId.TERRAIN } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); } function createShips(ships) { for (var i = 0; i < ships.length; i++) { new google.maps.Marker({ position: new google.maps.LatLng(ships[i][0], ships[i][1]), map: map, title: ships[i][0] }); } } My html function to start the map is: body onload="load()" The map seems to appear, but no markers :(

    Read the article

  • Passing an address inside a WordPress post to a Google Map elsewhere on the Page

    - by ael_ecurai
    Background: My client is building their own WordPress site (using a purchased feature-rich theme), and I'm modifying a child theme as necessary to achieve customizations she wants. The theme comes with a Page template that includes a full-width Google Map across the top, which pulls its marker from a single address set within the Theme Options. It's meant to be used for one main "Contact Us" page. The client's business has several locations, and she wants each location's page to include such a map. (Example linked below.) It seems that the ideal solution would be the ability to specify an address within a shortcode in the Post, and have that set the map marker. Here's how the theme makes the map (where $mapAddress is the address from the Theme Options): <?php $mapAddress = ot_get_option( 'map_address' ); $mapHeight = ot_get_option( 'map_height' ); $mapContent = ot_get_option( 'map_content' ); ?> <section id="block-map-wrapper"> <div id="block-map" class="clearfix"> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=true"></script> <script> jQuery(document).ready(function(){ // Map Options var mapOptions = { zoom: 15, scrollwheel: false, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL, position: google.maps.ControlPosition.TOP_LEFT }, mapTypeControl: true, scaleControl: false, panControl: false, mapTypeId: google.maps.MapTypeId.ROADMAP }; // The Map Object var map = new google.maps.Map(document.getElementById("map"), mapOptions); var address = ""; var geocoder = new google.maps.Geocoder(); geocoder.geocode({ "address" : "<?php echo $mapAddress; ?>" }, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { address = results[0].geometry.location; map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ position: address, map: map, clickable: true, animation: google.maps.Animation.DROP }); var infowindow = new google.maps.InfoWindow({ content: "<?php echo $mapContent; ?>" }); google.maps.event.addListener(marker, "click", function() { infowindow.open(map, marker); }); } }); }); </script> <div id="map" class = "map" style = "width: 100%; height: <?php echo $mapHeight; ?>px"></div> </div><!-- #block-map --> <div class="shadow-bottom"></div> </section><!-- #block-map-wrapper --> Here's a test page using a custom Page template I've created. Right now it's using the same map code as above. I've tried creating a shortcode that takes an address attribute and sets it as $mapAddress, but that didn't work. I believe it's because the map is already loaded by the time the Loop gets parsed. How can I tell Maps to "come back" to the post to get the proper address? My specialty lies in HTML & CSS, but Javascript befuddles me fairly easily, so please be explicit when explaining implementation. Bonus: A further goal is to have the locations' parent Page also include such a map, but have multiple markers representing the multiple locations. When taking more than one location, Google Maps only accepts latitude/longitude. I don't want my client to be concerned with coordinates, so I know there's got to be something I can do with the geocoding service so she can just input a list of addresses instead (into the same, or similar, shortcode solution developed for my main question). But I am extra-clueless about how to do that.

    Read the article

  • List All Google Map Marker Images

    - by Dau Thanh Hai
    Do you often use image marker from google or copy it to your server? Where I can get all images list of available markers from google? The list of images such as : http://maps.gstatic.com/intl/en_ALL/mapfiles/dd-end.png http://maps.gstatic.com/intl/en_ALL/mapfiles/dd-start.png

    Read the article

  • Google Maps rendering locally but not in live environment

    - by marcusstarnes
    I have a page that renders a simple google map for a specified location. This map renders without any problems at all when I run it locally on localhost, however, when I deploy this code to our live web servers (using our LIVE google API key for the appropriate domain) it fails to render, and upon putting a series of alerts within the javascript on the page, it appears that the 'Initialize' method (which should be called within body onLoad) is not being called. When I view the HTML source that is rendered on the live server it appears exactly as per the local version of the site (including the call to initialize() within the body onLoad event), albeit with the different maps API key. I have output the host (alert(window.location.host);) to ensure that the key I generated via the google maps api site, corresponds exactly to the live server, which it does. Does anyone have any ideas why it would be working locally but not when deployed to the live servers? The live site is hosted on 2 load-balanced web servers. This is the javascript that is rendered: <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAA-BU8POZj19wRlTaKIXVM9xTz76xxk4yAELG9u79oXrhnLTB5NRRvAZ-bkKn1x8J68nfRTVOIWNPJEA" type="text/javascript"></script> <script type="text/javascript"> var map; var geocoder; alert(window.location.host); function initialize() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("businessMap")); map.setUIToDefault(); geocoder = new GClientGeocoder(); showAddress('St Margarets Street SW1P 3 London'); } } function showAddress(address) { geocoder.getLatLng( address, function(point) { if (!point) { // Address could not be located. jQuery('#googleMap').hide(); } else { map.setCenter(point, 13); var marker = new GMarker(point); map.addOverlay(marker); var html = 'Address info for the marker'; marker.openInfoWindow(html); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); } } ); } </script> Any help would be much appreciated. Thanks.

    Read the article

  • What sort of loop structure to compare checkbox matrix with Google Maps markers?

    - by Kirkman14
    I'm trying to build a map of trails around my town. I'm using an XML file to hold all the trail data. For each marker, I have categories like "surface," "difficulty," "uses," etc. I have seen many examples of Google Maps that use checkboxes to show markers by category. However these examples are usually very simple: maybe three different checkboxes. What's different on my end is that I have multiple categories, and within each category there are several possible values. So, a particular trail might have "use" values of "hiking," "biking," "jogging," and "equestrian" because all are allowed. I put together one version, which you can see here: http://www.joshrenaud.com/pd/trails_withcheckboxes3.html In this version, any trail that has any value checked by the user will be displayed on the map. This version works. (although I should point out there is a bug where despite only one category being checked on load, all markers display anyway. After your first click on any checkbox, the map will work properly) However I now realize it's not quite what I want. I want to change it so that it will display only markers that match ALL the values that are checked (rather than ANY, which is what the example above does). I took a hack at this. You can see the result online, but I can't type a link to it because I am new user. Change the "3" in the URL above to a "4" to see it. My questions are about this SECOND url. (trails_withcheckboxes4.html) It doesn't work. I am pretty new to Javascript, so I am sure I have done something totally wrong, but I can't figure out what. My specific questions: Does anyone see anything glaringly obvious that is keeping my second example from working? If not, could someone just suggest what sort of loop structure I would need to build to compare the several arrays of checkboxes with the several arrays of values on any given marker? Here is some of the relevant code, although you can just view source on the examples above to see the whole thing: function createMarker(point,surface,difficulty,use,html) { var marker = new GMarker(point,GIcon); marker.mysurface = surface; marker.mydifficulty = difficulty; marker.myuse = use; GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); gmarkers.push(marker); return marker; } function show() { hide(); var surfaceChecked = []; var difficultyChecked = []; var useChecked = []; var j=0; // okay, let's run through the checkbox elements and make arrays to serve as holders of any values the user has checked. for (i=0; i<surfaceArray.length; i++) { if (document.getElementById('surface'+surfaceArray[i]).checked == true) { surfaceChecked[j] = surfaceArray[i]; j++; } } j=0; for (i=0; i<difficultyArray.length; i++) { if (document.getElementById('difficulty'+difficultyArray[i]).checked == true) { difficultyChecked[j] = difficultyArray[i]; j++; } } j=0; for (i=0; i<useArray.length; i++) { if (document.getElementById('use'+useArray[i]).checked == true) { useChecked[j] = useArray[i]; j++; } } //now that we have our 'xxxChecked' holders, it's time to go through all the markers and see which to show. for (var k=0; k<gmarkers.length; k++) { // this loop runs thru all markers var surfaceMatches = []; var difficultyMatches = []; var useMatches = []; var surfaceOK = false; var difficultyOK = false; var useOK = false; for (var l=0; l<surfaceChecked.length; l++) { // this loops runs through all checked Surface categories for (var m=0; m<gmarkers[k].mysurface.length; m++) { // this loops through all surfaces on the marker if (gmarkers[k].mysurface[m].childNodes[0].nodeValue == surfaceChecked[l]) { surfaceMatches[l] = true; } } } for (l=0; l<difficultyChecked.length; l++) { // this loops runs through all checked Difficulty categories for (m=0; m<gmarkers[k].mydifficulty.length; m++) { // this loops through all difficulties on the marker if (gmarkers[k].mydifficulty[m].childNodes[0].nodeValue == difficultyChecked[l]) { difficultyMatches[l] = true; } } } for (l=0; l<useChecked.length; l++) { // this loops runs through all checked Use categories for (m=0; m<gmarkers[k].myuse.length; m++) { // this loops through all uses on the marker if (gmarkers[k].myuse[m].childNodes[0].nodeValue == useChecked[l]) { useMatches[l] = true; } } } // now it's time to loop thru the Match arrays and make sure they are all completely true. for (m=0; m<surfaceMatches.length; m++) { if (surfaceMatches[m] == true) { surfaceOK = true; } else if (surfaceMatches[m] == false) {surfaceOK = false; break; } } for (m=0; m<difficultyMatches.length; m++) { if (difficultyMatches[m] == true) { difficultyOK = true; } else if (difficultyMatches[m] == false) {difficultyOK = false; break; } } for (m=0; m<useMatches.length; m++) { if (useMatches[m] == true) { useOK = true; } else if (useMatches[m] == false) {useOK = false; break; } } // And finally, if each of the three OK's is true, then let's show the marker. if ((surfaceOK == true) && (difficultyOK == true) && (useOK == true)) { gmarkers[i].show(); } } }

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >