Ik heb onderstaande code. Op zich werkt dit prima, maar ik zou graag alleen een adres willen invoeren in plaats van Latitude en Longitude. Hoe kan ik dit doen? Ik heb verschillende manieren geprobeerd, maar ik krijg dan een wit scherm ipv de map.
Het is een gecombineerde script trouwens. In plaats van -34.397, 150.644 zou ik dus gewoon een adres willen invoeren. Alle hulp is welkom!Code:
<script> var map, latLng, mapOptions; $(document).ready(function() { //When page loads... $(".tab_content").hide(); //Hide all content $("ul.tabs li:first").addClass("active").show(); //Activate first tab $(".tab_content:first").show(); //Show first tab content //On Click Event $("ul.tabs li").click(function() { $("ul.tabs li").removeClass("active"); //Remove any "active" class $(this).addClass("active"); //Add "active" class to selected tab $(".tab_content").hide(); //Hide all tab content var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content $(activeTab).fadeIn(); //Fade in the active ID content return false; }); // init map var myLatlng = new google.maps.LatLng(-34.397, 150.644); var mapOptions = { center: myLatlng, zoom: 11 }; var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions); var marker = new google.maps.Marker({ position: myLatlng, map: map, title: 'Hello World!' }); var weatherLayer = new google.maps.weather.WeatherLayer({ temperatureUnits: google.maps.weather.TemperatureUnit.CELSIUS }); weatherLayer.setMap(map); var cloudLayer = new google.maps.weather.CloudLayer(); cloudLayer.setMap(map); // Function added to help reset map and container boundaries $(".tabs a").click(function() { $(".tab_container > div").css({'display':'block'}); google.maps.event.trigger(map, 'resize'); map.setCenter(myLatlng); }); }); </script>
- Google Maps v3 Geocoding: Adres invoeren ipv Latitude en Longitude
-
04-03-2014, 21:01 #1
- Berichten
- 576
- Lid sinds
- 18 Jaar
Google Maps v3 Geocoding: Adres invoeren ipv Latitude en Longitude
-
07-03-2014, 07:52 #2
- Berichten
- 576
- Lid sinds
- 18 Jaar
Re: Google Maps v3 Geocoding: Adres invoeren ipv Latitude en Longitude
Niemand een idee?
Plaats een
- + Advertentie
- + Onderwerp
Marktplaats
Webmasterforum
- Websites algemeen
- Sitechecks
- Marketing
- Domeinen algemeen
- Waardebepaling
- CMS
- Wordpress
- Joomla
- Magento
- Google algemeen
- SEO
- Analytics
- Adsense
- Adwords
- HTML / XHTML
- CSS
- Programmeren
- PHP
- Javascript
- JQuery
- MySQL
- Ondernemen algemeen
- Belastingen
- Juridisch
- Grafisch ontwerp
- Hosting Algemeen
- Hardware Info
- Offtopic