{ "info": { "author": "coagulant", "author_email": "baryshev@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Yandex Hotsposts\n================\n\nPython library to generate tiles and js for `Yandex Maps Hotspots`_ version 2.\nBeware, hotspots js api is not documented well. Use at your own risk.\nWorks on python 2.6-2.7.\n\nIt's a fork of an app by Paul Koltyshev, called django-hotspots_.\n`yandex-hotspots` is written to support new version of hotspots API and\n*primarily* to be django-free package.\n\nThis lib supports only simplest of hotspots: points.\n\nUsage\n=====\n\nSubclass ``HotspotsManager`` and define at least these methods::\n\n from PIL import Image\n from hotspots import HotspotsManager\n\n\n class MyHotspotsManager(HotspotsManager):\n img_big = Image.open('static/images/big_marker.png')\n img_small = Image.open('static/images/small_marker.png')\n\n def get_base_path(self):\n \"\"\" Where to save tiles\"\"\"\n return 'static/hotspots'\n\n def get_img(self, obj, scale):\n \"\"\" Hotspot image object\"\"\"\n return self.img_big if scale > 12 else self.img_small\n\n def get_lng(self, obj):\n \"\"\" Latitude of your object\"\"\"\n return obj.coordinates[0]\n\n def get_lat(self, obj):\n \"\"\" Longitude \"\"\"\n return obj.coordinates[1]\n\nRun hotspot generator::\n\n # Obtain data for hotspots (some locations with data)\n data_iterable = [{'coordinates': (37.925288, 55.720903), 'title': 'My House'}, <...>]\n\n # Generate hotspots for zoom levels raging form 10 to 17\n MyHotspotsManager().generate_tiles(data_iterable, scale=(10, 17))\n\n\nAnd finally put together created hotspots and `some clientside`_.\n\nBallon content and hint\n=======================\n\nUse `gett_descr(self, obj)` and `get_name(self, obj)` respectively.\n\n\n.. _django-hotspots: https://github.com/pkolt/django-hotspots\n.. _Yandex Maps Hotspots: http://api.yandex.ru/maps/features/?p=hotspot\n.. _some clientside: https://github.com/coagulant/yandex-hotspots/blob/master/example/hotspots.html", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/coagulant/yandex-hotspots", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "yandex-hotspots", "package_url": "https://pypi.org/project/yandex-hotspots/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/yandex-hotspots/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/coagulant/yandex-hotspots" }, "release_url": "https://pypi.org/project/yandex-hotspots/0.1/", "requires_dist": null, "requires_python": null, "summary": "Generator of tiles and js for Yandex Maps Hotspots v2", "version": "0.1" }, "last_serial": 801928, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "aee7b13541cd969662a17c8d0c02d428", "sha256": "2d0a1c7ad3f8aff36f540f6e021e842c8b0a7081ac5bc2c9471076211d2bc62f" }, "downloads": -1, "filename": "yandex-hotspots-0.1.zip", "has_sig": false, "md5_digest": "aee7b13541cd969662a17c8d0c02d428", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7535, "upload_time": "2013-03-09T18:52:08", "url": "https://files.pythonhosted.org/packages/dd/72/0ab7fdb80b391ad8a53c7e706d30caea9f7068236b069fea2e7d71084b94/yandex-hotspots-0.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "aee7b13541cd969662a17c8d0c02d428", "sha256": "2d0a1c7ad3f8aff36f540f6e021e842c8b0a7081ac5bc2c9471076211d2bc62f" }, "downloads": -1, "filename": "yandex-hotspots-0.1.zip", "has_sig": false, "md5_digest": "aee7b13541cd969662a17c8d0c02d428", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7535, "upload_time": "2013-03-09T18:52:08", "url": "https://files.pythonhosted.org/packages/dd/72/0ab7fdb80b391ad8a53c7e706d30caea9f7068236b069fea2e7d71084b94/yandex-hotspots-0.1.zip" } ] }