Zh-hans:Deploying your own Slippy Map

From OpenStreetMap Wiki
Jump to navigation Jump to search

部署网络地图使用OSM地图的通常办法。通常这意味着使用一些JavaScript代码整合一张展示地图瓦片网络地图到你的网页上。

你可以嵌入我们存在的地图,就像嵌入Google或Yahoo!地图一样。这使用下列JavaScript地图库之一可以被完成:

这些也可用:

在CMS/框架中嵌入OSM

你可以在你喜欢的内容管理系统(Content Management System, CMS)中嵌入OSM:

CMS/framework Module/plugin Note Sources Tutorial Example
with OSM map embedded
CMS Made Simple Osm Tag Module based on OpenLayers GitHub Documentation in manpage
CMS Made Simple Leaflet Tag Module based on Leaflet GitHub Documentation in manpage
Django GeoDjango A world-class geographic web framework Included in the Django framework A world-class geographic web framework geodjango-basic-apps
Django OSMEditor old! from year 2009 [2] Editors/Django#Installation
Django-CMS django-cms-osm [3] [4]
Drupal DrupalMappingKit Collection of Drupal modules to support custom mapping [5] Drupal tutorial from MapBox MapBox
Drupal Leaflet module Leaflet module
Drupal OpenLayers module OpenLayers module
Joomla injooosm
Joomla OSModul Module based on Leaflet and supports markers [6]
Java Server Faces JSF2Leaf Powered by Leaflet
Mediawiki MultiMaps Uses Leaflet or Google Maps API (configurable) Wikimedia Gerrit This wiki! In the tutorial
MediaWiki Simple image Depends on a reliable map image provider like StaticMapLite used to be This wiki!
MediaWiki Slippy Map Powered by OpenLayers This wiki! This wiki!
MediaWiki Kartographer Powered by Leaflet MediaWiki wiki Wikivoyage
MediaWiki Maps Powered by OpenLayers Manual
MediaWiki Semantic Maps Requires Semantic MediaWiki Manual
MoinMoin moinmoinosm Macro for MoinMoin [7] [8] Flisol
Novius OS Ounziw OSM iframe style OSM map GitHub
Tiki Wiki CMS Groupware built-in Via OpenLayers
WordPress OSM WordPress Plugin Also adds gpx and kml files Download Simple sample

参见:

  • Cartaro是一个用于在不同的CMS(特别是Drupal)中嵌入地图的框架。

瓦片源


OpenStreetMap瓦片服务器

Typically these examples show you how to use the OpenStreetMap tile servers. Your site serves up the HTML and the JavaScript (maybe) but the tile images of the map are still fetched by the browser from our servers. You must do this in accordance with the tile usage policy. The tile service comes with no guarantee as to availability or speed (if you expect particularly heavy demand, please contact the community to discuss your requirements first).

其他可选的瓦片服务器

其他可选的瓦片服务商(其使用条款可能与OSM不同)也可用。其中一些服务商将OSM数据与其自身拥有的图像结合,并且/或者应用了不同的地图颜色和风格。

一些瓦片服务商的列表,见Slippy map tilenames#Tile servers, TMS

自定义的瓦片

最最灵活的方法在这里!!OpenStreetMap同时向你提供了从我们的数据中生成自己独特的地图瓦片的能力,风格随你的偏好而定。

  • 参见Switch2Osm.org以获得关于生成自己的瓦片的更多信息。