-
Notifications
You must be signed in to change notification settings - Fork 0
9999.HoM Open API
지정한 edited this page May 30, 2017
·
13 revisions
How to use
-
Download [HoM_API.php] (https://github.com/longJ91/HoM-Open-API/blob/master/API/HoM_API.php) file that exists in the API folder.
-
Add the following code to the top of the php file to use the library file.
require("lib/HoM_API.php"); -
Refer to the comments in the library file and call the appropriate function.
-
Please refer to the following example of library file use.
- File Transfer Screen *
<form name="upload" method="post" enctype="multipart/form-data" action="http://homcare.xyz/parserAPI_worker.php">
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<table width="600" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td colspan="2" bgcolor="#FFFFFF">Upload XML</td>
</tr>
<tr>
<td width="150" align="center" bgcolor="#FFFFFF">Upload file</td>
<td width="464" bgcolor="#FFFFFF"><input type="file" name="emrXML" /></td>
</tr>
<tr>
<br>
<td colspan="2" bgcolor="#FFFFFF"><input type="submit" value="submit" /><input type="reset" value="reset"></td>
</tr>
</table>
</form>
Result
dir_init("/var/www/html/emr_repository/");
dest_init("parserAPI.xml");
file_init($_FILES['emrXML']['tmp_name']);
$error = save_file();
$result = parsing();
foreach($result as $key => $value){
echo "KEY -> ".$key;
echo " VALUE ->".$value;
echo "<br>";
}
Creating and configuring markers using Google Maps However, you should use the Google map key values separately.
add_data("35.144158", "129.060804", "kim", "http://www.naver.com", "yellow");
add_data("37.522551", "126.985421", "ji", "http://www.daum.net", "red");
add_data("37.565684", "128.494480", "han", "http://www.google.com", "blue");
<div id="map" style="width:750px; height:600px;" ></div>
<script type="text/javascript">
var map;
var name;
var latitude = '36.400002';
var longitude = '128.149994';
latitude = Number(latitude);
longitude = Number(longitude);
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: latitude, lng: longitude},
zoom: 7
});
var marker;
'<?php for ($i = 0; $i<count($tempData); $i++) { ?>'
latitude = Number('<?php echo ($tempData[$i]["latitude"]);?>');
longitude = Number('<?php echo ($tempData[$i]["longitude"]);?>');
name = '<?php echo ($tempData[$i]["name"]);?>';
marker = new google.maps.Marker({
position: {lat: latitude, lng: longitude},
map: map,
title: name
});
marker.addListener('click', function() {
location.href="<?php echo ($tempData[$i]['directUrl']);?>";
});
marker.setIcon('<?php echo ($tempData[$i]["color"]);?>');
'<?php } ?>'
}
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=
"YOUR KEY VALUE"=initMap">
</script>
MIT License
Copyright (c) 2017 HoM Open API
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.