Sunday, April 28, 2013

How to create something like Google Maps for a website?

Q. How does Google Maps work and how would I need to get something like that on a website I'm starting.

Also, I understand Navteq sells map and has a similar online map like Google has. Is it possible to somehow forge a partnership with them?

A. You can license the Google Maps API, to use their maps for your online project.

Otherwise, simply, they are either pre-rendered PNG tiles of various zoom levels, or they are rendered on the fly from raw map data, delivered as PNG tiles, either as the browser requests them.

How do you measure how many miles there are when using Google Maps?
Q. I need to be able to measure how many miles it is from one place to another on Google Maps. But I don't know how. Could someone please help me? Thanks so much to everyone who answered.

A. Google maps labs (a little green chemical bottle in the top right) has an option to add a distance measurement tool. Apparently it is "not ready for prime time" but works well for me.

How do you get google maps on your site?
Q. I want to insert a google maps feature on my site. I want to view certain locations that are listed on my site via google maps on my website. How do I do this?

A. first you need to have api key
http://www.google.com/apis/maps/signup.html
use that adress to take it then. you can use simple exmples from their site.
http://www.google.com/apis/maps/documentation/examples/index.html

you need to know longtitude and latitude data to point the location. here is example code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps JavaScript API Example: Simple Map</title>
<script src="http://maps.google.com/maps?file=api&v=2"
type="text/javascript"></script>
<script type="text/javascript">

function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
}
}

</script>
</head>
<body onload="initialize()" onunload="GUnload()">
<div id="map_canvas" style="width: 500px; height: 300px"></div>
</body>
</html>

if you dont take api of your own your site could not show the maps.




Powered by Yahoo! Answers

No comments:

Post a Comment