vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   BB Code Enhancements - Embed Interactive SAVED Google Maps (https://vborg.vbsupport.ru/showthread.php?t=235632)

benstillman 02-10-2010 10:00 PM

Embed Interactive SAVED Google Maps
 
1 Attachment(s)
Per request: This embeds an interactive Google Map which you have previously created and saved to your "My Maps".

Admin CP --> Custom BB Codes --> Add New BB Code

Title: Saved Map

BB Code Tag Name: savedmap

Replacement: <div align="center" style="margin: 5px 5px 5px 5px;">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%">
<tr>
<td class="thead" style="text-align:center"><iframe width="100%" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?{param}&amp;output=embed"></iframe>
</td>
</tr>
</table>
</div>
</div>

Example: [savedmap]source=ig&hl=en&ie=UTF8&hq=&hnear=Browns+Summit,+N C&gl=us&ei=5Pw5S5CTGI3ilAfR 8_GgBw&ved=0CAsQ8gEwAA&msa=0&msid=1082868885536792 96824.00047bd3022f955f5a820&ll =36.75539,-81.285095&spn=0.792197,1.149445&z=10[/savedmap]

Description: This will insert a saved Google map

Use {option}: No

Button Image (Optional): whatever 20x20 image you want, or none

Remove Tag If Empty: Yes

Disable BB Code Within This BB Code:
Yes

Disable Smilies Within This BB Code: Yes

Disable Word Wrapping Within This BB Code: Yes

Edited per trumpetrhapsody's recommendation.

voglermc 02-11-2010 08:30 PM

Thank you!

voglermc 02-11-2010 09:25 PM

works perfectly!

benstillman 02-11-2010 09:39 PM

Glad to hear.

MooseMoney 02-13-2010 10:15 AM

Installed!
Thank you very much! :D

xtreme4x4sa 02-22-2010 01:41 PM

Hi.

For me it did not work at first. In the cms it messed around with the background. On carefull inspection I found a </Div> at the end to much. I am no expert but it fixed the problem.

Thanks for this, and yes Marked as installed.

KW802 02-22-2010 02:42 PM

Wouldn't this allow any URL to be used?

Trumpetrhapsody 02-22-2010 03:14 PM

I changed the code to this just in case:

Code:

<div align="center" style="margin: 5px 5px 5px 5px;">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%">
<tr>
<td class="thead" style="text-align:center"><iframe width="100%" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?{param}&amp;output=embed"></iframe>
</td>
</tr>
</table>
</div>

Code:

[savedmap]source=ig&hl=en&ie=UTF8&hq=&hnear=Browns+Summit,+NC&gl=us&ei=5Pw5S5CTGI3ilAfR 8_GgBw&ved=0CAsQ8gEwAA&msa=0&msid=108286888553679296824.00047bd3022f955f5a820&ll =36.75539,-81.285095&spn=0.792197,1.149445&z=10[/savedmap]


Using the "Test Your BB code" at the bottom of the manager it shows up properly, but in the actual replacement example box it doesn't show up. Just a FYI.

hiker 03-25-2010 03:00 PM

Is there any way to merge this code with this mod's code? https://vborg.vbsupport.ru/showthread.php?t=234318

benstillman 06-14-2010 02:49 PM

Quote:

Originally Posted by Trumpetrhapsody (Post 1988826)
I changed the code to this just in case:

Code:

<div align="center" style="margin: 5px 5px 5px 5px;">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%">
<tr>
<td class="thead" style="text-align:center"><iframe width="100%" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?{param}&amp;output=embed"></iframe>
</td>
</tr>
</table>
</div>

Code:

[savedmap]source=ig&hl=en&ie=UTF8&hq=&hnear=Browns+Summit,+NC&gl=us&ei=5Pw5S5CTGI3ilAfR 8_GgBw&ved=0CAsQ8gEwAA&msa=0&msid=108286888553679296824.00047bd3022f955f5a820&ll =36.75539,-81.285095&spn=0.792197,1.149445&z=10[/savedmap]


Using the "Test Your BB code" at the bottom of the manager it shows up properly, but in the actual replacement example box it doesn't show up. Just a FYI.

I edited the original per your suggestion. Thanks.

Trilhos Vivos 06-15-2010 03:03 AM

IS there anyway I can load external gpx files into these maps?

Example:

[savedmap]http://my.resource.com/track-file.gpx[/savedmap]

So the map would show the contents of my gpx file?

Thanks in advance

funmasti 06-15-2010 09:17 AM

Installed.

benstillman 07-08-2010 04:55 PM

Quote:

Originally Posted by Trilhos Vivos (Post 2053824)
IS there anyway I can load external gpx files into these maps?

Example:

[savedmap]http://my.resource.com/track-file.gpx[/savedmap]

So the map would show the contents of my gpx file?

Thanks in advance

Not very easily. Check out http://www.gpsvisualizer.com/ and see if that might work for you.

fuzioneer 08-01-2010 10:02 AM

i have this working on a vb 4.0.3 site and it works fine for UK roads, but if i try linking to a UK Streetview it simply displays the standard google map view instead ?

ravencr 09-24-2010 06:29 PM

How do I do an iframe for any url, so instead of posting a url and it opening a new page on their site, it keeps the user on my site within the iframe?

Chris

benstillman 11-17-2010 02:44 PM

Quote:

Originally Posted by ravencr (Post 2102811)
How do I do an iframe for any url, so instead of posting a url and it opening a new page on their site, it keeps the user on my site within the iframe?

Chris

You don't want to do that. That's a huge security risk. Anyone could embed stuff within your site that way.

benstillman 11-17-2010 02:45 PM

Quote:

Originally Posted by fuzioneer (Post 2077555)
i have this working on a vb 4.0.3 site and it works fine for UK roads, but if i try linking to a UK Streetview it simply displays the standard google map view instead ?

Got me beat.

sufilala 05-20-2011 12:22 PM

fantastic
thanks for this!!

Dev Exiles 08-08-2011 08:18 PM

I don't think I've screwed anything up, but I tweaked it a bit to allow:

1) Any Google map can be embedded, not just saved maps, and

2) Control over how large the map is displayed.

Code:

<div align="center" style="margin: 5px 5px 5px 5px;">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%">
<tr>
<td class="thead" style="text-align:center"><iframe {option} frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/{param}&amp;output=embed"></iframe>
</td>
</tr>
</table>
</div>


Be sure to change Use {option} to Yes. The option is the width and height of the map. An example would look like this:


Code:

[savedmap=width="600" height="600"]maps?q=OBAMA'S+FRIED+CHICKEN,+Saint+Nicholas+Avenue,+New+York,+NY&hl=en&ll=40.802327,-73.950734&spn=0.00752,0.021136&sll=40.80391,-73.958234&sspn=0.003963,0.010568&z=16[/savedmap]

benstillman 11-07-2011 04:08 PM

Quote:

Originally Posted by Dev Exiles (Post 2231023)
I don't think I've screwed anything up, but I tweaked it a bit to allow:

1) Any Google map can be embedded, not just saved maps, and

2) Control over how large the map is displayed.

Code:

<div align="center" style="margin: 5px 5px 5px 5px;">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%">
<tr>
<td class="thead" style="text-align:center"><iframe {option} frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/{param}&amp;output=embed"></iframe>
</td>
</tr>
</table>
</div>

Be sure to change Use {option} to Yes. The option is the width and height of the map. An example would look like this:


Code:

[savedmap=width="600" height="600"]maps?q=OBAMA'S+FRIED+CHICKEN,+Saint+Nicholas+Avenue,+New+York,+NY&hl=en&ll=40.802327,-73.950734&spn=0.00752,0.021136&sll=40.80391,-73.958234&sspn=0.003963,0.010568&z=16[/savedmap]


That was already done: https://vborg.vbsupport.ru/showthread.php?t=235625

ozione 12-04-2011 09:47 PM

hello!

i did manage to get this working but there is a strange issue with my embedded maps; there is no location "pins" visible. i tried with public addresses or my custom saved maps. i just get a map with no "destination" pin.

any clues?
thanks

benstillman 12-20-2011 03:32 PM

Quote:

Originally Posted by ozione (Post 2274685)
hello!

i did manage to get this working but there is a strange issue with my embedded maps; there is no location "pins" visible. i tried with public addresses or my custom saved maps. i just get a map with no "destination" pin.

any clues?
thanks

Example address?

ozione 01-16-2012 12:45 PM

Code:

http://maps.google.com/maps?q=19+Ptujska+ulica,+Ljubljana,+Slovenija&hl=sl&ll=46.054173,14.530621&spn=0.099711,0.223675&sll=46.050004,14.518948&sspn=0.199436,0.44735&vpsrc=6&hnear=Ptujska+ulica+19,+1000+Ljubljana,+Slovenija&t=h&z=13&iwloc=A
this is code used in my custom map. it opens nicely withing the browser...

d0cpaul 07-04-2012 12:10 AM

Quote:

Originally Posted by ozione (Post 2274685)
hello!

i did manage to get this working but there is a strange issue with my embedded maps; there is no location "pins" visible. i tried with public addresses or my custom saved maps. i just get a map with no "destination" pin.

any clues?
thanks

I got the same thing happening to me. Here's a URL to the test post:
http://trailviewer.org/showthread.ph...st&p=10#post10

Jonm 07-04-2012 12:15 PM

all I see is the link or BBCODE no map....

d0cpaul 07-05-2012 08:01 AM

Sorry about that mate here's the test link..
http://trailviewer.org/forum/showthr...ap&p=11#post11

d0cpaul 07-14-2012 08:04 PM

Anyone have a solution?

Guust 09-27-2012 08:49 PM

Can anybody tell me how to get the code that is required to be pasted between the [SAVEDMAP] tags?
I have created a map and saved it to "my places" in google maps, but have not been able to find any code that actually works.

This is a link to the map:
http://maps.google.com/maps/ms?ie=UT...a63409a48ae93f just in case I am doing things wrong.

Guust 09-28-2012 09:13 AM

I figured it out, you get the code from the link icon above the details of your saved map, and drop the
https://maps.google.com.au/maps/ms?
bit in front of the URL.
Quote:

Originally Posted by Guust (Post 2369103)
Can anybody tell me how to get the code that is required to be pasted between the [SAVEDMAP] tags?
I have created a map and saved it to "my places" in google maps, but have not been able to find any code that actually works.

This is a link to the map:
http://maps.google.com/maps/ms?ie=UT...a63409a48ae93f just in case I am doing things wrong.


lukescotty 11-13-2012 01:16 AM

why are my maps very narrow

http://www.talknightlife.co.uk/f43/t...-google-14795/

Any ideas???

Cheers guys


All times are GMT. The time now is 04:47 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01392 seconds
  • Memory Usage 1,810KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (30)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete