Jump to content

Recommended Posts

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.

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.

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 by Manhag
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.