Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > ช่วยดูโค้ดให้หน่อยครับ ผมจะเพิ่มข้อความใน polygon น่ะครับไม่รู้จะทำยังไง



 

ช่วยดูโค้ดให้หน่อยครับ ผมจะเพิ่มข้อความใน polygon น่ะครับไม่รู้จะทำยังไง

 



Topic : 119867



โพสกระทู้ ( 72 )
บทความ ( 0 )



สถานะออฟไลน์




Code (PHP)
<!DOCTYPE html>
<html>
	<head>
		<title>Polygon visibility test</title>
     <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
		<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.18&sensor=false"></script>
		 <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
		<script type="text/javascript">
		
		//	var visibility = true;
		//	google.maps.event.addListener(map, 'zoom_changed', function() {
		//		var zoomLevel =  map.getZoom();
		//		if (zoomLevel > 13){
		//			visibility = false;
		//		}
		//	});
  var map;

        function toggleLayer(firLayer,id)
        {
            if ($('#'+id).is(':checked')) {
                firLayer.setMap(map);
            }
            else
            {
                firLayer.setMap(null);
            }
        }
			var AreaBoundary1 = [
			new google.maps.LatLng(38.359476783305,-75.214501841143),
			new google.maps.LatLng(38.362345692658,-75.213715263721),
			new google.maps.LatLng(38.367366296974,-75.239013654585),
			new google.maps.LatLng(38.375427394827,-75.235459756599),
			new google.maps.LatLng(38.375228242261,-75.234478037591),
			new google.maps.LatLng(38.375273400367,-75.233228514797),
			new google.maps.LatLng(38.375616016941,-75.231891574705),
			new google.maps.LatLng(38.375936006851,-75.231339272304),
			new google.maps.LatLng(38.376233242401,-75.230990324745),
			new google.maps.LatLng(38.377330945634,-75.230379285494),
			new google.maps.LatLng(38.378245589651,-75.229739397276),
			new google.maps.LatLng(38.378680054926,-75.229245049172),
			new google.maps.LatLng(38.378862912696,-75.228896215845),
			new google.maps.LatLng(38.379090992824,-75.227501206487),
			new google.maps.LatLng(38.379295743902,-75.225205297693),
			new google.maps.LatLng(38.379592567387,-75.2240716986),
			new google.maps.LatLng(38.380117961665,-75.222676379481),
			new google.maps.LatLng(38.380552176823,-75.221804307849),
			new google.maps.LatLng(38.38105497306,-75.221048245618),
			new google.maps.LatLng(38.381649384079,-75.220350334809),
			new google.maps.LatLng(38.382175305985,-75.219943020852),
			new google.maps.LatLng(38.382792411234,-75.218983464046),
			new google.maps.LatLng(38.382906436343,-75.218373032062),
			new google.maps.LatLng(38.382837460919,-75.217850047386),
			new google.maps.LatLng(38.382882532651,-75.216513198939),
			new google.maps.LatLng(38.383133614228,-75.215553914681),
			new google.maps.LatLng(38.383773251117,-75.214187485867),
			new google.maps.LatLng(38.384184746827,-75.213722033425),
			new google.maps.LatLng(38.384476969132,-75.213511853601),
			new google.maps.LatLng(38.382637564283,-75.204264820299),
			new google.maps.LatLng(38.38519197244,-75.198823547699),
			new google.maps.LatLng(38.405577811602,-75.19034453901),
			new google.maps.LatLng(38.407028585378,-75.182599075765),
			new google.maps.LatLng(38.40722096122,-75.174076115614),
			new google.maps.LatLng(38.408363397248,-75.170436134806),
			new google.maps.LatLng(38.409309204558,-75.165281800201),
			new google.maps.LatLng(38.408901468414,-75.160340258055),
			new google.maps.LatLng(38.406765903601,-75.152595654452),
			new google.maps.LatLng(38.395190936758,-75.125505819646),
			new google.maps.LatLng(38.385642833873,-75.117728390668),
			new google.maps.LatLng(38.374856118103,-75.119631104135),
			new google.maps.LatLng(38.36627877377,-75.123365898101),
			new google.maps.LatLng(38.356385213645,-75.135886367449),
			new google.maps.LatLng(38.355748521369,-75.138697584933),
			new google.maps.LatLng(38.356588228882,-75.140827882168),
			new google.maps.LatLng(38.353966142431,-75.148677720414),
			new google.maps.LatLng(38.353399989815,-75.155934132108),
			new google.maps.LatLng(38.355773036555,-75.163013288465),
			new google.maps.LatLng(38.3570997232,-75.167760532105),
			new google.maps.LatLng(38.357490472371,-75.169648322129),
			new google.maps.LatLng(38.357697649263,-75.170984310809),
			new google.maps.LatLng(38.356877865946,-75.175023673389),
			new google.maps.LatLng(38.356928288534,-75.180281795915),
			new google.maps.LatLng(38.357135648358,-75.181937363443),
			new google.maps.LatLng(38.357479565684,-75.182924590933),
			new google.maps.LatLng(38.358006656962,-75.184027796508),
			new google.maps.LatLng(38.35789315148,-75.185131944698),
			new google.maps.LatLng(38.357326389225,-75.187567228589),
			new google.maps.LatLng(38.34928043721,-75.188915754557),
			new google.maps.LatLng(38.345843986823,-75.189137004871),
			new google.maps.LatLng(38.345367132702,-75.190008596877),
			new google.maps.LatLng(38.346404068602,-75.190624211995),
			new google.maps.LatLng(38.348624653027,-75.191329323286),
			new google.maps.LatLng(38.35058254734,-75.192057763342),
			new google.maps.LatLng(38.353025828197,-75.193483945018),
			new google.maps.LatLng(38.353438729258,-75.192835933727),
			new google.maps.LatLng(38.355365219959,-75.192351477338),
			new google.maps.LatLng(38.356135794137,-75.193697811043),
			new google.maps.LatLng(38.3563850507,-75.1941453725),
			new google.maps.LatLng(38.359110738339,-75.194142149659),
			new google.maps.LatLng(38.360686848599,-75.194015706074),
			new google.maps.LatLng(38.36087720196,-75.197844264232),
			new google.maps.LatLng(38.364907004794,-75.197548472384),
			new google.maps.LatLng(38.36634361825,-75.200520734765),
			new google.maps.LatLng(38.368920516308,-75.205852864658),
			new google.maps.LatLng(38.368558991925,-75.20777168909),
			new google.maps.LatLng(38.359476783305,-75.214501841143)
			];
			
			
			var AreaBoundary2 = [
			new google.maps.LatLng(38.407028585378,-75.182599075765),
			new google.maps.LatLng(38.40722096122,-75.174076115614),
			new google.maps.LatLng(38.408363397248,-75.170436134806),
			new google.maps.LatLng(38.409309204558,-75.165281800201),
			new google.maps.LatLng(38.408901468414,-75.160340258055),
			new google.maps.LatLng(38.406765903601,-75.152595654452),
			new google.maps.LatLng(38.395190936758,-75.125505819646),
			new google.maps.LatLng(38.385642833873,-75.117728390668),
			new google.maps.LatLng(38.374856118103,-75.119631104135),
			new google.maps.LatLng(38.36627877377,-75.123365898101),
			new google.maps.LatLng(38.356385213645,-75.135886367449),
			new google.maps.LatLng(38.355748521369,-75.138697584933),
			new google.maps.LatLng(38.356588228882,-75.140827882168),
			new google.maps.LatLng(38.353966142431,-75.148677720414),
			new google.maps.LatLng(38.353399989815,-75.155934132108),
			new google.maps.LatLng(38.355773036555,-75.163013288465),
			new google.maps.LatLng(38.3570997232,-75.167760532105),
			new google.maps.LatLng(38.357490472371,-75.169648322129),
			new google.maps.LatLng(38.357697649263,-75.170984310809),
			new google.maps.LatLng(38.356877865946,-75.175023673389),
			new google.maps.LatLng(38.356928288534,-75.180281795915),
			new google.maps.LatLng(38.357135648358,-75.181937363443),
			new google.maps.LatLng(38.357479565684,-75.182924590933),
			new google.maps.LatLng(38.358006656962,-75.184027796508),
			new google.maps.LatLng(38.35789315148,-75.185131944698),
			new google.maps.LatLng(38.357326389225,-75.187567228589),
			new google.maps.LatLng(38.34928043721,-75.188915754557),
			new google.maps.LatLng(38.345843986823,-75.189137004871),
			new google.maps.LatLng(38.345367132702,-75.190008596877),
			new google.maps.LatLng(38.346404068602,-75.190624211995),
			new google.maps.LatLng(38.348624653027,-75.191329323286),
			new google.maps.LatLng(38.35058254734,-75.192057763342),
			new google.maps.LatLng(38.353025828197,-75.193483945018),
			new google.maps.LatLng(38.353438729258,-75.192835933727),
			new google.maps.LatLng(38.355365219959,-75.192351477338),
			new google.maps.LatLng(38.356135794137,-75.193697811043),
			new google.maps.LatLng(38.3563850507,-75.1941453725),
			new google.maps.LatLng(38.359110738339,-75.194142149659),
			new google.maps.LatLng(38.360686848599,-75.194015706074),
			new google.maps.LatLng(38.36087720196,-75.197844264232),
			new google.maps.LatLng(38.364907004794,-75.197548472384),
			new google.maps.LatLng(38.36634361825,-75.200520734765),
			new google.maps.LatLng(38.368920516308,-75.205852864658),
			new google.maps.LatLng(38.368558991925,-75.20777168909),
			new google.maps.LatLng(38.359476783305,-75.214501841143)
			];

			function initialize() {
				var map = new google.maps.Map(document.getElementById("map"), {
					zoom: 11,
					center: new google.maps.LatLng(38.4,-75.2),
					mapTypeId: google.maps.MapTypeId.ROADMAP
				});

				poly = new google.maps.Polygon({
					path: AreaBoundary1,
					// visible: visibility,
					strokeWeight: 1,
					fillColor: '#55FF55',
					fillOpacity: 0.3
				});
				
				poly1 = new google.maps.Polygon({
					path: AreaBoundary2,
					// visible: visibility,
					strokeWeight: 1,
					fillColor: '#55FF55',
					fillOpacity: 0.3
				});



				poly.setMap(map);
    google.maps.event.addListener(map, "zoom_changed", function() {
        if (map.getZoom() > 13) poly.setMap(null); 
        else poly.setMap(map);
    });
	poly1.setMap(null);
    google.maps.event.addListener(map, "zoom_changed", function() {
        if (map.getZoom() > 13) poly1.setMap(map); 
        else poly1.setMap(null);
    });
	
	
			}

		</script>
	</head>
	<body style="margin:0px; padding:0px;" onLoad="initialize()">
		<div id="map" style="width: 600px; height: 600px;"></div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> 
</script> 
<input id="fir_curitiba" type="checkbox" onClick="toggleLayer(poly1,'fir_curitiba')" /> Mostrar FIR Curitiba
	</body>
</html>





Tag : PHP, JavaScript







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2015-11-12 09:09:10 By : coop_korat View : 682 Reply : 2
 

 

No. 1



โพสกระทู้ ( 72 )
บทความ ( 0 )



สถานะออฟไลน์


ใครก็ได้ช่วยด้วยครับhttp://iloveallgame2015.blogspot.com






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-11-13 14:01:53 By : coop_korat
 


 

No. 2



โพสกระทู้ ( 72 )
บทความ ( 0 )



สถานะออฟไลน์


ไม่มีใครตอบเลยเหรอครับ รบกวนผู้รู้ด้วยครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-11-16 13:43:41 By : coop_korat
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ช่วยดูโค้ดให้หน่อยครับ ผมจะเพิ่มข้อความใน polygon น่ะครับไม่รู้จะทำยังไง
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 01
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่