Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script src='http://maps.google.com/maps/api/js?sensor=false' type='text/javascript'></script>
- <script src='http://www.geosprocket.com/mapbox-wax/dist/wax.g.js' type='text/javascript'></script>
- <link href='http://www.geosprocket.com/mapbox-wax/theme/controls.css' rel='stylesheet' type='text/css' />
- <script type="text/javascript">
- var tilejson = {
- tilejson: '1.0.0',
- scheme: 'tms',
- tiles: ['http://a.tiles.mapbox.com/landplanner/1.0.0/landplanner5/{z}/{x}/{y}.png'],
- formatter: function(options, data) { return data.NAME }
- };
- </script>
- <script type="text/javascript">
- var geocoder;
- var map;
- function initialize() {
- geocoder = new google.maps.Geocoder();
- var latlng = new google.maps.LatLng(38.184, -78.687);
- var myOptions = {
- zoom: 15,
- center: latlng,
- mapTypeId: google.maps.MapTypeId.HYBRID
- }
- map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
- map.mapTypes.set('mb', new wax.g.connector(tilejson));
- map.setMapTypeId('mb');
- wax.g.interaction(tilejson, map);
- }
- function codeAddress() {
- var address = document.getElementById("address").value;
- geocoder.geocode( { 'address': address}, function(results, status) {
- if (status == google.maps.GeocoderStatus.OK) {
- map.setCenter(results[0].geometry.location);
- var marker = new google.maps.Marker({
- map: map,
- position: results[0].geometry.location
- });
- } else {
- alert("Geocode was not successful for the following reason: " + status);
- }
- });
- }
- </script>
- <!--var m = new google.maps.Map(
- document.getElementById('google-map'), {
- center: new google.maps.LatLng(0, 0),
- disableDefaultUI: true,
- zoom: 1,
- mapTypeId: google.maps.MapTypeId.HYBRID });
- m.mapTypes.set('mb', new wax.g.connector(tilejson));
- m.setMapTypeId('mb');
- wax.g.interaction(m, tilejson);
- -->
Advertisement
Add Comment
Please, Sign In to add comment