Manhag Posted November 25, 2012 Share Posted November 25, 2012 hello i found this site using google maps api http://apps.qiblalocator.com/ext/embed/?address=usa is there any suggestion Quote Link to comment https://forums.phpfreaks.com/topic/271140-how-to-use-google-map-to-do-like-this/ Share on other sites More sharing options...
codefossa Posted November 25, 2012 Share Posted November 25, 2012 I don't know if it changed, but using the regular Google Maps API you could only get like 1000 images per day. That would make this a kind'a worthless idea unless you only needed a few small areas and you saved them to your server. On a side note, nobody is going to write it and do the work for you. You're gonna have to attempt it before anyone (most people) care to help you. The API is pretty easy if you just check out their page. There's also a Javascript API now which I wasn't aware of. Google search "google maps api" and you should find all you need. Quote Link to comment https://forums.phpfreaks.com/topic/271140-how-to-use-google-map-to-do-like-this/#findComment-1394948 Share on other sites More sharing options...
Manhag Posted November 25, 2012 Author Share Posted November 25, 2012 i already searched for it i can make a line bet 2 points but i can't make a line bet center and a fixed point Quote Link to comment https://forums.phpfreaks.com/topic/271140-how-to-use-google-map-to-do-like-this/#findComment-1394949 Share on other sites More sharing options...
Adam Posted November 25, 2012 Share Posted November 25, 2012 What is a "line bet"? I can't seem to work out what that line points to / what the point of it is? As you've already been told though, we're not just going to go read the API documentation and figure out how to do it for you. Post the code you have and explain what it does, and post links to the pages in the API documentation relevant to that code. Quote Link to comment https://forums.phpfreaks.com/topic/271140-how-to-use-google-map-to-do-like-this/#findComment-1394962 Share on other sites More sharing options...
Manhag Posted November 25, 2012 Author Share Posted November 25, 2012 (edited) line between as i told u i can make a line between 2 fixed points but i can't make a line between center and a fixed point here is the code <!DOCTYPE html> <html> <head> <script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCwID2UsBJvwVKEMx_U53brmIC8EOLsBFo&sensor=false"> </script> <script> var bounds = new google.maps.LatLngBounds(); var length = markers.length; for (var i = 0; i < length; i++) { bounds.extend(new google.maps.LatLng(markers[i].lat, markers[i].lng)); map.fitBounds(bounds); } var x=new google.maps.LatLng(52.395715,4.888916); var stavanger=new google.maps.LatLng(markers[i].lat, markers[i].lng); var london=new google.maps.LatLng(51.508742,-0.120850); function initialize() { var mapProp = { center:x, zoom:4, mapTypeId:google.maps.MapTypeId.ROADMAP }; var map=new google.maps.Map(document.getElementById("googleMap"),mapProp); var myTrip=[stavanger,london]; var flightPath=new google.maps.Polyline({ path:myTrip, strokeColor:"#0000FF", strokeOpacity:0.9, strokeWeight:2 }); flightPath.setMap(map); } google.maps.event.addDomListener(window, 'load', initialize); </script> </head> <body> <div id="googleMap" style="width:500px;height:380px;"></div> </body> </html> Edited November 25, 2012 by Manhag Quote Link to comment https://forums.phpfreaks.com/topic/271140-how-to-use-google-map-to-do-like-this/#findComment-1394968 Share on other sites More sharing options...
haku Posted November 25, 2012 Share Posted November 25, 2012 What exactly do you mean by a 'line between center and a fixed point'? You haven't actually told us what it is that you want to do. Quote Link to comment https://forums.phpfreaks.com/topic/271140-how-to-use-google-map-to-do-like-this/#findComment-1395044 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.