[RC] Map BBCode

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Suggested Hosts
Zverik
Registered User
Posts: 16
Joined: Tue Oct 08, 2013 8:02 pm
Location: Saint-Petersburg, Russia
Name: Ilya Zverev
Contact:

Re: [BETA] Map BBCode

Post by Zverik »

leschek wrote:It looks this (a few lines around code I added):

Code: Select all

<script src="../mapbbcode/leaflet.js"></script>
<script src="../mapbbcode/Bing.js"></script>
<script src="../mapbbcode/mapbbcode-config.js"></script>
<script src="mapbbcode/Google.js"></script>
Here is the error: incorrect path to Google.js. Try adding "../" before "mapbbcode/Google.js".
leschek
Registered User
Posts: 839
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [BETA] Map BBCode

Post by leschek »

Thank you, that solved the problem.
I also added other Google map layers (in case somebody wants it), so users can choose from four of them:

Code: Select all

<script>window.layerList.list['Google Maps roadmap'] = 'new L.Google("ROADMAP")';</script>
<script>window.layerList.list['Google Maps satelite'] = 'new L.Google("SATELLITE")';</script>
<script>window.layerList.list['Google Maps hybrid'] = 'new L.Google("HYBRID")';</script>
<script>window.layerList.list['Google Maps terrain'] = 'new L.Google("TERRAIN")';</script>
So far everything works, but I have question about editing map. Lets say I make topic about traveling and into first post I would add map, into which I would like to add every day the route that I went through. I figured out that I can edit post and create other map and copy the points from it into the first one (if I don't use GPS tracker), but it would be more user friendly if there is "edit map" button on map to allow users to add the points into map.

I didn't try maps on http://share.mapbbcode.org, so I don't know if (in case I use GPS tracker) I can (edit) map and add into it more GPS tracks.
Zverik
Registered User
Posts: 16
Joined: Tue Oct 08, 2013 8:02 pm
Location: Saint-Petersburg, Russia
Name: Ilya Zverev
Contact:

Re: [BETA] Map BBCode

Post by Zverik »

leschek wrote:So far everything works, but I have question about editing map. Lets say I make topic about traveling and into first post I would add map, into which I would like to add every day the route that I went through. I figured out that I can edit post and create other map and copy the points from it into the first one (if I don't use GPS tracker), but it would be more user friendly if there is "edit map" button on map to allow users to add the points into map.
Yes, there is an edit button, of course. if you press "Map" button when cursor is inside [map]...[/map], the editor opens with that map, and you can add and remove points.
leschek wrote:I didn't try maps on http://share.mapbbcode.org, so I don't know if (in case I use GPS tracker) I can (edit) map and add into it more GPS tracks.
Right now you can only import one trace per map, but I think I'll adjust that, so many files can be imported on the same map.
leschek
Registered User
Posts: 839
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [BETA] Map BBCode

Post by leschek »

Zverik wrote:Yes, there is an edit button, of course. if you press "Map" button when cursor is inside [map]...[/map], the editor opens with that map, and you can add and remove points.
I would never figure this out myself. But it works. I was able to add another points and line of points to the map. I wasn't able to join to point lines together, but it is not big deal. I also figured out that I can delete last point of line by clicking on point, but I wasn't able to delete whole line - there always stayed three last points. And I would like to ask why, when I click on point somewhere on point line (except the first and the last point) it will add two points around it?
Zverik wrote:Right now you can only import one trace per map, but I think I'll adjust that, so many files can be imported on the same map.
That would be really nice.
Zverik
Registered User
Posts: 16
Joined: Tue Oct 08, 2013 8:02 pm
Location: Saint-Petersburg, Russia
Name: Ilya Zverev
Contact:

Re: [BETA] Map BBCode

Post by Zverik »

leschek wrote:I was able to add another points and line of points to the map. I wasn't able to join to point lines together, but it is not big deal. I also figured out that I can delete last point of line by clicking on point, but I wasn't able to delete whole line - there always stayed three last points. And I would like to ask why, when I click on point somewhere on point line (except the first and the last point) it will add two points around it?
There are two types of line markers: white and semi-transparent grey. White rectangles are actual line nodes: you can move them, and line will change. Semi-transparent rectangles are "virtual nodes": if you drag one, it becomes a real node. This way you can add nodes inside a line. That's why two extra points appear: virtual node becomes the real one, so two new virtual nodes are drawn, so you can add more of them.

And try clicking on a line itself, away from its points. There will be a popup panel from which you can change line color and delete the line altogether.

I plan to write a translatable user's guide, since the need for it is obvious. Probably later this month.
leschek
Registered User
Posts: 839
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [BETA] Map BBCode

Post by leschek »

Thank you for explanation. The guide would be handy.
Semik
Registered User
Posts: 9
Joined: Wed Mar 24, 2010 10:40 am
Location: Russia, Voronezh
Name: Semen Panevin
Contact:

Re: [BETA] Map BBCode

Post by Semik »

I was trying to install this MOD using AutoMOD but instead of a zip archive with modified files I got an error message
"Content Encoding Error

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

Please contact the website owners to inform them of this problem."

And it really modified some files so my forum became broken despite the modification setting zip archive in AutoMOD settings.

phpBB 3.0.12, FireFox 17.0.10/IE8

Is it a problem of this MOD or AutoMOD?
Semik
Registered User
Posts: 9
Joined: Wed Mar 24, 2010 10:40 am
Location: Russia, Voronezh
Name: Semen Panevin
Contact:

Re: [BETA] Map BBCode

Post by Semik »

Open: styles/subsilver2/template/posting_body.html
Find
Tip: This may be a partial find and not the whole line.

Code:Select all
</script>

<table width="100%" cellspacing="0" cellpadding="0" border="0">
Add after
Tip: Add these lines on a new blank line after the preceding line(s) to find.

Code:Select all
<div id="mapedit"></div>
Are you sure? You broke DOM by putting div in wrong place!
Semik
Registered User
Posts: 9
Joined: Wed Mar 24, 2010 10:40 am
Location: Russia, Voronezh
Name: Semen Panevin
Contact:

Re: [BETA] Map BBCode

Post by Semik »

There is no [Map] button in QuickReply, nor prosilver neither subsilver2
leschek
Registered User
Posts: 839
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [BETA] Map BBCode

Post by leschek »

Semik wrote:There is no [Map] button in QuickReply, nor prosilver neither subsilver2
I donť have any BBCode in phpBB default quick reply.
Semik
Registered User
Posts: 9
Joined: Wed Mar 24, 2010 10:40 am
Location: Russia, Voronezh
Name: Semen Panevin
Contact:

Re: [BETA] Map BBCode

Post by Semik »

leschek wrote:
Semik wrote:There is no [Map] button in QuickReply, nor prosilver neither subsilver2
I donť have any BBCode in phpBB default quick reply.
It is a problem of phpBB3 modifications. There is no management of them (except AutoMOD, which is MOD too, bot not many modifications are fully compatible with it), so I don't remember all of modifications installed. Now I remember it.

In this particular case it is a "conflict" of 2 modifications. One of them "upgrades" standard QR to include smiles and BBCodes, the second modifies BBCodes list without knowing anything about the first one. So, some tests required for displaying Map button in QR should be done in viewtopic.php but they wasn't.

I fixed it for my instance. But "modified" QR is quite popular. Probably this question should be somewhere in FAQ or, even better, there should be installation instructions to get compatible with this modification right in MOD's contrib. I don't even know what is "board3" but instructions for it are in the MOD's distribution.

http://www.phpbbguru.net/community/topic27008.html (Russian)
Zverik
Registered User
Posts: 16
Joined: Tue Oct 08, 2013 8:02 pm
Location: Saint-Petersburg, Russia
Name: Ilya Zverev
Contact:

Re: [BETA] Map BBCode

Post by Zverik »

Semik, thanks for installing and testing the modification. A problem with zip archives was clearly not mapbbcode's fault. And I am fixing the DOM issue now, will publish it in couple of days (after I release version 1.0.1 of the MapBBCode library).

As for quick reply panel, I have considered adding the button there, but there is a problem with that. Scripts. If I add the button to every page of every thread, then mapbbcode scripts (around 250k uncompressed) would be included to every page, and not just to those that have maps in them. I don't think it is worth having a map button in quick reply.
Zverik
Registered User
Posts: 16
Joined: Tue Oct 08, 2013 8:02 pm
Location: Saint-Petersburg, Russia
Name: Ilya Zverev
Contact:

Re: [RC] Map BBCode

Post by Zverik »

I have just updated the plugin to version 1.0.0 and marked it RC. There is an upgrade MOD inside, which updates underlying MapBBCode library to v1.1.1 and fixes some paths for scripts. Do not forget to purge the cache after installing (there is a button for than on the "General" tab).

GitHub repository now contains instructions on adding proprietary layers (Google, Yandex etc.), which is done just by adding two lines into 2-3 files. Note than you cannot have a proprietary layer as a default one: you have to add at least one OpenStreetMap-based layer (there are a lot of options, I recommend OpenMapSurfer).

And MapBBCode Share website supports importing several traces into one map. A plugin for displaying track lengths is still in development.
Zverik
Registered User
Posts: 16
Joined: Tue Oct 08, 2013 8:02 pm
Location: Saint-Petersburg, Russia
Name: Ilya Zverev
Contact:

Re: [RC] Map BBCode

Post by Zverik »

The modification was updated to 1.0.1. There are three notable changes:

1. MapBBCode library was updated to 1.1.2 (changelog).
2. It is now quite easy to enable proprietary layers and add-ons: there are only 2 files to edit (sadly, I could not lower it to a single file, like in other forum engines).
3. There are add-ons now! Just one: length measurement. It was often requested feature, which makes the plugin's features on par with other map sharing services. You can test in at the library's website.
leschek
Registered User
Posts: 839
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [RC] Map BBCode

Post by leschek »

Looks like nice update. I didn't try it yet (only the previous version), but I would like to ask if would be possible to make your MOD compatible with phpBB Gallery and if user who is posting map would be able to choose zoom level of map?
Locked

Return to “[3.0.x] MODs in Development”