add marker for point data in metadata view page

This commit is contained in:
wlx 2010-06-29 09:25:19 +00:00
parent 600101f837
commit 9532f04a03
1 changed files with 5 additions and 1 deletions

View File

@ -249,7 +249,10 @@ function reportError(request)
map.setCenter(new GLatLng(<?= ($md->south+$md->north)/2; ?>,<?= ($md->east+$md->west)/2; ?>), zoomlevel); map.setCenter(new GLatLng(<?= ($md->south+$md->north)/2; ?>,<?= ($md->east+$md->west)/2; ?>), zoomlevel);
map.setMapType(G_SATELLITE_MAP); map.setMapType(G_SATELLITE_MAP);
map.setUIToDefault(); map.setUIToDefault();
<?php if ($md->north==$md->south) : ?>
var marker=new GMarker(new GLatLng(<?= $md->north; ?>,<?= $md->east; ?>));
map.addOverlay(marker);
<?php else : ?>
var polygon=new GPolygon([ var polygon=new GPolygon([
new GLatLng(<?= $md->north; ?>,<?= $md->west; ?>), new GLatLng(<?= $md->north; ?>,<?= $md->west; ?>),
new GLatLng(<?= $md->north; ?>,<?= $md->east; ?>), new GLatLng(<?= $md->north; ?>,<?= $md->east; ?>),
@ -258,6 +261,7 @@ function reportError(request)
new GLatLng(<?= $md->north; ?>,<?= $md->west; ?>) new GLatLng(<?= $md->north; ?>,<?= $md->west; ?>)
],"#f33f00",5,1,"#ff0000",0.2); ],"#f33f00",5,1,"#ff0000",0.2);
map.addOverlay(polygon); map.addOverlay(polygon);
<?php endif; ?>
</script> </script>
<div id="window-outter" style="display:none;"> <div id="window-outter" style="display:none;">