<div class="map-container"> <div id="map_<?php echo jeo_get_map_id(); ?> " class="map"></div> <?php if (is_single()) { ?> <?php if (jeo_has_marker_location()) { ?> <div class="highlight-point transition has-end" data-end="1300"></div> <?php } ?> <?php } ?> <?php do_action('jeo_map'); ?> </div> <script type="text/javascript">jeo(<?php echo jeo_map_conf(); ?> );</script>
function get_map($map_id = false, $main_map = true, $force = false) { global $post; if (is_single()) { if (!$this->is_map() && !jeo_has_marker_location() && !$force) { return; } else { $single_post_maps_id = get_post_meta($post->ID, 'maps'); if ($single_post_maps_id && !$map_id) { $map_id = array_shift($single_post_maps_id); } } } if ($map_id) { $this->set_map(get_post($map_id)); } else { $map_id = $this->map->ID; } if ($main_map) { add_filter('jeo_map_conf', array($this, 'set_main')); } get_template_part('content', get_post_type($map_id)); if ($main_map) { remove_filter('jeo_map_conf', array($this, 'set_main')); } $map_js_id = 'map_' . $map_id . '_' . $this->map_count; $this->map_count++; return $map_js_id; }