معرفی شرکت ها


django-gmapi-new-1.0.1.1


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

A Google Maps API implementation for Django
ویژگی مقدار
سیستم عامل -
نام فایل django-gmapi-new-1.0.1.1
نام django-gmapi-new
نسخه کتابخانه 1.0.1.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده David Bennett
ایمیل نویسنده ungenio@gmail.com
آدرس صفحه اصلی https://bitbucket.org/dbinit/django-gmapi
آدرس اینترنتی https://pypi.org/project/django-gmapi-new/
مجوز UNKNOWN
========================================================= Django Google Maps API v3 and Static Maps API helper app. ========================================================= This app allows you to define Google Map and Marker objects in Python. These objects are designed to be serialized to JSON and parsed by the included jQuery plugin which converts them to actual Google Map and Marker instances. They can also be serialized to strings which produces a Static Maps url. This way you can easily use unobtrusive javascript techniques along with maps. This project is being developed as one piece of a larger project I'm working on. So functionality will be added as I need it. In particular, the jQuery plugin will probably see some added functionality. Version 3 of the Google Geocoding Web service is also implemented to further enable an unobtrusive javascript approach. New: Events and Info Windows You can now add info windows maps and markers and add event listeners. Adding to the example below, in your views.py (right after "gmap = maps.Map...") add: marker = maps.Marker(opts = { 'map': gmap, 'position': maps.LatLng(38, -97), }) maps.event.addListener(marker, 'mouseover', 'myobj.markerOver') maps.event.addListener(marker, 'mouseout', 'myobj.markerOut') info = maps.InfoWindow({ 'content': 'Hello!', 'disableAutoPan': True }) info.open(gmap, marker) Then, on your page: <script type="text/javascript"> window.myobj = { markerOver: function() { this.openInfoWindow(); }, markerOut: function() { this.closeInfoWindow(); } }; </script> That's it! Example: """views.py""" from django import forms from django.shortcuts import render_to_response from gmapi import maps from gmapi.forms.widgets import GoogleMap class MapForm(forms.Form): map = forms.Field(widget=GoogleMap(attrs={'width':510, 'height':510})) def index(request): gmap = maps.Map(opts = { 'center': maps.LatLng(38, -97), 'mapTypeId': maps.MapTypeId.ROADMAP, 'zoom': 3, 'mapTypeControlOptions': { 'style': maps.MapTypeControlStyle.DROPDOWN_MENU }, }) context = {'form': MapForm(initial={'map': gmap})} return render_to_response('index.html', context) """urls.py""" from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^$', 'myapp.views.index'), ) """settings.py""" INSTALLED_APPS = ( ... 'gmapi', ... ) Then in your template put this somewhere: {{ form.map }} {{ form.media.js }} This will result in html like: <div class="gmap" style="position:relative;width:510px;height:510px;" id="id_map"> <div class="{&quot;arg&quot;:[&quot;div&quot;,{&quot;mapTypeId&quot;:{&quot;val&quot;:&quot;MapTypeId.ROADMAP&quot;},&quot;mapTypeControlOptions&quot;:{&quot;style&quot;:{&quot;val&quot;:&quot;MapTypeControlStyle.DROPDOWN_MENU&quot;}},&quot;center&quot;:{&quot;arg&quot;:[38,-97],&quot;cls&quot;:&quot;LatLng&quot;},&quot;zoom&quot;:3}],&quot;cls&quot;:&quot;Map&quot;}" style="position:absolute;width:510px;height:510px"></div> <img style="position:absolute;z-index:1" width="510" height="510" alt="Google Map" src="http://maps.google.com/maps/api/staticmap?sensor=false&amp;center=38,-97&amp;maptype=roadmap&amp;zoom=3&amp;size=510x510" /> </div> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.js"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="/static/gmapi/js/jquery.gmapi.js"></script> Your map will be displayed as an image, and once/if javascript loads, it will be converted to a javascript map.


نحوه نصب


نصب پکیج whl django-gmapi-new-1.0.1.1:

    pip install django-gmapi-new-1.0.1.1.whl


نصب پکیج tar.gz django-gmapi-new-1.0.1.1:

    pip install django-gmapi-new-1.0.1.1.tar.gz