Recent Topics

1 Nov 04, 2006 16:37    

Hi,

I would like to embed an interactive Google Map into a
Blog Posting, but the HTML Checker does not like the JavaScript
Code to display the map using the Google API, see for example.

http://www.google.de/apis/maps/documentation/#The_Hello_World_of_Google_Maps

Is there a simple way to do it?

I'm running b2evo 1.8.2.

Thanks, Sven
www.typ15.de

2 Nov 13, 2006 12:51

Sorry, just seen this post.

One of the easiest ways is to add a new tag to the BB code plugin and use that to convert it to the javascript you want.

¥

4 Nov 23, 2006 15:23

Actually, I just had a better look at this.

What you can do is add the javascript to your skins _main.php and the body onload bits :-

    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=abcdefg"
            type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[

    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(37.4419, -122.1419), 13);
      }
    }

    //]]>
    </script>
</head>
  <body onload="load()" onunload="GUnload()">

Next you need to crack open conf/_formatting.php ( make a backup first huh) and find a line that looks like this :-

define('A_coreattrs', 'class title');

and change it to this :-

define('A_coreattrs', 'class title id style');

Then, in your post you can just use :-

<div id="map" style="width: 500px; height: 300px"></div>

¥

6 Nov 24, 2006 00:54

Neat blog Sven
I love love those Vdubs.

7 Mar 29, 2008 03:37

¥åßßå wrote:

Actually, I just had a better look at this.

What you can do is add the javascript to your skins _main.php and the body onload bits :-

    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=abcdefg"
            type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[

    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(37.4419, -122.1419), 13);
      }
    }

    //]]>
    </script>
</head>
  <body onload="load()" onunload="GUnload()">

Next you need to crack open conf/_formatting.php ( make a backup first huh) and find a line that looks like this :-

define('A_coreattrs', 'class title');

and change it to this :-

define('A_coreattrs', 'class title id style');

Then, in your post you can just use :-

<div id="map" style="width: 500px; height: 300px"></div>

¥

Hi there.
I'm running with the 1.10.2 version. That what it's written at the bottom of my page in the admin section.

b2evolution 1.10.2 – GPL License – ©2001-2002 by Michel V & others – ©2003-2007 by François Planque & others.

Anyway. I did not found that :

define('A_coreattrs', 'class title');


I had that :

define('A_coreattrs', 'class title'.( $posts_allow_css_tweaks ? ' id style' : '' ) );


And I changed into that :

define('A_coreattrs', 'class title id style'.( $posts_allow_css_tweaks ? ' id style' : '' ) );

That's working good. I've got the map. But now my question is :
How can I had some point in the map ?
I would like to add point in the map. With a description and with links to an entry and some picture.
Is it possible to do that ?

I haven't found a plug in fo that !

Cheers


Form is loading...