Last active
March 31, 2016 05:01
-
-
Save Alex-Space/a6ff9f9f0463577ccfbf8c3d5019c369 to your computer and use it in GitHub Desktop.
javascript-cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template name: Контакты | |
*/ | |
get_header(); ?> | |
<!-- SECTION map begin --> | |
<section> | |
<div class="container section-container map-section-container"> | |
<div class="map-section-area"> | |
<div id="map"></div> | |
<div class="content"> | |
<?php if ( have_posts() ) : ?> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<?php the_content(); ?> | |
<?php endwhile; ?> | |
<?php endif; ?> | |
<?php wp_reset_query(); ?> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- SECTION map end --> | |
<script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU" type="text/javascript"></script> | |
<script type="text/javascript"> | |
ymaps.ready(init); | |
var commonContent = ymaps.templateLayoutFactory.createClass('<div class="icn_content">$[properties.iconContent]</div>'); | |
var hoverContent = ymaps.templateLayoutFactory.createClass('<div class="icn_content hover">$[properties.iconContent]</div>'); | |
var myMap, | |
placemark; | |
function init(){ | |
myMap = new ymaps.Map("map", { | |
center: [54.95400906068404, 73.27880021166989], | |
zoom: 16, | |
controls: [] | |
}); | |
placemark = new ymaps.Placemark([54.95475, 73.274852], { | |
balloonContent: 'улица 22 декабря, 100', | |
hintContent: 'улица 22 декабря, 100' | |
}, { | |
preset: 'islands#redDotIcon', | |
}); | |
myMap.geoObjects.add(placemark); | |
} | |
</script> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment