当前位置: 动力学知识库 > 问答 > 编程问答 >

python - Interactive map, django

问题描述:

I am doing research how to make a website with a map of the world (simple image, not google maps), where I would like to put pins, that will be clickable and redirecting user to the description of those places. I am wondering what is the best way to do this?

My application is written in django and I have no idea what kind of technology should I use?

网友答案:

I need to track, where some image was clicked, so i use this approach (simplified): In templates:

<a href='/my_view/'><img ismap src='my_map.gif'></a>

and in views:

def my_view(request):
    (cx,cy)=request.GET.keys()[0].split(',')
    # map was clicked at cx,cy coordinates
    x=int(cx)
    y=int(cy)
    if x>123:
        ........
分享给朋友:
您可能感兴趣的文章:
随机阅读: