|
 |
|
เกี่ยวกับ Google map ครับ อยากให้เพิ่มประเภทของสถานที่ได้เอง โดยแต่ละประเภทจะมีรูปภาพของไอค่อน ที่จะปักลงบนแผนที่ |
|
 |
|
|
 |
 |
|
ประเภทของสถานที่อาจเก็บอยู่อีกตารางก็ได้ แล้วเรียกมาใช้ พี่ๆท่านใดพอจะรู้ไหมครับ
โค๊ดข้างล่างเมื่อเราต้องการเพิ่มประเภทเราต้องมาเขียนเพิ่มเอง
Code (PHP)
var iconBlue = new GIcon();
iconBlue.image = '../images/red2.png';
iconBlue.shadow = '../images/shadow.png';
iconBlue.iconSize = new GSize(32, 37);
iconBlue.shadowSize = new GSize(32, 37);
iconBlue.iconAnchor = new GPoint(15, 45);
iconBlue.infoWindowAnchor = new GPoint(5, 1);
var icongreen = new GIcon();
icongreen.image = '../images/green2.png';
icongreen.shadow = '../images/shadow.png';
icongreen.iconSize = new GSize(32, 37);
icongreen.shadowSize = new GSize(32, 37);
icongreen.iconAnchor = new GPoint(15, 45);
icongreen.infoWindowAnchor = new GPoint(5, 1);
var customIcons = [];
customIcons["เตาตาลที่ไม่ได้ใช้งานแล้ว"] = iconBlue;
customIcons["เตาตาลที่ยังใช้งานอยู่"] = icongreen;
แล้วก็อยากกำหนดรูปแบบของแผนที่ให้เป็นแบบ ไฮบริด อ่ะครับผมต้องแก้ยังไง
Code (PHP)
function load() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map_canvas"));
geocoder = new GClientGeocoder();
map.addMapType(G_PHYSICAL_MAP);
map.removeMapType(G_NORMAL_MAP);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(13.386279,99.9568471), 11);
Tag : PHP

|
|
 |
 |
 |
 |
Date :
2012-01-29 08:56:10 |
By :
siwarin125 |
View :
1160 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
|
|

|
Load balance : Server 02
|