commit
3551623837
@ -1,13 +1,21 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<? print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; ?>
|
||||
<markers>
|
||||
<? foreach ($items as $item) { ?>
|
||||
<? $item_coordinates = ORM::factory("exif_coordinate")->where("item_id", "=", $item->id)->find(); ?>
|
||||
<? $str_thumb_html = str_replace("&", "&", $item->thumb_img(array("class" => "g-exif-gps-thumbnail"))); ?>
|
||||
<? $str_thumb_html = str_replace("\'", "'", $str_thumb_html); ?>
|
||||
<? $str_thumb_html = str_replace("<", "<", $str_thumb_html); ?>
|
||||
<? $str_thumb_html = str_replace(">", ">", $str_thumb_html); ?>
|
||||
<? $str_thumb_html = str_replace("\"", """, $str_thumb_html); ?>
|
||||
<marker lat="<?= $item_coordinates->latitude; ?>" lng="<?= $item_coordinates->longitude; ?>" url="<?= url::abs_site("exif_gps/item/{$item->id}"); ?>" thumb="<?=$str_thumb_html; ?>" />
|
||||
<?
|
||||
$thumb_arr=array();
|
||||
$items_id=array();;
|
||||
foreach ($items as $item) {
|
||||
array_push($items_id, $item->id);
|
||||
$thumb_arr[$item->id] = $item->thumb_img(array("class" => "g-exif-gps-thumbnail"));
|
||||
}
|
||||
$item_coordinates_all = ORM::factory("exif_coordinate")->where("item_id", "IN", $items_id)->find_all();
|
||||
foreach ($item_coordinates_all as $item_coordinates) {
|
||||
$str_thumb_html = str_replace("&", "&", $thumb_arr[$item_coordinates->item_id]);
|
||||
$str_thumb_html = str_replace("\'", "'", $str_thumb_html);
|
||||
$str_thumb_html = str_replace("<", "<", $str_thumb_html);
|
||||
$str_thumb_html = str_replace(">", ">", $str_thumb_html);
|
||||
$str_thumb_html = str_replace("\"", """, $str_thumb_html);
|
||||
?>
|
||||
<marker lat="<?= $item_coordinates->latitude; ?>" lng="<?= $item_coordinates->longitude; ?>" url="<?= url::abs_site("exif_gps/item/$item_coordinates->item_id"); ?>" thumb="<?=$str_thumb_html; ?>" />
|
||||
<? } ?>
|
||||
</markers>
|
||||
|
Reference in New Issue
Block a user