Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
problem with kml overlay
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
brunobergot@gmail.com  
View profile  
 More options May 15 2007, 3:52 am
From: "brunober...@gmail.com" <brunober...@gmail.com>
Date: Tue, 15 May 2007 00:52:12 -0700
Local: Tues, May 15 2007 3:52 am
Subject: problem with kml overlay
Hi

I'm trying to overlay polygons extracted form a kml file on a map but
it does not work. I've tested my kml file on google earth and it
works. I've also tested the file on googlemaps and it works like
that :

http://maps.google.com/maps?q=http://www.eliaz.fr/chantier/labo/plugi...

So i think i've got a problem with my code on my site here :

http://www.eliaz.fr/chantier/labo/spip.php?rubrique1

The code i use contains special things (#SET, #CHEMIN, ...) cause it's
in a plugin for a gpl cms (spip). This code creates markers on the map
by extracting datas from an xml file. I'd like to add some states line
to the map after thet is done but it doesn't work.

I'm not sure but i thnik maybe my problem is that i use GMarkerManager
and addOverlay in the same script...

Could anyone help me please ? Thanks

Here is the code i use :

        <script type="text/javascript">
        //<![CDATA[
        URLbase = "#URL_SITE_SPIP/";
        var map;
        var markerManager;
        <BOUCLE_centrado(GIS){id_article?}{id_rubrique ?}{0,1}>
        #SET{latitude,#ENV{latit,#LAT}}
        #SET{lonxitude,#ENV{lonxit,#LONX}}
        </BOUCLE_centrado>
        #SET{latitude,#ENV{latit,42.94}}
        #SET{lonxitude,#ENV{lonxit,-8.228}}
        <//B_centrado>
        var geoXml = new GGeoXml("[(#CHEMIN{bzh.kml})]");
        function load() {
                if (GBrowserIsCompatible()) {
                        // facelo mapa
                        map = new GMap2(document.getElementById("map"));
                map.addControl(new mapTypeControl());
                        map.addControl(new mapZoomControl());
                        map.addControl(new mapMoveControl());
                map.setCenter(new GLatLng(#GET{latitude}, #GET{lonxitude}),
#ENV{zoom,7}, G_SATELLITE_MAP);
                center = map.getCenter();
                map.enableDoubleClickZoom();
                map.enableContinuousZoom();
                markerManager = new GMarkerManager(map);
                        map.addOverlay(geoXml);
                        //leemo-lo documento dos marcadores
                        $.get('[(#URL_PAGE{rss-gis})]', {[id_rubrique:(#ID_RUBRIQUE)]
[, id_mot:(#ID_MOT)][, id_auteur:(#ID_AUTEUR)][, recherche:
(#RECHERCHE)][, id_article:(#ID_ARTICLE)]}, function(xml){
                                //xml almacena en un objeto xml los datos recogidos del
documento leido
                                $("item", xml).each(function(item){
                                        /*primero buscamos dentro del objeto xml almacenado en xml
todos los nodos "item", el contenido de cada nodo "item" del documento
xml
                                        se almacena en la variable xmlItem (*en la variable item se
almacena la posicion del "item" actual en el array de items y asi
podemos
                                        recorrerlos con facilidad)*/
                                        var xmlItem = xml.documentElement.getElementsByTagName("item")
[item];
                                                agregarMarcador(xmlItem, 0);
                                        });
                                        markerManager.refresh();
                                });
                        }
                }
        //]]>
        </script>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Williams  
View profile  
 More options May 15 2007, 9:54 am
From: Mike Williams <nos...@econym.demon.co.uk>
Date: Tue, 15 May 2007 14:54:17 +0100
Local: Tues, May 15 2007 9:54 am
Subject: Re: problem with kml overlay
It looks like GGeoXml doesn't support <MultiGeometry>

[EGeoXml doesn't either. I only process the first object within each
Placemark, so only the marker within each Placemark gets plotted.]

--
The Blackpool Community Church Javascript Team
http://www.econym.demon.co.uk/googlemaps/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
brunobergot@gmail.com  
View profile  
 More options May 15 2007, 1:03 pm
From: "brunober...@gmail.com" <brunober...@gmail.com>
Date: Tue, 15 May 2007 17:03:37 -0000
Local: Tues, May 15 2007 1:03 pm
Subject: Re: problem with kml overlay
Hi Mike,

Thanks for the advice, it still doesn't work after removing the
<MultiGeometry> tags in the kml file.

I think my problem is due to the agregarMarcador() function which is
define in this file :

http://www.eliaz.fr/chantier/labo/plugins/gis/googlemap_api/js/geomap.js

I'm not a javascript guru at all, but i've understood that is in this
file that the markers are created...

Thanks again


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mark mcclure  
View profile  
(1 user)  More options May 15 2007, 2:12 pm
From: mark mcclure <mcmccl...@unca.edu>
Date: Tue, 15 May 2007 11:12:28 -0700
Local: Tues, May 15 2007 2:12 pm
Subject: Re: problem with kml overlay
On May 15, 3:52 am, "brunober...@gmail.com" <brunober...@gmail.com>
wrote:

> I'm trying to overlay polygons extracted form a kml file on a map but
> it does not work. I've tested my kml file on google earth and it
> works. I've also tested the file on googlemaps and it works like
> that :
> http://www.eliaz.fr/chantier/labo/plugins/gis/bzh.kml

If you paste your KML file into my polyline encoder, it
will generate a map showing the LineStrings in the KML
file as encoded polylines and the code to generate this
in your own map.  It will also generate the code for the
Polygons in the KML file as encoded polygons, but your
file doesn't have any.

Polyline encoder is here:
http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/

Mark


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mark mcclure  
View profile  
 More options May 15 2007, 1:21 pm
From: mark mcclure <mcmccl...@unca.edu>
Date: Tue, 15 May 2007 10:21:19 -0700
Local: Tues, May 15 2007 1:21 pm
Subject: Re: problem with kml overlay
On May 15, 3:52 am, "brunober...@gmail.com" <brunober...@gmail.com>
wrote:

> I'm trying to overlay polygons extracted form a kml file on a map but
> it does not work. I've tested my kml file on google earth and it
> works. I've also tested the file on googlemaps and it works like
> that :
> http://maps.google.com/maps?q=http://www.eliaz.fr/chantier/labo/plugi...

If you take your KML file and plug it into my polyline encoder, you
get
a pretty nice map and the code to generate the map using encoded
polylines.  The polyline encoder will also generated encoded polygons,
but your KML file doesn't seem to have any polygon elements.  If you
often deal with complicated boundaries, as in this example, then this
might be a reasonable approach.

Polyline encoder is here:
http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/

Goo luck,
Mark.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
brunobergot@gmail.com  
View profile  
 More options May 15 2007, 2:58 pm
From: "brunober...@gmail.com" <brunober...@gmail.com>
Date: Tue, 15 May 2007 18:58:39 -0000
Local: Tues, May 15 2007 2:58 pm
Subject: Re: problem with kml overlay
It works, Great tool !! Thanks a lot for this link Mark.

++


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google