mymap.addpoint(1.29425, 103.8991,"#FF0000",'test')
是我的代碼位後,我做的pygmaps以下變化,如何添加'標題'到pygmap點?
def addpoint(self, lat, lng, color = '#FF0000', title = None):
self.points.append((lat,lng,color[1:],title))
但我仍然無法看到此標記地圖:(
mymap.addpoint(1.29425, 103.8991,"#FF0000",'test')
是我的代碼位後,我做的pygmaps以下變化,如何添加'標題'到pygmap點?
def addpoint(self, lat, lng, color = '#FF0000', title = None):
self.points.append((lat,lng,color[1:],title))
但我仍然無法看到此標記地圖:(
你上點的標題不得不在pygmap.py多了一個變化
變化 f.write('\t\ttitle: "no implimentation",\n')
到 f.write('\t\ttitle: "'+re.escape(str(title))+'",\n')
如果有人仍然需要幫助,我有一個解決方案。您還必須相應地更新繪圖點函數,然後更新繪圖點函數。這就是我的函數的定義是這樣的:
def drawpoints(self,f):
for point in self.points:
self.drawpoint(f,point[0],point[1],point[2],point[3])
高清drawpoint(個體經營,F,緯度,經度,顏色,標題):