2014-03-02 3 views
0

안녕하세요. 웹 링크 용 디렉토리를 실행 중입니다. 현재 사용자가지도에 하나의 위치를 ​​추가 할 수 있습니다. 나는 사용자가 여러 위치에서 할 수있는 방법이되고 싶다. 회사가 10 곳의 다른 위치에 10 개의 사무실을 가지고 있다면 방문자들이 그곳의 목록 페이지에 10 개를 추가 할 수있게되어 방문객들은 그들이 어디에 있는지 알 수있게된다. 내 페이지에서 Google지도 코드를 가져와 작동 방식을 공유 할 수 있습니다. 그러나 모든 목록을 표시하는 홈 페이지에는 Cat 페이지의 모든 목록과 웹 링크 페이지의지도를 보여주는 Category 페이지의 Map이 있습니다. 따라서 Google지도가있는 웹 링크를 추가하는 페이지는 모든지도가 표시되도록 다른지도와 일치해야합니다.Google지도에 여러 점 추가

이 부분은 사용자가 주소를 쓰는 곳입니다.

/*** GOOGLE MAP ***/ 
if(isset($GLOBALS['CORE_THEME']['google']) && $GLOBALS['CORE_THEME']['google'] == 1){ ?> 

<div class="form-row row-fluid customfield"> 
<label class="control-label span3"><?php echo $CORE->_e(array('add','37')); ?> <span  class="required">*</span></label> 
<div class="field_wrapper span9"> 

<div class="row-fluid"> 
<input type="text" placeholder="<?php echo $CORE->_e(array('add','54')); ?>" onchange="getMapLocation(this.value);" name="custom[map_location]" id="form_map_location" class="span10" tabindex="14" value="<?php if(isset($_GET['eid'])){ echo get_post_meta($_GET['eid'],'map_location',true); } ?>"> 
<button class="btn btn-warnings" type="button" tabindex="15" onclick="getMapLocation(jQuery('#form_map_location').val());"><?php echo $CORE->_e(array('button','11')); ?></button></div> 

</div> 
</div> 

사용자가 새로운 상자를로드 할 수 있도록 하나에 ...

채워진 된 후 그래서 제대로을 가지고 좋은 생각 곱해야 주소가 배치 위치 상자 구글지도 부분 :

<div id="showmapbox" <?php if(get_post_meta($_GET['eid'],'map-country',true) == ""){ ? >style="display:none"<?php } ?>> 
<div id="wlt_map_location" style="height:300px;width:100%;"></div> 
<p class="wlt_map_text"> 
<span class="label"> <?php echo $CORE->_e(array('add','46')); ?> </span> 
<?php echo $CORE->_e(array('add','47')); ?>: <span id="wlt_dcountry" class="label label-info"><?php if(isset($_GET['eid']) && get_post_meta($_GET['eid'],'map-country',true) != ""){ echo get_post_meta($_GET['eid'],'map-country',true); }else{ echo '<i class="icon-remove"> </i>'; } ?></span> 
<?php echo $CORE->_e(array('add','48')); ?>: <span id="wlt_dstate" class="label label-info"><?php if(isset($_GET['eid']) && get_post_meta($_GET['eid'],'map-state',true) != ""){ echo get_post_meta($_GET['eid'],'map-state',true); }else{ echo '<i class="icon-remove"> </i>'; } ?></span> 
<?php echo $CORE->_e(array('add','49')); ?>: <span id="wlt_dcity" class="label label-info"><?php if(isset($_GET['eid']) && get_post_meta($_GET['eid'],'map-city',true) != ""){ echo get_post_meta($_GET['eid'],'map-city',true); }else{ echo '<i class="icon-remove"></i>'; } ?></span> 
</p> 
</div> 

<input type="hidden" id="map-long" name="custom[map-log]" <?php if(isset($_GET['eid'])){ echo 'value="'.get_post_meta($_GET['eid'],'map-log',true).'"'; } ?>> 
<input type="hidden" id="map-lat" name="custom[map-lat]" <?php if(isset($_GET['eid'])){ echo 'value="'.get_post_meta($_GET['eid'],'map-lat',true).'"'; } ?>> 
<input type="hidden" id="map-country" name="custom[map-country]" <?php if(isset($_GET['eid'])){ echo 'value="'.get_post_meta($_GET['eid'],'map-country',true).'"'; } ?>> 
<input type="hidden" id="map-address1" name="custom[map-address1]" <?php if(isset($_GET['eid'])){ echo 'value="'.get_post_meta($_GET['eid'],'map-address1',true).'"'; } ?>> 
<input type="hidden" id="map-address2" name="custom[map-address2]" <?php if(isset($_GET['eid'])){ echo 'value="'.get_post_meta($_GET['eid'],'map-address2',true).'"'; } ?>> 
<input type="hidden" id="map-address3" name="custom[map-address3]" <?php if(isset($_GET['eid'])){ echo 'value="'.get_post_meta($_GET['eid'],'map-address3',true).'"'; } ?>> 
<input type="hidden" id="map-zip" name="custom[map-zip]" <?php if(isset($_GET['eid'])){ echo 'value="'.get_post_meta($_GET['eid'],'map-zip',true).'"'; } ?>> 
<input type="hidden" id="map-state" name="custom[map-state]" <?php if(isset($_GET['eid'])){ echo 'value="'.get_post_meta($_GET['eid'],'map-state',true).'"'; } ?>> 
<input type="hidden" id="map-city" name="custom[map-city]" <?php if(isset($_GET['eid'])){ echo 'value="'.get_post_meta($_GET['eid'],'map-city',true).'"'; } ?>> 

그럼 그냥 우리가 구글 맵에 대한 좀 더 많은 코드를하지만 난에 대한 링크를 제공하고, 그래서 어떤 이유로 여기에 배치 할 수 없습니다 제출 버튼 아래 페이지의 하단에. 스크립트와 함께 txt 파일. Bottom Snippit 이것은 Google지도 스크립트 full Script을 볼 수있는 스크립트입니다. 나는 워드 프레스와 프리미엄 프레스를 사용하고 있는데, 이것이 구글 맵을 얻는 방법이다. 나는 내가 목표로하고있는 것을 어떻게 할 수 있는지에 대한 생각이 있는지를 둘러 보았다.

는 워드 프레스 CMS

[display_map 주소 1 = "Eldora, IA" 주소 2에 적용 구글지도에 다중 위치 (위치의 멀티 예측)을 추가하는 당신에게 모든 최고의 로버트

답변

-1

PHP 코드를 감사 = "Albany, NY"address3 = "LA 주, Shreveport"address4 = "Kingshill, VI"address5 = "Falfurrias, LA"address6 = "Baxley, GA"address7 = "Avon Park, FL"address8 = "Carthage, NC"zoom = 3]