Page 1 of 1
Embedding Gmap4 maps that display GIS data
Posted: Sat Apr 04, 2015 6:07 am
by Joseph
I tried to embed this Gmap4 map:
http://www.mappingsupport.com/p/gmap4.p ... rought.txt
and got an error message.
Note that the q parameter points to a txt file.
That file specifies the GIS data for the map to display.
For more info about displaying GIS data with Gmap4 please see:
http://www.mappingsupport.com/p/gmap4_gis-viewer.html
Joseph, the Gmap4 guy
Re: Embedding Gmap4 maps that display GIS data
Posted: Sat Apr 04, 2015 7:51 am
by ERIC
The two BBCodes we use are what you gave us several years ago. If there is an updated BBCode, just post it here and I'll incorporate it. Not really excited about adding a third or fourth or...? BBCode, so if you could combine all map types into one or two codes that would be wonderful.
Re: Embedding Gmap4 maps that display GIS data
Posted: Sat Apr 04, 2015 8:26 am
by Joseph
ERIC wrote:The two BBCodes we use are what you gave us several years ago. If there is an updated BBCode, just post it here and I'll incorporate it. Not really excited about adding a third or fourth or...? BBCode, so if you could combine all map types into one or two codes that would be wonderful.
Hi Eric,
I do not know anything about BB codes and have not provided any to anyone. Also, there is no need for you to add a new BB code. Instead, the solution is to edit the javascript (or whatever) that is executed in response to the BB code you are already using for Gmap4.
Initially, you set things up so Gmap4 maps could be embedded and people could display their GPS track with links like:
http://www.mappingsupport.com/p/gmap4.p ... dge.[b]gpx[/b]&t=t4
Note that the q parameter points to a
gpx file in the above example. The only thing that is different when Gmap4 displays GIS data is that the q parameter points to a
txt file.
If I try to embed this link:
http://www.mappingsupport.com/p/gmap4.p ... rought.txt
then
your BB script deletes the q parameter.
This changes the Gmap4 link into:
The data file is:
http://www.mappingsupport.com/p/gmap4.p ... state_data&
Since the q paramater is missing, Gmap4 throws an error.
Q: Why should you care?
A: The USFS has just started publishing trail data to its authoritative GIS server. Gmap4 can display that trail data.
This is only available for the Umatilla NF (Or and WA) right now but data for the CA forests will be added to the USFS GIS server in due course.
Joseph
Re: Embedding Gmap4 maps that display GIS data
Posted: Sun Apr 05, 2015 8:41 am
by ERIC
OK, my mistake. Looking back at old posts looks like I figured out how to do it on my own once upon a time. Surprised you're not familiar with BBCode though since so many of the forums (like this one) that you promote the use of Gmap4 use BBCode. It would be great if you could add BBCode support to your help files to make things easier for forums owners. It's basically just shortcode, html replacement. Unfortunately, manually changing javascript or other code is not an option so we'll need to work within what is allowable through the BBCode feature of phpBB and other like forums software.
Right now, there are two buttons for your maps.
One:
Code: Select all
html replacement
<iframe width="100%" height="500px" src="http://www.mappingsupport.com/p/gmap4.php?q={URL}&t=t2" frameborder="0" scrolling="no"></iframe>
BBCode useage
[Gmap4]{URL}[/Gmap4]
Two:
Code: Select all
html replacement
<iframe width="100%" height="500px" src="http://www.mappingsupport.com/p/gmap4.php?ll={SIMPLETEXT}&t=t2" frameborder="0" scrolling="no"></iframe>
BBCode useage
[Gmap4LL]{SIMPLETEXT}[/Gmap4LL]
I'll study your map URLs to see if there's a way to do this without opening up any vulnerabilities and without breaking any of the posts that in the past used the two existing BBCodes to insert your maps.
Re: Embedding Gmap4 maps that display GIS data
Posted: Sun Apr 05, 2015 9:39 am
by Joseph
Sure, I would be delighted to add BB code info to my help files but no admin has been willing to share theirs.
And if it is too much bother to support embedding maps that display GIS data, it is not that big of a deal since the map links themselves can still be used in a post.
Would it help if the q paramater always came first, like so:
http://www.mappingsupport.com/p/gmap4.php?q=http://www.propertylinemaps.com/p/public_land_map/USA/USFS_recreation.txt&ll=45.708546,-118.054060&z=14&t=t4,USFS_trail
If the BB substitution could be:
Code: Select all
html replacement
<iframe width="100%" height="500px" src="http://www.mappingsupport.com/p/gmap4.php?q={URL}" frameborder="0" scrolling="no"></iframe>
where {URL} is:
http://www.propertylinemaps.com/p/public_land_map/USA/USFS_recreation.txt&ll=45.708546,-118.054060&z=14&t=t4,USFS_trail
that should work fine.
Re: Embedding Gmap4 maps that display GIS data
Posted: Sun Apr 05, 2015 9:52 am
by ERIC
Joseph wrote:Sure, I would be delighted to add BB code info to my help files but no admin has been willing to share theirs.
I think what I've shared here is pretty universal and should work on just about any platform using BBCode. BBCode is basically three part: 1) BBCode Usage, 2) html replacement, and 3) help line (what displays when hovering over the button). If you posted up in your help files
like this I'm sure more forum owners would probably implement, plus, you would have more control over button name and help line text.
Good suggestion. I'll test it out.