• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Developing a map mashup application

Just an update for the interested: after failing to get beyond a grey rectangle with the Google one...

What? :eek

Code:
[COLOR="Gray"]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GMaps Demo</title>
<style type="text/css">
#map {
    width: 800px;
    height: 600px;
    margin: auto;
}
</style>
</head>
<body>
    <div id="map"></div>
    <script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=[I]YourAPIKey[/I]"></script>
    <script type="text/javascript">
[/COLOR][COLOR="RoyalBlue"]        window.onload = function() {
            if (GBrowserIsCompatible()) {
                var map = new GMap2(document.getElementById("map"));
                map.setCenter(new GLatLng(51.509744, -0.126299), 17);
            }
        };
[/COLOR][COLOR="Gray"]    </script>
</body>
</html>[/COLOR]

is all it takes :)
 

Advertisers

Back
Top