Thursday, February 28, 2013

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.

How do I embed Google maps in my website?
Q. I want to embed a Google maps app in my website so visitors can type in their zip code (or City & State) and find the nearest location.

Is it possible to do this for free?

A. Hello lanS,

from Google Maps Support Page:

Embedding a map into a website or blog
Print

You can embed a simple map, a set of driving directions, a local search, or maps created by other users. Here's how:

1. Ensure that the map you'd like to embed appears in the current map display.
2. Click Link to this page in the top-right corner of the map.
3. In the box that pops up, copy the HTML under 'Paste HTML to embed in website,' and paste it into the source code of your website or blog.

If you'd like to adjust the size of the map before you embed it, just click Customize and preview embedded map, select your preferred size, and take a look at the preview map. Once you're happy with what you see, copy the HTML that appears in the box at the bottom of the window.

Keep in mind that you won't be able to embed Traffic maps, Mapplets, and some other Maps features.

For more detailed information on how to add a Google Map to your site, visit http://maps.google.com/help/maps/getmaps


Hope this info help you to embed your map. Take care.

How can i use google maps without using data from a data plan?
Q. Is there an offline version of google maps which I can download to my treo 650? Is there any other free map service i can use withouth a data plan?
I'm using an at&t. I'm going to India in some days and would need it to help me navigate. All i want is a simple map with road names. I don't require the satellite/traffic views

A. I don't think there's a offline version, you need to be able to connect. Regarding that, scroll down and read "Verizon's dirty little secret".

http://www.mobileread.com/forums/showthread.php?t=4182

So depending on who your carrier is, your Treo might be locked into only being able to connect via a data plan. I have unlimited WAP browsing on my Samsung phone for $5 a month, so I use that instead of a data plan. I use google maps via a WAP browser (Opera Mini) or I use MobileGMaps. Mind you I did have to hack the permissions on the phone to keep it from asking if I wanted to allow the application to access the Internet, which was driving me crazy.




Powered by Yahoo! Answers

No comments:

Post a Comment