Embedding Gmap4 maps that display GIS data

Instead of emailing or messaging the Admins or Mods with technical support questions or comments about the site, we prefer you check here to see if someone else has had the same difficulty or has made the same suggestion. What you're after might have already been posted and addressed here or within the FAQ. If not, please post a detailed description of the problem/suggestion and someone from the HST team will address your needs shortly. If you can't login/post and are unable to reset your password on your own, you may contact us directly.
Post Reply
User avatar
Joseph
Topix Acquainted
Posts: 48
Joined: Fri Sep 03, 2010 1:15 pm
Experience: N/A

Embedding Gmap4 maps that display GIS data

Post 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
User avatar
ERIC
Your Humble Host & Forums Administrator
Your Humble Host & Forums Administrator
Posts: 3254
Joined: Fri Oct 28, 2005 9:13 am
Experience: Level 4 Explorer
Location: between the 916 and 661

Re: Embedding Gmap4 maps that display GIS data

Post 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.
New members, please consider giving us an intro!
Follow us on Twitter @HighSierraTopix. Use hashtags #SIERRAPHILE #GotSierra? #GotMountains?
Follow us on Facebook: https://www.facebook.com/HighSierraTopix
User avatar
Joseph
Topix Acquainted
Posts: 48
Joined: Fri Sep 03, 2010 1:15 pm
Experience: N/A

Re: Embedding Gmap4 maps that display GIS data

Post 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
User avatar
ERIC
Your Humble Host & Forums Administrator
Your Humble Host & Forums Administrator
Posts: 3254
Joined: Fri Oct 28, 2005 9:13 am
Experience: Level 4 Explorer
Location: between the 916 and 661

Re: Embedding Gmap4 maps that display GIS data

Post 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.
New members, please consider giving us an intro!
Follow us on Twitter @HighSierraTopix. Use hashtags #SIERRAPHILE #GotSierra? #GotMountains?
Follow us on Facebook: https://www.facebook.com/HighSierraTopix
User avatar
Joseph
Topix Acquainted
Posts: 48
Joined: Fri Sep 03, 2010 1:15 pm
Experience: N/A

Re: Embedding Gmap4 maps that display GIS data

Post 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.
User avatar
ERIC
Your Humble Host & Forums Administrator
Your Humble Host & Forums Administrator
Posts: 3254
Joined: Fri Oct 28, 2005 9:13 am
Experience: Level 4 Explorer
Location: between the 916 and 661

Re: Embedding Gmap4 maps that display GIS data

Post 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.
Joseph wrote: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.p ... 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/publi ... USFS_trail

that should work fine.
Good suggestion. I'll test it out.
New members, please consider giving us an intro!
Follow us on Twitter @HighSierraTopix. Use hashtags #SIERRAPHILE #GotSierra? #GotMountains?
Follow us on Facebook: https://www.facebook.com/HighSierraTopix
Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests