GMap을 이용한 컨텐츠 작성 (준비 중)
GMap을 이용한 컨텐츠 작성 (준비 중)
현재 구글 맵을 이용한 부동산 검색 시스템을 작성 중이다.
이에 기존의 부동산 주소 및 건물명 등이 담긴 CSV 파일을 확보,
node import, gmaps, location, views, cck 모듈을 이용해서 만들고 있다.
멋진 놈이 나올 것 같다. 다 작성하게 되면 기재할 예정이다.
<div class="field field-type-text field-field-address">
<h3 class="field-label"><?php print check_plain($node->title) ?></h3>
<div class="field-items">
<div class="field-item"><?php print $node->field_address[0]['view'] ?></div>
</div>
</div>
<div class="field field-type-text field-field-rail" style="width:200px;">
<table>
<tr><td bgcolor="yellow" colspan="3"><h3 class="field-label">rail - station - walk_min</h3></td></tr>
<tr>
<td>
<div class="field-items">
<?php foreach ((array)$node->field_rail as $item) { ?>
<div class="field-item"><?php print $item['view'] ?></div>
<?php } ?>
</div></td>
<td>
<div class="field-items">
<?php foreach ((array)$node->field_station as $item) { ?>
<div class="field-item"><?php print $item['view'] ?></div>
<?php } ?>
</div></td>
<td>
<div class="field-items">
<?php foreach ((array)$node->field_walk_min as $item) { ?>
<div class="field-item"><?php print $item['view'] ?></div>
<?php } ?>
</div></td>
</tr>
</table>
</div>
-------------------------------
<div id="node-<?php print $node->nid; ?>" class="node<?php if ($sticky) { print ' sticky'; } ?>
<?php if (!$status) { print ' node-unpublished'; } ?>">
<?php print $picture ?>
<?php if ($page == 0): ?>
<h2><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
<?php endif; ?>
<div class="content">
<?php
/*
* id - the id of the map every map on a page must have a unique id
* width - width of the map
* height - height of the map
* center - a string of the longitude and latitude of the centre of the map
* zoom - the zoom factor of the google map
* align - the alignment of the map 'right', 'left' or 'center'
* control - the control shown on the map 'Large', 'Small', or 'None'
* type - 'Map', 'Hybrid' or 'Satellite'
* points/markers - a string of points to mark on the map with + between each point
*/
$points = array(
'id' => 'map'.$node->nid,
'width' => '800px',
'height' => '500px',
'latitude' => $location['latitude'],
'longitude'=> $location['longitude'],
'zoom' => 15,
'maptype' => 'Hybrid',
'markers' => array(array(
'markername' => 'blue',
'text'=> $node->title,
'markermode'=> 1,
'opts'=> array('title'=> $node->title),
'latitude' => $location['latitude'],
'longitude' => $location['longitude'],
)),
);
print theme('gmap', array('#settings' => $points));
?>
</div>
</div>
- forum:
- Login to post comments
최근 댓글 목록
2 년 25 주 전
2 년 26 주 전
5 년 12 주 전
5 년 12 주 전
5 년 13 주 전
5 년 13 주 전
5 년 33 주 전
5 년 40 주 전
5 년 40 주 전
5 년 43 주 전