Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/k/h/a/khairisuleiman/html/index.php:3) in /home/content/k/h/a/khairisuleiman/html/includes/bootstrap.inc on line 899

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/k/h/a/khairisuleiman/html/index.php:3) in /home/content/k/h/a/khairisuleiman/html/includes/bootstrap.inc on line 899

Warning: Cannot modify header information - headers already sent by (output started at /home/content/k/h/a/khairisuleiman/html/index.php:3) in /home/content/k/h/a/khairisuleiman/html/includes/bootstrap.inc on line 531

Warning: Cannot modify header information - headers already sent by (output started at /home/content/k/h/a/khairisuleiman/html/index.php:3) in /home/content/k/h/a/khairisuleiman/html/includes/bootstrap.inc on line 532

Warning: Cannot modify header information - headers already sent by (output started at /home/content/k/h/a/khairisuleiman/html/index.php:3) in /home/content/k/h/a/khairisuleiman/html/includes/bootstrap.inc on line 533

Warning: Cannot modify header information - headers already sent by (output started at /home/content/k/h/a/khairisuleiman/html/index.php:3) in /home/content/k/h/a/khairisuleiman/html/includes/bootstrap.inc on line 534
Display Simple Map using Ajax Programming | Configure Install Setup Web CMS Configuration

Display Simple Map using Ajax Programming

warning: Cannot modify header information - headers already sent by (output started at /home/content/k/h/a/khairisuleiman/html/index.php:3) in /home/content/k/h/a/khairisuleiman/html/includes/common.inc on line 141.

Display Simple Map Using Simple Ajax Programming On Linux CentOS 5

1)Display simple map
- ajax is javascript
-specify key
-specify GUnload() when unload the page
-create map structural variable
-specify map center latitude, longlitude, magnification.

2)Display control
-magnification
-map type
-scale
-over view

3)Check whether the browser can treat ajax or not
-display message when it cannot treat.

Here come some programming for practise show map.

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="http://maps.google.com/maps?file=api amp;key=ABQIAAAA0oo2CWMuG2w9GltsoA0eXRSwr1upZnm7MvOdlOumyJtIIhTEghQboI1B-Tj7qTlbZmKYfb5K5ZUIZA" type="text/javascript">
</script>
</head>
<body onunload="GUnload()">
<div id="map" style="width:550px;height:450px"></div>
<script type="text/javascript">
var map=new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(43.907787,-79.359741),9);
</script>
</body>
</html>

 Next Example programming show map 2

 <html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA0oo2CWMuG2w9GltsoA0eXRSwr1upZnm7MvOdlOumyJtIIhTEghQboI1B-Tj7qTlbZmKYfb5K5ZUIZA" type="text/javascript">
    </script>
</head>
<body onunload="GUnload()">
    <div id="map" style="width:550px;height:450px"></div>
    <script type="text/javascript">
    var map=new GMap2(document.getElementById("map"));
    map.addControl(new GLargeMapControl());
    map.addControl(new GMapTypeControl());
    map.addControl(new GScaleControl());
    map.addControl(new GOverviewMapControl());    
    map.setCenter(new GLatLng(43.907787,-79.359741),9);
    </script>
</body>
</html>

Next Example programming show map 3

<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA0oo2CWMuG2w9GltsoA0eXRSwr1upZnm7MvOdlOumyJtIIhTEghQboI1B-Tj7qTlbZmKYfb5K5ZUIZA" type="text/javascript">
    </script>
</head>
<body onunload="GUnload()">
    <div id="map" style="width:550px;height:450px"></div>
    <script type="text/javascript">
    if(GBrowserIsCompatible()){
        var map=new GMap2(document.getElementById("map"));
        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());
        map.addControl(new GScaleControl());
        map.addControl(new GOverviewMapControl());   
        map.setCenter(new GLatLng(43.907787,-79.359741),9);
    }else{
        alert("Sorry, the Google Maps API is not compatible with this browser.");
    }
    </script>
</body>
</html>
 


Custom Search