0

I'm using python to develop a map (Google Maps) and add some points in specific location. After searching I found it can be done using pygmaps. So I installed it using pip, then I wrote this code and I need to add points and open a webpage for the map find the points there.

import pygmaps 
import webbrowser 
mymap = pygmaps.maps(37.428, -122.145, 16)
mymap.setgrids(37.42, 37.43, 0.001, -122.15, -122.14, 0.001)
mymap.addpoint(37.427, -122.145, "#0000FF") 
mymap.addradpoint(37.429, -122.145, 95, "#FF0000")
path = [(37.429, -122.145),(37.428, -122.145),(37.427, -122.145),(37.427, -122.146),(37.427, -122.146)] mymap.addpath(path,"#00FF00") 
mymap.draw('./mymap.draw.html') 
url = url = './mymap.draw.html'
webbrowser.open_new_tab(url) 

I didn't see the points, only the map.

3
  • 1
    Please re-format your post first. You can't expect anyone to look at this untidy mess of a post in-depth. Put your code samples inside the appropriate editor tags. Commented Apr 9, 2011 at 17:17
  • 2
    Sigh... Click on 'edit'. Then click on "Code Sample" in the editor. Copy and paste your code so it stands where 'enter your code here' stands. Pay attention to the indentation of the code. Commented Apr 9, 2011 at 17:36
  • bit.ly/how-to-ask-a-question Commented Apr 9, 2011 at 17:55

1 Answer 1

3

Changing

mymap.draw('./mymap.draw.html') 
url = url = './mymap.draw.html'

to

mymap.draw('mymap.draw.html') 
url = 'mymap.draw.html'

worked for me.

Edit: added screenshot.

enter image description here

Sign up to request clarification or add additional context in comments.

16 Comments

work u means u c the points ?!! if yup is they are clear to be seeen :=) :D becaause i didnot c :(
i didnt c points and i increase the radius circle but stiill :( dont c any thing
Yes, that is what I meant. The points are near Palo Alto, CA, USA, I see the grid too.
Do you see the grid? Are you looking at Palo Alto?
If u please can u send me print screen shoot for it to search for it !! at [email protected] thank in advance
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.