Skip to content

Commit

Permalink
1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zverik committed Dec 25, 2013
1 parent 61b923e commit c28a885
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 42 deletions.
Binary file added dist/mapbbcode-1.2.0.zip
Binary file not shown.
Binary file modified dist/mapbbcode-latest.zip
Binary file not shown.
15 changes: 3 additions & 12 deletions embedding.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,10 @@ Usually there is a main theme, like `subSilver` or `proSilver` in phpBB. Find a
```html
<link rel="stylesheet" href="includes/mapbbcode/leaflet.css" />
<link rel="stylesheet" href="includes/mapbbcode/leaflet.draw.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="includes/mapbbcode/leaflet.ie.css" />
<link rel="stylesheet" href="includes/mapbbcode/leaflet.draw.ie.css" />
<![endif]-->
<script src="includes/mapbbcode/leaflet.js"></script>
<script src="includes/mapbbcode/leaflet.draw.js"></script>
<script src="includes/mapbbcode/mapbbcode.js"></script>
<script src="includes/mapbbcode/mapbbcode-config.js"></script>
<script src="includes/mapbbcode/proprietary/Bing.js"></script>
<script src="includes/mapbbcode/LayerList.js"></script>
<script language="Javascript" type="text/javascript">
<!--
var mapBBcode = new MapBBCode({
Expand Down Expand Up @@ -130,7 +125,7 @@ Of course, some adminitrators would like to disable the interaction with externa
### Localization
Translation strings for MapBBCode are kept in the library's directory, in `lang/{Language}.js` and `lang/{Language}.Config.js` files. You would need to include the file for a current language after `mapbbcode.js`. The name for the file can be kept in a plugin translation script.
Translation strings for MapBBCode are kept in the library's directory, in `lang/{language}.js` and `lang/{language}.config.js` files. You would need to include the file for a current language after `mapbbcode.js`. The name for the file can be kept in a plugin translation script.
### Add-ons
Expand Down Expand Up @@ -159,7 +154,7 @@ All constructor options should be read in a page header. Most likely they alread
uploadButton: {ENABLE_EXTERNAL},
preferStandardLayerSwitcher: {STANDARD_SWITCHER}
The last three properties are boolean, so you should either cast them to `true`/`false` in the initialization code, or use longer expressions:
Note that {LAYERS} variable may contain apostrophes. The last three properties are boolean, so you should either cast them to `true`/`false` in the initialization code, or use longer expressions:
property: '{PROPERTY)' === 'true' || '{PROPERTY}' === '1'
Expand All @@ -173,12 +168,8 @@ Configuration panels are usually separate files. Just use a regular key-value pa
```html
<link rel="stylesheet" href="../includes/mapbbcode/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="../includes/mapbbcode/leaflet.ie.css" />
<![endif]-->
<script src="../includes/mapbbcode/leaflet.js"></script>
<script src="../includes/mapbbcode/mapbbcode-config.js"></script>
<script src="../includes/mapbbcode/proprietary/Bing.js"></script>
```

Eleven properties are edited with a javascript user interface, and in a form these are represented with hidden fields (your field names may be different, depending on a forum engine's coding style):
Expand Down
15 changes: 5 additions & 10 deletions faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,15 @@ This issue is solved in MapBBCode 1.2.

The button below "View/Edit" switcher control how the map will appear on forum/blog pages. Its settings make some values irrelevant. For example, when the editor is configured to be shown as an inline panel, editor window dimensions are not used, which is visualized with grayed-out values.

**Why forum modules need `mapbbcode` directory?**

It contains not only three files of the MapBBCode library, but also other libraries that may be useful, like a Bing imagery layer. Only one of those is available from CDN, Leaflet. Ideally the whole folder should be stored at a single location (of course, with an option to download all files, e.g. for an intranet forum), but there is a problem. I don't know where to get free and *reliable* CDN. If you know how to do it properly, please contact the author.

**The whole library is essentially one file, right?**

Yes. For example, using only `mapbbcode.js` you can visualize a bbcode or include a map from MapBBCode Share:

```html
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.1/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.1/leaflet.js"></script>
<script src="mapbbcode.js"></script>
<div id="test"></div>
<script>
Expand All @@ -74,11 +70,11 @@ mapBB.showExternal('test', 'gttvz');

**I want to display length while drawing lines**

Include the `Param.Measure.js` script from the MapBBCode repository, and the measurement line will automatically appear in a feature popup panel. This and other example scripts in `param` directory demonstrate how to add functionality to the editor.
Include the `Handler.Length.js` script from the MapBBCode repository, and the measurement line will automatically appear in tooltips and in a panel. This and other example scripts in `handlers` directory demonstrate how to add functionality to the editor.

**Why one cannot add title text to lines and polygons?**

Because it is not obvious visually whether you can click on an object or not, unlike markers, which are made for being clicked. You can override this, of course, by modifying `Param.Text.js` and making a custom build.
Because it is not obvious visually whether you can click on an object or not, unlike markers, which are made for being clicked. You can override this, of course, by modifying `Handler.Text.js` and making a custom build.

**Which layer is selected by default?**

Expand All @@ -102,10 +98,9 @@ window.layerList.list['Layer Name'] = 'L.tileLayer("http://...", { ... })';

**Specifically, I want Google Maps in my forum**

Google layers are not included because Google is evil. And sometimes charge for their maps. And you should promote free and open maps, that is, OpenStreetMap. But of course there is a way to add google maps to a forum, and since version 1.1, an easy one. Just add those two lines after `mapbbcode-config.js` but before `new MapBBCode()`:
Google layers are not included by default because Google is evil. And sometimes charge for their maps. And you should promote free and open maps, that is, OpenStreetMap. But of course there is an easy way to add google maps to a forum. Just add the line after `LayerList.js` but before `new MapBBCode()`:

```html
<script src="http://maps.google.com/maps/api/js?v=3&sensor=false"></script>
<script src="{mapbbcode}/proprietary/Google.js"></script>
```

Expand Down
14 changes: 7 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ <h1>[map] BBCode</h1>
<p>Download MapBBCode JavaScript library:</p>

<ul>
<li><a href="dist/mapbbcode-1.1.2.zip">Version 1.1.2</a>: stable version, released on 29th of November, 2013</li>
<li><a href="dist/mapbbcode-latest.zip">Version 1.2-dev</a>: in-progress development version</li>
<li><a href="dist/mapbbcode-1.2.0.zip">Version 1.2.0</a>: stable version, released on 25th of December, 2013</li>
<li><a href="dist/mapbbcode-latest.zip">Version 1.3-dev</a>: in-progress development version</li>
<li><a href="https://github.com/MapBBCode/mapbbcode">GitHub repository</a>: sources, add-ons and examples</li>
</ul>

<p>You will surely have questions after studying the library, find some answers <a href="faq.html">in the FAQ</a>. Map BBCode can be integrated into your installation of:</p>

<ul>
<li><b>phpBB 2</b>: <a href="https://github.com/MapBBCode/mapbb-phpbb2/raw/master/dist/mapbbcode_mod.zip">Download MOD</a> (EasyMOD-compatible), <a href="https://github.com/MapBBCode/mapbb-phpbb2">GitHub Repository</a></li>
<li><b>phpBB 3</b>: <a href="https://www.phpbb.com/community/viewtopic.php?f=70&amp;t=2205161">MOD Discussion</a>, <a href="https://github.com/MapBBCode/mapbb-phpbb3">GitHub Repository</a></li>
<li><b>FUDforum</b>: <a href="https://github.com/MapBBCode/mapbb-fud/raw/master/dist/mapbbcode_fud.zip">Download MOD</a>, <a href="https://github.com/MapBBCode/mapbb-fud">GitHub Repository</a></li>
<li><b>PunBB</b>: <a href="https://github.com/MapBBCode/mapbb-punbb/raw/master/dist/mapbbcode_punbb.zip">Download MOD</a>, <a href="https://github.com/MapBBCode/mapbb-punbb">GitHub Repository</a></li>
<li><b>FluxBB</b>: <a href="https://github.com/MapBBCode/mapbb-fluxbb/raw/master/dist/mapbbcode_fluxbb.zip">Download MOD</a>, <a href="https://github.com/MapBBCode/mapbb-flux">GitHub Repository</a></li>
<li><b>phpBB 2</b>: <a href="https://github.com/MapBBCode/mapbb-phpbb2/raw/master/dist/mapbbcode_mod.zip">Download MOD</a>, <a href="https://github.com/MapBBCode/mapbb-phpbb2">GitHub repository</a></li>
<li><b>phpBB 3</b>: <a href="https://github.com/MapBBCode/mapbb-phpbb3/raw/master/dist/mapbbcode_mod.zip">Download MOD</a>, <a href="https://www.phpbb.com/community/viewtopic.php?f=70&amp;t=2205161">discussion</a>, <a href="https://github.com/MapBBCode/mapbb-phpbb3">GitHub repository</a></li>
<li><b>FUDforum</b>: <a href="https://github.com/MapBBCode/mapbb-fud/raw/master/dist/mapbbcode_fud.zip">Download plugin</a>, <a href="http://fudforum.org/forum/index.php?t=msg&th=123263">discussion</a>, <a href="https://github.com/MapBBCode/mapbb-fud">GitHub repository</a></li>
<li><b>PunBB</b>: <a href="https://github.com/MapBBCode/mapbb-punbb/raw/master/dist/mapbbcode_punbb.zip">Download extension</a>, <a href="http://punbb.informer.com/forums/topic/26467/extension-map-bbcode/">discussion</a>, <a href="https://github.com/MapBBCode/mapbb-punbb">GitHub repository</a></li>
<li><b>FluxBB</b>: <a href="https://github.com/MapBBCode/mapbb-fluxbb/raw/master/dist/mapbbcode_fluxbb.zip">Download MOD</a>, <a href="http://fluxbb.org/forums/viewtopic.php?id=7462">discussion</a>, <a href="https://github.com/MapBBCode/mapbb-flux">GitHub repository</a></li>
</ul>

<p>Please help us expand this list! There is an extensive <a href="embedding.html">documentation</a> on integrating [map] bbcode with forum engines. It doesn't even have to be a forum: blog and CMS plugins are also welcome. And does not rely on using <a href="#sample" onclick="javascript:replaceMap(); return true;">actual maps</a>. You can use the library in your project to display maps or to provide a complete mapping experience for your users. To showcase it, we have made an <a href="https://github.com/MapBBCode/share.mapbbcode.org">open-source</a> website to create and share user maps:</p>
Expand Down
1 change: 1 addition & 0 deletions lib/leaflet.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
.leaflet-objects-pane .leaflet-marker-pane,
.leaflet-objects-pane .leaflet-shadow-pane,
.leaflet-objects-pane .leaflet-overlay-pane,
.leaflet-overlay-pane .leaflet-vml-container,
.leaflet-objects-pane .leaflet-popup-pane {
padding: 0;
margin: 0;
Expand Down
4 changes: 2 additions & 2 deletions lib/leaflet.draw.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/mapbbcode-config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/mapbbcode.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/proprietary/Google.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ L.Google.asyncInitialize = function() {
var el = document.createElement('script');
el.type = 'text/javascript';
el.src = 'http://maps.google.com/maps/api/js?v=3&sensor=false&callback=L.Google.asyncInitialize';
if( document.readyState == 'interactive' || document.readyState == 'complete' )
if( document.readyState == 'complete' )
document.body.appendChild(el);
else
L.DomEvent.on(window, 'load', function() { document.body.appendChild(el); });
Expand Down
14 changes: 7 additions & 7 deletions ru/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ <h1>[map] BBCode</h1>
<p>Скачать JavaScript-библиотеку MapBBCode:</p>

<ul>
<li><a href="/dist/mapbbcode-1.1.2.zip">Версия 1.1.2</a>: стабильная версия, выпущена 29 ноября 2013 года</li>
<li><a href="/dist/mapbbcode-latest.zip">Версия 1.2-dev</a>: версия в разработке</li>
<li><a href="/dist/mapbbcode-1.2.0.zip">Версия 1.2.0</a>: стабильная версия, выпущена 25 декабря 2013 года</li>
<li><a href="/dist/mapbbcode-latest.zip">Версия 1.3-dev</a>: версия в разработке</li>
<li><a href="https://github.com/MapBBCode/mapbbcode">Репозиторий GitHub</a>: исходный код, дополнения и примеры</li>
</ul>

<p>У вас, без сомнения, возникнут вопросы после изучения библиотеки. Ответы на некоторых из них <a href="faq.html">ищите в FAQ</a>. Код Map BBCode можно интегрировать в ваш сайт на:</p>

<ul>
<li><b>phpBB 2</b>: <a href="https://github.com/MapBBCode/mapbb-phpbb2/raw/master/dist/mapbbcode_mod.zip">Скачать MOD</a> (совместим с EasyMOD), <a href="https://github.com/MapBBCode/mapbb-phpbb2">GitHub</a></li>
<li><b>phpBB 3</b>: <a href="https://www.phpbb.com/community/viewtopic.php?f=70&amp;t=2205161">Обсуждение MOD-а</a>, <a href="https://github.com/MapBBCode/mapbb-phpbb3">GitHub</a></li>
<li><b>FUDforum</b>: <a href="https://github.com/MapBBCode/mapbb-fud/raw/master/dist/mapbbcode_fud.zip">Скачать плагин</a>, <a href="https://github.com/MapBBCode/mapbb-fud">GitHub</a></li>
<li><b>PunBB</b>: <a href="https://github.com/MapBBCode/mapbb-punbb/raw/master/dist/mapbbcode_punbb.zip">Скачать плагин</a>, <a href="https://github.com/MapBBCode/mapbb-punbb">GitHub</a></li>
<li><b>FluxBB</b>: <a href="https://github.com/MapBBCode/mapbb-fluxbb/raw/master/dist/mapbbcode_fluxbb.zip">Скачать плагин</a>, <a href="https://github.com/MapBBCode/mapbb-flux">GitHub</a></li>
<li><b>phpBB 2</b>: <a href="https://github.com/MapBBCode/mapbb-phpbb2/raw/master/dist/mapbbcode_mod.zip">Скачать мод</a>, <a href="https://github.com/MapBBCode/mapbb-phpbb2">GitHub</a></li>
<li><b>phpBB 3</b>: <a href="https://github.com/MapBBCode/mapbb-phpbb3/raw/master/dist/mapbbcode_mod.zip">Скачать мод</a>, <a href="https://www.phpbb.com/community/viewtopic.php?f=70&amp;t=2205161">обсуждение</a>, <a href="https://github.com/MapBBCode/mapbb-phpbb3">GitHub</a></li>
<li><b>FUDforum</b>: <a href="https://github.com/MapBBCode/mapbb-fud/raw/master/dist/mapbbcode_fud.zip">Скачать плагин</a>, <a href="http://fudforum.org/forum/index.php?t=msg&th=123263">обсуждение</a>, <a href="https://github.com/MapBBCode/mapbb-fud">GitHub</a></li>
<li><b>PunBB</b>: <a href="https://github.com/MapBBCode/mapbb-punbb/raw/master/dist/mapbbcode_punbb.zip">Скачать расширение</a>, <a href="http://punbb.informer.com/forums/topic/26467/extension-map-bbcode/">обсуждение</a>, <a href="https://github.com/MapBBCode/mapbb-punbb">GitHub</a></li>
<li><b>FluxBB</b>: <a href="https://github.com/MapBBCode/mapbb-fluxbb/raw/master/dist/mapbbcode_fluxbb.zip">Скачать мод</a>, <a href="http://fluxbb.org/forums/viewtopic.php?id=7462">обсуждение</a>, <a href="https://github.com/MapBBCode/mapbb-flux">GitHub</a></li>
</ul>

<p>Помогите нам удлиннить этот список! У нас есть подробное <a href="embedding.html">руководство</a> по внедрению кода [map] в форумные движки. Да и не обязательно форумные: плагины для блогов и CMS тоже приветствуются. Библиотека не требует использования <a href="#sample" onclick="javascript:replaceMap(); return true;">настоящих карт</a>. Подключите её к своему проекту для простого отображения карт, или чтобы позволить пользователям полноценно с ними работать. Для демонстрации возможностей библиотеки мы сделали сайт с <a href="https://github.com/MapBBCode/share.mapbbcode.org">открытым исходным кодом</a> для рисования и пересылки пользовательских карт:</p>
Expand Down

0 comments on commit c28a885

Please sign in to comment.