Hi I am working on Google Map API in Python. I am using the source code which can be found at this website
This code when compiled produces a 'htm' file showing a Google Map with the markers placed on the map.
So I have created a Window Frame shown below:
from Tkinter import * # order seems to matter: import Tkinter first
import Image, ImageTk # then import ImageTk
class MyFrame(Frame):
def __init__(self, master, im):
Frame.__init__(self, master)
self.caption = Label(self, text="Some text about the map")
self.caption.grid()
self.image = ImageTk.PhotoImage(im) # <--- results of PhotoImage() must be stored
self.image_label = Label(self, image=self.image, bd=0) # <--- will not work if 'image = ImageTk.PhotoImage(im)'
self.image_label.grid()
self.grid()
im = Image.open("test.html") # read map from disk
# or you could use the PIL image you created directly via option 2 from the URL request ...
mainw = Tk()
mainw.frame = MyFrame(mainw, im)
mainw.mainloop()
And with that Window Frame I want to display the 'htm' image of the Google Map in that Window Frame.