Search the Community
Showing results for tags 'maps'.
-
Hey guys, I know that this is quite a longshot but I hope that there is someone here that can help me. We've had problems with our Store Locator on our homepage for quite a long time since it was missing an API Code (which we got today). The site I'm talking about is this: http://www.melon-helmets.com/en/stores The Problem is: I don't know where to put the API. There is this line of code <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> My guess was that I'd have to enter the API key after js?, by adding key=ourkey. It does display the map without an error afterwards, unfortunately it always asks me to enter a zip code or adress, even though I did so. (Tried City/Adress/ZIP Code) Can anyone help me? (I'm fairly poor at html/css/js) Thank you!
-
I got the code below from W3Schools tutorial on Google maps. I also received an API code from google. When I try to put this on my site I get an error message in what looks like an iframe. I think I am suppose to do something additional with my api code. Google had me set a project name and then just generated a code. I don't know if I am suppose to do something besides generate that code in order for it to work for the specific map I want on my site. Can anyone tell me something obivous I am doing wrong or something that I still need to do on google? <script> function myMap() { var mapProp= { center:new google.maps.LatLng(51.508742,-0.120850), zoom:5, }; var map=new google.maps.Map(document.getElementById("googleMap"),mapProp); } </script> <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyARr9stC0XnoFmg2DEqjj5U8sTC_nkvg0A&q&callback=myMap"></script> <iframe width="450" height="250" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/search?AIzaSyARr9stC0XnoFmg2DEqjj5U8sTC_nkvg0A&q=Wayne+State+University" allowfullscreen> </iframe>
-
The geolocation code gives an error Location information is unavailable. Here is the link to the code http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_geolocation_error I don't know why the error is coming. Please help me out I am heavily stuck at this point..
- 1 reply
-
- Geolocation
- Html5
-
(and 1 more)
Tagged with:
-
Hi guys I have been experimenting with Google Maps API and I have been able to create 2 different Maps that do what I want 1 map to do. I have a map with pins that I retrieved from a SQL database and another map that has weather layers using KML. Whenever I try to merge these two maps together both the weather layer and the pins fail to load. I think it has something to do with the function that initializes the maps. In lm.html I always used the initialize function to load the body but in the index.html the template uses a load body function. I think this is what causes the errors I am getting. The file index.html has my pins. You will need the config and xml files . It really just uses the tutorial file here https://developers.google.com/maps/articles/phpsqlajax_v3. This file lm.html is just a maps with my KML weather layers. How can I add weather layers to index.html? config.php index.html lm.html maps_xml.php
-
I'm working on a site and i want to use icons to select travel modes,i have an working function but it only works with a selection input.Is there a way to modify it to be used with buttons? Thanks in advance! Function: function calcRoute() { var selectedMode = document.getElementById("mode").value; var request = { origin: thuis, destination: kabk, // Note that Javascript allows us to access the constant // using square brackets and a string value as its // "property." travelMode: google.maps.TravelMode[selectedMode] }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } }); HTML - Select input <select id="mode" onchange="calcRoute();"> <option value="DRIVING">Driving</option> <option value="WALKING">Walking</option></select> HTML - Button input (?) <form id="mode"> <input type="button" onchange="calcRoute();" value="DRIVING"> <input type="button" onchange="calcRoute();" value="WALKING"></form>
- 2 replies
-
- javascript
- input
- (and 5 more)