|
|
|
|
|
для: ZКатя
(12.08.2014 в 14:06)
| | Опасности они не представляют, а вот попортить крови вполне могут. Некорректные вложения тегов могут быть причиной неверного отображения элементов на странице или даже их отсутствия. Это может зависеть не только от самих некорректных html-элементов, но так же их стилей.
Кроме этого, некорректная верстка может служить причиной некорректной работы клиентских скриптов. | |
|
|
|
|
|
|
|
для: confirm
(11.08.2014 в 12:49)
| | странно... вроде с официального сайта скачала. а чем опасны эти ошибки?) | |
|
|
|
|
|
|
|
для: ZКатя
(11.08.2014 в 10:20)
| | Вот "хвост" вашего индексного файла:
</body>
</div>
</html>
<?php
$gantry->finalize();
?>
|
Это по вашему без ошибок? Я не проверяю весь ваш файл, я его только мелком гляжу, выискивая то, что касается вставке.
Вы могли взять чей-то шаблон его, и возможно без ошибок, но допускаете при выводе, а возможно и сам шаблон кривой. | |
|
|
|
|
|
|
|
для: confirm
(05.08.2014 в 13:59)
| | html код у меня не может содержать ошибок. я его взяла с developers.google.com. в index php тоже ошибок нет никак. это шаблон rockettheme, своего я ничего не придумывала | |
|
|
|
|
|
|
|
для: ZКатя
(05.08.2014 в 13:49)
| | Ну так проблема вставить этот код в ваш так, как я показывал? Стиль объекта map_canvas, его высоту 100% вы указали в стилях? Выводя свой код вы проверяете его на ошибки? Ведь у вас html-результат содержит непростительные ошибки.
Вот тоже самое со вставкой РНР и разбивкой на две колонки:
<!DOCTYPE html>
<head>
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map_canvas { height: 100% }
</style>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?&sensor=false"></script>
<script type="text/javascript">
function initialize() {
// Create an array of styles.
var styles = [
{"stylers":[
{"gamma":0.66},
{"saturation":32},
{"lightness":33},
{"hue":"#1100ff"}
]
}
],
// Create a new StyledMapType object, passing it the array of styles,
// as well as the name to be displayed on the map type control.
styledMap = new google.maps.StyledMapType(styles, {name: "Styled Map"}),
// Create a map object, and include the MapTypeId to add to the map type control.
mapOptions = {
zoom: 13,
center: new google.maps.LatLng(55.86344,37.701832),
mapTypeControlOptions: {mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'map_style']}
},
map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
marker = new google.maps.Marker({
position: new google.maps.LatLng(55.86344,37.701832),
icon: {
path: google.maps.SymbolPath.CIRCLE,
scale: 10
},
draggable: true,
map: map
});
google.maps.event.addDomListener(window, 'load', initialize);
//Associate the styled map with the MapTypeId and set it to display.
map.mapTypes.set('map_style', styledMap);
map.setMapTypeId('map_style');
}
</script>
</head>
<body onload="initialize()">
<h1 style="padding:10px;width:100%;background:#eee;">Map</h1>
<div style="float:left;width:26%;padding:2%">
<?
$s ='<p>Google Maps is a desktop and mobile web mapping service application and technology provided by Google, offering satellite imagery,
street maps, and Street View perspectives, as well as functions such as a route planner for traveling by foot, car, bicycle (beta test),
or with public transportation. Also supported are maps embedded on third-party websites via the Google Maps API,[1] and a locator for
urban businesses and other organizations in numerous countries around the world. Google Maps satellite images are not updated in real
time; however, Google adds data to their Primary Database on a regular basis, and most of the images are no more than 3 years old.</p>
<p>The opt-in redesigned version of the desktop application has been available since 2013, alongside the "classic" (pre-2013) version.
The redesigned version was met by user criticism regarding hiding some common functions, removing a scale bar, and lack of other features
that include My Places and sharable customized links to parametrized split Street View and Map views.</p>
<p>Google Maps uses a close variant of the Mercator projection, and therefore cannot accurately show areas around the poles. A related
product is Google Earth, a stand-alone program which offers more globe-viewing features, including showing polar areas.</p>
<p>Google Maps for mobile is the world\'s most popular app for smartphones, with over 54% of global smartphone owners using it at least
once during the month of August 2013.</p>';
echo $s;
?>
</div>
<div style="float:left;width:70%;" id="map_canvas"></div>
</body>
</html>
|
А если вставлять ваш РНР-код, но и следя за html-структурой, думаете что откажется работать? Ну проверьте еще раз что вы делаете, явно же либо вы не все прописали, либо допускаете ошибки в структуре. | |
|
|
|
|
|
|
|
для: confirm
(05.08.2014 в 13:46)
| | html c картой | |
|
|
|
|
|
|
|
для: ZКатя
(05.08.2014 в 13:42)
| | Какой файл? | |
|
|
|
|
|
|
|
для: confirm
(05.08.2014 в 13:23)
| | этот файл открывается отдельно | |
|
|
|
|
|
|
|
для: ZКатя
(05.08.2014 в 13:04)
| | HTML-код у вас, это нечто. С чего это закрывающий тег DIV следует после закрывающего тега BODY.
Не работает сейчас, значит вы не все сделали что требовалось.
Вот тоже самое, просто без вашего кода:
<!DOCTYPE html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map_canvas { height: 100% }
</style>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?&sensor=false"></script>
<script type="text/javascript">
function initialize() {
// Create an array of styles.
var styles = [
{"stylers":[
{"gamma":0.66},
{"saturation":32},
{"lightness":33},
{"hue":"#1100ff"}
]
}
],
// Create a new StyledMapType object, passing it the array of styles,
// as well as the name to be displayed on the map type control.
styledMap = new google.maps.StyledMapType(styles, {name: "Styled Map"}),
// Create a map object, and include the MapTypeId to add to the map type control.
mapOptions = {
zoom: 13,
center: new google.maps.LatLng(55.86344,37.701832),
mapTypeControlOptions: {mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'map_style']}
},
map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
marker = new google.maps.Marker({
position: new google.maps.LatLng(55.86344,37.701832),
icon: {
path: google.maps.SymbolPath.CIRCLE,
scale: 10
},
draggable: true,
map: map
});
google.maps.event.addDomListener(window, 'load', initialize);
//Associate the styled map with the MapTypeId and set it to display.
map.mapTypes.set('map_style', styledMap);
map.setMapTypeId('map_style');
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas"></div>
</body>
</html>
|
Сохраните это как html файл и запустите. Есть карта? | |
|
|
|
|
 10.7 Кб |
|
|
для: confirm
(05.08.2014 в 12:49)
| | пустые дыры надо потом убрать...сейчас то что я не так сделала? опять нет карты(( | |
|
|
|
|