Jump to content


Photo

How To Use Google Map To Do Like This ?


  • Please log in to reply
5 replies to this topic

#1 Manhag

Manhag

    Member

  • Members
  • PipPip
  • 27 posts

Posted 25 November 2012 - 07:09 AM

hello
i found this site
using google maps api

http://apps.qiblaloc...ed/?address=usa

is there any suggestion

#2 Xaotique

Xaotique

    Advanced Member

  • Members
  • PipPipPip
  • 558 posts
  • LocationPennsylvania, United States
  • Age:21

Posted 25 November 2012 - 10:14 AM

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.

#3 Manhag

Manhag

    Member

  • Members
  • PipPip
  • 27 posts

Posted 25 November 2012 - 10:33 AM

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

#4 Adam

Adam

    Advanced Member

  • Gurus
  • 5,680 posts
  • LocationSheffield / UK

Posted 25 November 2012 - 12:05 PM

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.

#5 Manhag

Manhag

    Member

  • Members
  • PipPip
  • 27 posts

Posted 25 November 2012 - 12:15 PM

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, 25 November 2012 - 12:18 PM.


#6 haku

haku

    Advanced Member

  • Staff Alumni
  • 6,172 posts

Posted 25 November 2012 - 06:29 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com