GithubHelp home page GithubHelp logo

Comments (3)

TomSchimansky avatar TomSchimansky commented on May 18, 2024

Can you post your code?

from tkintermapview.

LukeyBookey21 avatar LukeyBookey21 commented on May 18, 2024
def pins():
   global translation
   global rdata
   conn = sqlite3.connect('address_book.db')
   c = conn.cursor()
   c.execute("SELECT * FROM parking")
   data1 = c.fetchone()
   rdata = (data1[0])
   print(rdata)
   marker_1 = map_widget.set_marker(rdata, text="52.55, 13.4")
   
   conn.commit()

   conn.close()

53.727830, -1.353003

not sure what to do as when I paste that co ordinate or address manually instead of 'rdata' or 'data1[0]' it works fine and loads the map up with the pin in the location I want, but when I put in rdata it seems to be having none of it even if I translate it into an address and put it through. New to Tkinter so Im probs missing something silly, help would be appreciated. cheers

from tkintermapview.

TomSchimansky avatar TomSchimansky commented on May 18, 2024

set_marker method needs the position as two different attributes.

 marker_1 = map_widget.set_marker(rdata[0], data[1], text="52.55, 13.4")

# or

 marker_1 = map_widget.set_marker(*rdata, text="52.55, 13.4")  # split the tuple into arguments with * operator

from tkintermapview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.