nelson119 / geoxml3 Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/geoxml3
Automatically exported from code.google.com/p/geoxml3
What steps will reproduce the problem?
1. Goto
http://www.geocodezip.com/geoxml3_test/v3_geoxml3_KML_samples_zoom_false.html
2. Click on "Mt.Etna" button
3.
What is the expected output? What do you see instead?
Ground overlay should have 0.45 opacity, instead has none in IE.
Original issue reported on code.google.com by geocodezip
on 28 Dec 2010 at 4:48
What steps will reproduce the problem?
1. I followed the steps outlined in the wiki to include geoxml3
2. The very same page was working a few weeks ago, now it is not working
anymore.
What is the expected output? What do you see instead?
I should see Google Maps the the content of my kml file overlayd. Instead,
I get a JavaScript error in ProjectedOverlay.js saying that the function
set_map does not exist.
What version of the product are you using? On what operating system?
svn export http://geoxml3.googlecode.com/svn/trunk/ on sunday, dec 20th
2009. Firefox 3.5 on a mac. That gives me revision r3 of ProjectedOverlay.js.
Please provide any additional information below.
The reason why the error comes is that ProjectedOverlay.js is trying to use
functions such as set_map or get_zoom, but the Google API is using
different names such as setMap or getZoom.
I got the whole thing to work again by changing the function names to match
Google's naming convention. You can either manually change the functions or
apply the patch attached to this email to the ProjectedOverlay.js file.
Original issue reported on code.google.com by [email protected]
on 20 Dec 2009 at 2:23
Attachments:
From "KML Reference"
http://code.google.com/apis/kml/documentation/kmlreference.html#feature
A style defined within a Feature is called an "inline style" and applies only
to the Feature that contains it. A style defined as the child of a <Document>
is called a "shared style." A shared style must have an id defined for it. This
id is referenced by one or more Features within the <Document>. In cases where
a style element is defined both in a shared style and in an inline style for a
Feature—that is, a Folder, GroundOverlay, NetworkLink, Placemark, or
ScreenOverlay—the value for the Feature's inline style takes precedence over
the value for the shared style.
Currently geoxml3 only supports shared styles
Original issue reported on code.google.com by geocodezip
on 15 Nov 2010 at 7:58
What steps will reproduce the problem?
1. Create a KML file that includes a style that has an href
2. Load the file into a map
3. Open the .html file in any browser
What is the expected output? What do you see instead?
Load the KML of all the markers. Notice that the marker is not centered over
the desired lat/long
What version of the product are you using? On what operating system?
r=44. Windows Vista
Please provide any additional information below.
Line 632 has an incorrect anchor point, currently it is 12 should be 32!
var processStyleID = function (style) {
var zeroPoint = new google.maps.Point(0,0);
if (!!style.href) {
var markerRegEx = /\/(red|blue|green|yellow|lightblue|purple|pink|orange|pause|go|stop)(-dot)?\.png/;
if (markerRegEx.test(style.href)) {
//bottom middle
var anchorPoint = new google.maps.Point(16*style.scale, 32*style.scale);
} else {
//incorrect anchor point below
// var anchorPoint = new google.maps.Point(16*style.scale, 12*style.scale);
//It should be 32 to be the middle center of the default size
var anchorPoint = new google.maps.Point(16*style.scale, 32*style.scale);
}
// Init the style object with a standard KML icon
style.icon = new google.maps.MarkerImage(
style.href,
new google.maps.Size(32*style.scale, 32*style.scale),
zeroPoint,
// bottom middle
anchorPoint,
new google.maps.Size(32,32)
);
Original issue reported on code.google.com by [email protected]
on 3 Feb 2011 at 6:27
What steps will reproduce the problem?
1. run http://perassi.org/quickhacks/gmaps3/ in IE7
2.
3.
What is the expected output? What do you see instead?
Error Line 37.
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 19 Oct 2009 at 3:56
What steps will reproduce the problem?
1. Add three kml documents to one invocation of parse
2. Add custom afterparse function and evaluate document set
3. Compare to parser's docs
What is the expected output? What do you see instead?
Expected is that order of kml documents in parse() method matches the order or
parser's internal docs array.
What version of the product are you using? On what operating system?
Head of polys branch as of this issue entry: r62
Please provide any additional information below.
Example showing problem:
http://www.carolinamantis.com/issue46/index.html
Example showing modification:
http://www.carolinamantis.com/issue46/index.mod.html
Original geoxml3 r62:
http://www.carolinamantis.com/issue46/geoxml3.r62.js
Modded geoxml3:
http://www.carolinamantis.com/issue46/geoxml3.r62.mod.js
Diff file:
http://www.carolinamantis.com/issue46/diff.txt
The geoxml3.js that the files are using have additional log entries in them. I
have attached a diff of my change to this comment where the diff is only my
code change, not the additional logging.
Original issue reported on code.google.com by [email protected]
on 20 Dec 2011 at 2:55
Attachments:
Does it make sense to standardize on the way InfoWindowOptions is managed for a
marker? Currently it varies when an infowindow is passed in the parser options
(and implicitly when only one window is used).
if (parserOptions.infoWindow) {
marker.infoWindow = parserOptions.infoWindow;
} else {
marker.infoWindow = new google.maps.InfoWindow(infoWindowOptions);
}
// Infowindow-opening event handler
google.maps.event.addListener(marker, 'click', function() {
this.infoWindow.close();
marker.infoWindow.setOptions(infoWindowOptions);
this.infoWindow.open(this.map, this);
});
May I suggest instead:
if (parserOptions.infoWindow) {
marker.infoWindow = parserOptions.infoWindow;
} else {
marker.infoWindow = new google.maps.InfoWindow();
}
marker.infoWindowOptions = infoWindowOptions;
// Infowindow-opening event handler
google.maps.event.addListener(marker, 'click', function() {
this.infoWindow.close();
marker.infoWindow.setOptions(this.infoWindowOptions);
this.infoWindow.open(this.map, this);
});
Original issue reported on code.google.com by [email protected]
on 28 Sep 2011 at 2:16
On the project homepage (http://code.google.com/p/geoxml3/) under Basic
Usage, you'll find the code
var myParser = new geoXML3.parser(map);
I spent an hour debugging my code, but it just didn't work. Then I tried
var myParser = new geoXML3.parser({map: map});
and everything worked. Is the simpler syntax supposed to work or is it a typo?
Regards,
Hans
PS! Tested with geoxml3.js from the trunk.
Original issue reported on code.google.com by [email protected]
on 13 Jan 2010 at 12:14
Hello sorry for my bad english, i use geoxml3 version 15 for parser a kml
file and this work perfect, but don't work with this type of kml file
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
<name>Linea 53</name>
<description>...</description>
<Style id="style1">
<LineStyle>
<color>73FF0000</color>
<width>5</width>
</LineStyle>
</Style>
<Placemark>
<name>Linea 53</name>
<description> ... </description>
<styleUrl>#style1</styleUrl>
<LineString>
<tessellate>1</tessellate>
<coordinates>
15.559430,38.187000,0.000000
15.559221,38.186996,0.000000
15.558773,38.187489,0.000000
15.558666,38.187611,0.000000
15.558540,38.187748,0.000000
15.558347,38.187973,0.000000
15.559430,38.187000,0.000000
</coordinates>
</LineString>
</Placemark>
</Document>
</kml>
I don't see the line.Many many thank's
Watcher
Original issue reported on code.google.com by [email protected]
on 26 Jan 2010 at 8:37
Based on what I'm reading in the code, processing of styleUrl tags within the
parser only works for "#id" formatted styles. However, URLs can be in styleUrl
tags, like "styles.kml#id". However, there is no automatic reading of these
styles, or even support for these type of URLs after the KML has been
pre-loaded.
I require this feature, so I'm working on the code for this now.
Original issue reported on code.google.com by [email protected]
on 3 Feb 2012 at 9:39
I have a need for this, so I am planning on a patch to fix this. There looks
to be a good unzipper for JS here:
http://stackoverflow.com/questions/2095697/unzip-files-using-javascript
I'll try this out and hopefully get the feature implemented.
Original issue reported on code.google.com by [email protected]
on 3 Feb 2012 at 4:07
What steps will reproduce the problem?
http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmltest_linktoB.html?filename=
http://www.geocodezip.com/geoxml3_test/Georgia_10m_admin_1_states_provinces_shp_
kml.xml
(note the kml was exported from FusionTables)
What is the expected output? What do you see instead?
Expect to see Polygons showing the states in the country of Georgia, are not
visible until mouse over.
Workaround: Define PolyStyle/LineStyle for all polygons
Fix: use default style, overwrite with defined styles.
Original issue reported on code.google.com by geocodezip
on 12 Mar 2011 at 4:51
I tried parse GML and overly the polygons on Googlemap api v3
This link uses old geoxml from http://code.google.com/p/geoxml/
which parsing static GML and overlay the polygons on googlemap V2 .
http://ukypssgis.ca.uky.edu/landusenrcs_V3/testing/007/gmlusa1_0a.html
Here is another link for dynamic GML parsing from a WFS output. (V2)
http://ukypssgis.ca.uky.edu/landusenrcs_V3/testing/007/gmlusa2_wfs.html
When I use geoxml3 GML parsing is not working Googlemap V3
http://ukypssgis.ca.uky.edu/landusenrcs_V3/testing/007/geoxml3-wfs1.html
what is the correct method to parse GML using geoxml3 on Googlemap API V3?
Original issue reported on code.google.com by [email protected]
on 11 Sep 2011 at 1:26
What steps will reproduce the problem?
1. Loading KML with markers with this method:
var geoXml = new geoXML3.parser({map: map});
geoXml.parse('file.kml');
displays the markers in all standard browsers (FF, Chrome, Opera, ...) but
not in Interent Explorer :-(
See:
http://perassi.org/quickhacks/gmaps3/
http://sterlingudell.com/geoxml3/overlay.html
What is the expected output? What do you see instead?
Displaying Markers - Not displaying Markers
What version of the product are you using? On what operating system?
Last SVN version, Windows XP
Please provide any additional information below.
Thank you, Jan
Original issue reported on code.google.com by [email protected]
on 16 Feb 2010 at 1:31
What steps will reproduce the problem?
1. Create a KML file with the description field of a marker empty
2. Load the file into a map
3. Open the .html file in IE (tested in version 8)
What is the expected output? What do you see instead?
Load the KML all the markers. However, the script breaks with the marker of
empty description.
What version of the product are you using? On what operating system?
Last version of trunk or network_link. Windows XP
Please provide any additional information below.
The error says: 'textContent' is null or is not an object
Line: 440 (trunk)
Line: 624 (network_link)
I think vars should be checked before returned.
Regards.
Original issue reported on code.google.com by [email protected]
on 28 Oct 2010 at 10:43
What steps will reproduce the problem?
1. Create a parser and add placemarks to map
2. afterParse call a function to use the data (as in example)
3. attempt to access doc.placmemarks
What is the expected output? What do you see instead? I would expect to be able
to access placemarks via JSON (tried logging them to the console). placemarks
is undefined, even though they were added to the map
What version of the product are you using? On what operating system?
trunk?
Please provide any additional information below.
not sure if I'm messing something up, perhaps it's my issue here is my code
var duh = true;
var myParser = new geoXML3.parser({
map: map,
processStyles: true,
createMarker: addMyMarker,
createOverlay: addMyOverlay,
afterParse: useTheData
});
myParser.parse(['lugers.kml']);
function addMyMarker(placemark) {
// Marker handling code goes here
if (duh == true) {
myParser.createMarker(placemark);
}
};
function addMyOverlay(groundOverlay) {
// Overlay handling code goes here
if (duh == true) {
myParser.createOverlay(groundOverlay);
}
};
function useTheData(doc) {
console.error("use the data");
console.error(doc);
console.error(doc.placemarks);
// Geodata handling goes here, using JSON properties of the doc object
for (var i = 0; i < doc.placemarks.length; i++) {
console.error("placmark");
console.error(doc.placemarks);
}
};
Original issue reported on code.google.com by [email protected]
on 8 Feb 2011 at 11:24
What steps will reproduce the problem?
1. Link:
http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmltest_linktoB.html?lat=-33.9
19882&lng=151.037571&zoom=14&type=m&filename=http://www.geocodezip.com/geoxml3_t
est/3dgooglemodels_com_au_cbd_lap_a7_kml.xml
What is the expected output? What do you see instead?
Line with 2 arrowheads like this:
http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmltest_linktoB.html?lat=-33.9
19882&lng=151.037571&zoom=14&type=m&filename=http://www.geocodezip.com/geoxml3_t
est/3dgooglemodels_com_au_cbd_lap_a7a_kml.xml
geoxml3 combines multiple linestrings into a polyline by concatenating them
together. Does not work if the end of one is not the beginning of the next.
Workaround: Define the LineStrings so each line is continuous from start to end
(may require adding additional points like the example above, or break them
into separate lines)
Original issue reported on code.google.com by geocodezip
on 7 Mar 2011 at 12:37
What steps will reproduce the problem?
1. I click MARKER to show its infowindow
2. Then I click POLYGON to show its infowindow
3. Then I click any other POLYGON to show its infowindow
What is the expected output? What do you see instead?
When I first select polygon after the marker, the position of the infowindow
DOES NOT CHANGE... It changes after I click any other polygon.
What version of the product are you using? On what operating system?
Rev r53 / Windows 7 / Firefox 4
Please provide any additional information below.
See attached SWF video file
Original issue reported on code.google.com by [email protected]
on 30 Mar 2011 at 2:26
Attachments:
What steps will reproduce the problem?
1. geoXml.parse(a);
2. What should I do?
3. geoXml.parse(b);
What is the expected output? What do you see instead?
The map will have only the KML of 'b'.
How can I make this happen?
Thank you in advance.
Regards,
David
Original issue reported on code.google.com by david.horat
on 29 Sep 2009 at 12:11
there are nested for loop with the same variable i and a missing variable is
used in the code:
for (i = 0; i < doc.markers.length; i++) {
if (doc.markers[i].getPosition().equals(markerOptions.position)) {
found = doc.markers[i].active = true;
break;
}
}
fixed code:
for (j = 0; j < doc.markers.length; j++) {
var position = new google.maps.LatLng(placemark.point.lat, placemark.point.lng);
if (doc.markers[j].getPosition().equals(position)) {
found = doc.markers[j].active = true;
break;
}
}
Original issue reported on code.google.com by [email protected]
on 4 Oct 2010 at 2:47
What steps will reproduce the problem?
1. Try to print Circles on GMaps
What is the expected output? What do you see instead?
Have a circle.
What version of the product are you using? On what operating system?
The polygon branche svn head.
Please provide any additional information below.
I'd made a patch that allows me to draw circles from an KML file using geoxml3
with <Circle> tags. This tag isn't in the Google KML language reference, but
GMaps API have an Circle object, so would you like to have this patch and merge
it to geoxml3 ?
Original issue reported on code.google.com by [email protected]
on 28 Jul 2011 at 3:59
What steps will reproduce the problem?
set the zoom option to false
try to access the global bounds
Workaround:
create the global bounds if it doesn't exist. Example of workaround (see the
showAll function):
http://www.geocodezip.com/geoxml3_test/visualisationmagazine_com_lacreativemap_2
0110313a.html
Original issue reported on code.google.com by geocodezip
on 14 Mar 2011 at 12:31
Can you add a callback that allows for customized processing of the placemark
for a marker? I don't want to replicate everything you do, just add/change a
few items.
perhaps, just before the infoWindow opening event handler, add a callback:
if (!!parserOptions.pmParseMk) parserOptions.pmParseMk(marker, placemark);
// Infowindow-opening event handler
google.maps.event.addListener(marker, 'click', function() {
this.infoWindow.close();
marker.infoWindow.setOptions(infoWindowOptions);
this.infoWindow.open(this.map, this);
});
Original issue reported on code.google.com by [email protected]
on 28 Sep 2011 at 2:28
Hi,
I've been using the current polys branch with great success but I wanted to
have access to each placemark object when by using the createMarker option.
Sadly it seems that this callback is only applied when the geometry of the
placemark is Point.
http://code.google.com/p/geoxml3/source/browse/branches/polys/geoxml3.js?r=44#35
4
Is there a strong rationale behind this or could we have the callback is also
applied whatever the geometry (like on Polygons)?
Thanks
Original issue reported on code.google.com by [email protected]
on 13 Dec 2010 at 12:52
I would imagine that many people could use this project, especially for loading
local KML files(Including us :)) However the GPL license is a little fuzzy when
it comes to reuse in other non open source projects. I'm curious if there is
any hope of this project changing to the Apache v2/LGPL/BSD license? We're
needing to load KML files locally and can either start from scratch or could
potentially contribute to this project and use it.
We _completely_ respect the choice of the GPL license if it was intentional.
Also sorry for the new "Issue", I simply couldn't find another way to contact
the project owners.
Original issue reported on code.google.com by [email protected]
on 12 Oct 2010 at 3:36
I want to download geoxml3.js and ProjectedOverlay.js but there's nothing to
download in the download section
Original issue reported on code.google.com by [email protected]
on 1 Nov 2011 at 12:32
What steps will reproduce the problem?
1. In IE8 run a script, which parses a local xml file
2. The debugger is activated and stops in geoXML3.fetchXML
at statement: xhrFetcher.open('GET', url, true);
with the error message: access denied
3. Running the script in IE on a local web server http://localhost/x.html
then it works.
What is the expected output? What do you see instead?
The script should work correctly, when launched from the local file system
and from web server
What version of the product are you using? On what operating system?
googlemaps Api V3
windows XP
geoxml3.js (downloaded at 2010, May 15th)
additional information below:
In Firefox it works as expected.
Original issue reported on code.google.com by [email protected]
on 18 May 2010 at 7:44
What steps will reproduce the problem?
1. parse an XML file with an empty <tag></tag> as:
<Placemark>
<name><![CDATA[BI COSSATO SS242 - LOC. CASTELLENGO]]>
</name>
<description><![CDATA[]]>
</description>
<styleUrl>#pin_green</styleUrl>
<Point>
<coordinates>8.18619,45.53519,0</coordinates>
</Point>
</Placemark>
where <description> is empty
2. Run the script in IE8;
the debugger stops in:
geoXML3.nodeValue = function(node)
at statement: return (node.innerText || node.text ||
node.textContent).trim();
error message=textContent is null or not an object
3. The script works ok in FireFox
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
WndowsXP
googlemaps V3
geoXML3.js downloaded at 2010, May 17th
additional information:
replacing: node.textContent.trim() by: node.textContent
the script works ok in IE8.
Original issue reported on code.google.com by [email protected]
on 18 May 2010 at 7:22
What steps will reproduce the problem?
1. Create simple map page and parse KML file with only placemarks (not polygons
or polylines)
2. Invoke parser.showDocument() or parser.hideDocument()
What is the expected output? What do you see instead?
Expectation is that invocation of showDocument or hideDocument when specifying
document would invoke marker setVisible method. Because there is no longer a
markers array at top level of document object, layers with only simple markers
do not show or hide
What version of the product are you using? On what operating system?
head of polys branch (rev r62)
Please provide any additional information below.
I believe this change will work:
if (!!doc.placemarks) {
for (i = 0; i < doc.placemarks.length; i++) {
if (!!doc.placemarks[i].marker) doc.placemarks[i].marker.setVisible(true);
}
}
Original issue reported on code.google.com by [email protected]
on 19 Dec 2011 at 9:52
What steps will reproduce the problem?
1. load kml, but popup of infowindow is suppressed on clicking of polyline
What is the expected output? What do you see instead?
no reaction
What version of the product are you using? On what operating system?
geoxml3, latest version?
Please provide any additional information below.
I managed two ways to suppress info windows, but they might not be the
preferred options:
1) afterParse event
function myMap_afterParse(doc) {
//alert('finished');
var geoXmlDoc = doc[0];
for (var i = 0; i < geoXmlDoc.gpolygons.length; i++) {
// remove info window
geoXmlDoc.gpolygons[i].infoWindow = null;
}
}
and more elegant
2) setting parserOption
infoWindowOptions : {content : null}
Original issue reported on code.google.com by [email protected]
on 16 Jun 2011 at 3:12
What steps will reproduce the problem?
1. Create a KML file with markers' icons from
http://code.google.com/p/google-maps-icons/ (or other not 32x32px)
2. Load it into a map
What is the expected output? What do you see instead?
The markers' icons are cut to 32x32px. The marker icon should be displayed
fullsize.
What version of the product are you using? On what operating system?
branch "network_link" && trunk version / Windows XP
Please provide any additional information below.
I think the solution would be to change the code in `if
(!!doc.styles[styleID].href)` of the processStyles function, from:
{{{
// Init the style object with a standard KML icon
doc.styles[styleID].icon = new google.maps.MarkerImage(
doc.styles[styleID].href,
new google.maps.Size(32, 32),
new google.maps.Point(0, 0),
new google.maps.Point(16, 12)
);
}}}
To:
{{{
var icon = new Image();
icon.src = doc.styles[styleID].href;
// Init the style object with a standard KML icon
doc.styles[styleID].icon = new google.maps.MarkerImage(
doc.styles[styleID].href,
new google.maps.Size(icon.width, icon.height),
new google.maps.Point(0, 0),
new google.maps.Point(16, 12)
);
}}}
This way, the marker is created with the correct size.
What do you think?
Regards.
Original issue reported on code.google.com by [email protected]
on 28 Oct 2010 at 10:15
Attachments:
Please star this issue if you would find a "parsed" event as described in the
EGeoXml documentation useful. It doesn't exist at present, trying to gauge
interest/usefulness.
http://econym.org.uk/gmap/egeoxml.htm
"parsed" Event
EGeoXml throws a "parsed" event when the parsing is complete.
The EgeoXml.parse() operation is asynchronous because it uses GDownloadUrl(),
so if you have code that should only operate after the markers etc. have all
been created, then you'll need to listen for that event.
Original issue reported on code.google.com by geocodezip
on 13 Oct 2011 at 2:25
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
I want to parse a kmldocument by using the parse method;
What i want is not let the parser showing any info on the map;
i want use the AfterParse callback so that i can create my Markers by myself;
i thought it was enough to set "map:null" while instantiating the object
geoXML3.parser but it seems mandatory hence i am not able to suppress the
markers generated autmatically by the parse method
Basically i am following the example "Use Case 3: Standalone KML Parser" but it
does not work; am i missin something
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 4 Feb 2012 at 8:56
On the production (Google App Engine) server, when fetiching a kml file,
xhrFetcher.responseXML was null (on a perfectly fine XML response).
I've looked at the response and the MIME type was set to octect-stream.
So I forced it to 'text/xml' and the problem went away:
xhrFetcher.overrideMimeType('text/xml');
xhrFetcher.open('GET', url, true);
...
Original issue reported on code.google.com by [email protected]
on 17 May 2011 at 5:00
I'm using geoxml3 and would like to reduce/optimize memory utilization,
especially on mobile devices. I'm particularly interested in the memory
footprint after reading the KML file, and having created the map with all the
markers.
According to Firebug, these objects still exist after the map is generated (and
some time allowed for gc). Is it possible that you still have references to
these objects after building the map (i.e. after geoxml3.parse())? I am
maintaining a reference to the geoxml object, as I want access to the markers.
fetchers[]
styles[]
nodes[]
placemarks[]
groundoverlays[]
ggroundoverlays[]
gpolygons[]
gpolylines[]
Possibly, the second set are items that a API consumer may want to use. But
the first set are internal items, without API references.
Several questions:
1) Is it possible for you to clean up any (large) internal structures after
parse()?
2) Can you add a parse option to clean up other structures?
3) Or should just go with a marker manager and de-reference my geoxml3 object?
Original issue reported on code.google.com by [email protected]
on 11 Oct 2011 at 2:45
What steps will reproduce the problem?
1. Create a kml file with icons and an IconStyle element that specifies a scale
factor other than 1, e.g. 2.
2. Load it into a map.
What is the expected output? What do you see instead?
I expect to see icons twice the normal size. Instead I see icons the original
size.
What version of the product are you using? On what operating system?
URL: http://geoxml3.googlecode.com/svn/branches/polys
Revision: 62
Linux, Chrome
Please provide any additional information below.
Issue http://code.google.com/p/geoxml3/issues/detail?id=14 may be related.
We made the changes below to make it work for us. The scale factor is a child
of IconStyle, not Icon. The scale should be set to 1 if the scale is NaN, not
if the scale is *not* NaN. There is a syntactical issue with comma's instead of
semicolons. The last change is probably controversial, it hard-codes the size
to 32 times the scale factor.
Attached the complete source file with our changes.
172c172,177
< var styleNodes = thisNode.getElementsByTagName('Icon');
---
> var styleNodes = thisNode.getElementsByTagName('IconStyle');
> if (!!styleNodes && !!styleNodes.length && (styleNodes.length > 0)) {
> styles[styleID].scale =
nodeValue(styleNodes[0].getElementsByTagName('scale')[0]);
> if (isNaN(styles[styleID].scale)) styles[styleID].scale = 1.0;
> }
> styleNodes = thisNode.getElementsByTagName('Icon');
175,176d179
< styles[styleID].scale =
nodeValue(styleNodes[0].getElementsByTagName('scale')[0])
< if (!isNaN(styles[styleID].scale)) styles[styleID].scale = 1.0;
180,181c183,184
< styles[styleID].color =
nodeValue(styleNodes[0].getElementsByTagName('color')[0]),
< styles[styleID].width =
nodeValue(styleNodes[0].getElementsByTagName('width')[0])
---
> styles[styleID].color =
nodeValue(styleNodes[0].getElementsByTagName('color')[0]);
> styles[styleID].width =
nodeValue(styleNodes[0].getElementsByTagName('width')[0]);
707c710
< new google.maps.Size(32,32)
---
> new google.maps.Size(32*style.scale, 32*style.scale)
Original issue reported on code.google.com by [email protected]
on 13 Dec 2011 at 11:19
Attachments:
What steps will reproduce the problem?
1. Parse two kml files.
2. Make a change to both kml files and parse them again.
What is the expected output? What do you see instead?
I expect to see the two modified kml files.
Instead I see the modified first kml file, the previously parsed second kml
file, and the modified second kml file. The second kml file was not marked for
reloading, the first one was. See line 88 of the geoxml3.js script, which reads
"thisDoc.reload = true;"
What version of the product are you using? On what operating system?
http://geoxml3.googlecode.com/svn/branches/polys/geoxml3.js
r60 | [email protected] | 2011-10-02 04:06:03 +0200 (Sun, 02 Oct 2011)
Linux, Google Chrome
Please provide any additional information below.
Changed the code. Attached my modified version.
Index: geoxml3-polys-read-only/geoxml3.js
===================================================================
88c88
< docs.splice(j, 1);
---
> //docs.splice(j, 1);
94a95
> internals.docSet.push(thisDoc);
98d98
< internals.docSet.push(thisDoc);
Original issue reported on code.google.com by [email protected]
on 10 Nov 2011 at 1:37
Attachments:
What steps will reproduce the problem?
1. load
http://www.geocodezip.com/geoxml3_test/v3_geoxml3_IsraelMaps_linkto.html
2.
3.
What is the expected output? What do you see instead?
should display output from parsing all three kml files, instead only shows
output from one.
Original issue reported on code.google.com by geocodezip
on 1 Jan 2011 at 6:20
What steps will reproduce the problem?
1. Parse a document with some markers but no ground overlays
2.
// remove all map overlays
$.each(myKmlParser.docs, function(index, doc) {
myKmlParser.hideDocument(doc);
});
What is the expected output? What do you see instead?
I get an error because doc.overlays is not defined
See attached patch to fix the issue.
thx Johannes
Original issue reported on code.google.com by [email protected]
on 3 Apr 2010 at 9:19
<colorMode>random</colorMode>
only works when no color is specified:
http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmltest_linktoB.html?filename=
http://www.geocodezip.com/geoxml3_test/kml_random_color_kml_nocolor.xml
test cases:
http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmltest_linktoB.html?filename=
http://www.geocodezip.com/geoxml3_test/kml_random_color_kml_white.xml
http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmltest_linktoB.html?filename=
http://www.geocodezip.com/geoxml3_test/kml_random_color_kml_reverseInner.xml
Should work as defined in the kml reference:
<colorMode>
Values for <colorMode> are normal (no effect) and random. A value of random
applies a random linear scale to the base <color> as follows.
To achieve a truly random selection of colors, specify a base <color> of white
(ffffffff).
If you specify a single color component (for example, a value of ff0000ff for
red), random color values for that one component (red) will be selected. In
this case, the values would range from 00 (black) to ff (full red).
If you specify values for two or for all three color components, a random
linear scale is applied to each color component, with results ranging from
black to the maximum values specified for each component.
The opacity of a color comes from the alpha component of <color> and is never
randomized.
Original issue reported on code.google.com by geocodezip
on 19 Jan 2012 at 4:16
What steps will reproduce the problem?
1. load kml that has polyshape as done in attachment : example.zip
2. nothing happens on map. empty map
What is the expected output? Polygons, just like when using GGeoXml in API
v2
What do you see instead? map has no kml data, no error messages either
What version of the product are you using? geoXML3.js On what operating
system? firefox 3.5 or internet exploder 6
Please provide any additional information below.
Doing some tests of the Google API version 3 and tried out geoXML3 as a
solution to missing KML support in API version 3
Original issue reported on code.google.com by [email protected]
on 7 Oct 2009 at 3:13
Attachments:
I'd like to ask how to change info window styles?
geoXml = new geoXML3.parser({
map: map,
singleInfoWindow: true,
zoom: true,
afterParse: useTheData
});
geoXml.parse('...');
Original issue reported on code.google.com by [email protected]
on 20 Oct 2011 at 3:10
the raw source code is:
if (typeof urls === 'string') { // Single KML document
docs.push({url: urls remaining: 1}); } //here is an error
Original issue reported on code.google.com by [email protected]
on 14 Sep 2011 at 5:19
I've defined style and icons in a file and I'd like to reference to it using
relative paths in href.
Geoxml3 currently cannot resolve or use styles defined in documents other than
the ones that are passed as an argument for geoXML3.parse().
Even if two documents are passed as an array, I don't think they can share
styles either.
It would be nice to be able to pass a document containing styles, either as an
option or as an argument.
I've made some simple changes to pass it as argument. I'll append my diffs as
an attachment.
There's also the problem of resolving relative paths.
When a kml file is processed by Google Earth, the relative path starts from the
folder where the kml file lives.
When an element references an external path, that has to be resolved depending
on where the current kml file and the external one are.
I'm currently fixing the paths externally before passing the document
containing styles:
// assume a file "/kml/style.kml" containing styles
// has been parsed and is available as docs[0]
// Now we want to parse the file "/rest/GpsPosition.kml"
// that refers to style.kml using relative paths
// fix path in styles relative to kml
for (var styleID in docs[0].styles ) {
var newStyleId = root + docs[0].url + styleID;
styles[newStyleId] = docs[0].styles[styleID];
styles[newStyleId].href = root + "/kml/" + styles[newStyleId].href;
}
// Add a kml layer
parser.parse(['/rest/GpsPosition.kml'], styles );
};
Original issue reported on code.google.com by [email protected]
on 13 May 2011 at 2:37
Attachments:
Due to Issue 10 XMLHttpRequest of IE denies access to local files; browsers
as Firefox, Chrome, Opera accept local files.
To make access to local files possible, i have changed geoXML3.fetchXML:
If the protocoll of the main page is file:// and ActiveXObject exists: use
of window.ActiveXObject("MSXML2.XMLHTTP.3.0")
otherwise: window.XMLHttpRequest
With this modification I found the following failures:
- xmlFetcher.timeout does not exist
reason: an ActiveXObject object can not be augmented by the property timeout
- for local files ActiveXObject sets xhrFetcher.responseXML.documentElement
to null and the DOM is not loaded.
The xml file is stored in responseText.
So I load the DOM by
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoc.loadXML(xhrFetcher.responseText);
callback(xmlDoc);
That works.
Original issue reported on code.google.com by [email protected]
on 28 May 2010 at 2:11
What steps will reproduce the problem?
1. Link Checkboxlist to different KML files with 2 different center points.
2. Select and unselect random checkboxes to load/unload the KML files
3.
What is the expected output? What do you see instead?
Expected: KML layers needs to keep on showing
Instead, the map still renders but the KML overlays is not vissible anymore
What version of the product are you using? On what operating system?
<script type="text/javascript"
src="http://geoxml3.googlecode.com/svn/branches/polys/geoxml3.js"></script>
<script type="text/javascript"
src="http://geoxml3.googlecode.com/svn/trunk/ProjectedOverlay.js"></script>
Please provide any additional information below.
My code for this:
$('#rep1_cblist').change(function(event) {
getMyVal(event);
if (valtouse > 0 && valtouse != null && valtoremove == null) {
getKMLCB(valtouse);
if ((valtouse == "3" || valtouse == "4" || valtouse == "5") && (!geoXml.docs[0])) {
myLatLng = new google.maps.LatLng(-25.8500, 25.6333);
var myOptions = {
zoom: 11,
center: new google.maps.LatLng(-25.8500, 25.6333),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
}
else if (valtouse == "1" || valtouse == "2" && (!geoXml.docs[0])) {
myLatLng = new google.maps.LatLng(-25.860792, 28.14338);
var myOptions = {
zoom: 11,
center: new google.maps.LatLng(-25.860792, 28.14338),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
sball = true;
}
if (geoXml.docs[0]) {
var cc = map.getCenter();
if (valtouse == "1" || valtouse == "2") {
myLatLng = new google.maps.LatLng(-25.860792, 28.14338);
var tmplat = cc.Na;
var tmplng = cc.Oa;
var curlat = myLatLng.Na;
var curlng = myLatLng.Oa;
if ((tmplat != curlat) && (tmplng != curlng)) {
map.setCenter(myLatLng)
}
}
if (valtouse == "3" || valtouse == "4" || valtouse == "5") {
myLatLng = new google.maps.LatLng(-25.8500, 25.6333);
var tmplat = cc.Na;
var tmplng = cc.Oa;
var curlat = myLatLng.Na;
var curlng = myLatLng.Oa;
if ((tmplat != curlat) && (tmplng != curlng)) {
map.setCenter(myLatLng)
}
}
filename = ('/KML/' + tmpkml);
var shown = false;
for (z = 0; z < geoXml.docs.length; z++) {
if (geoXml.docs[z].baseUrl == ('/KML/' + tmpkml)) {
geoXml.showDocument(geoXml.docs[z]);
shown = true;
break;
}
}
if (!shown) {
geoXml.parse(filename);
geoXml.showDocument();
}
}
else {
geoXml = new geoXML3.parser({
map: map,
infoWindow: infowindow,
singleInfoWindow: false,
zoom: false,
afterParse: useTheData
});
newKML = tmpkml;
filename = newKML;
geoXml.parse('/KML/' + newKML);
}
}
else {
getKMLCB(valtoremove);
var removeindex = 0;
var removed = false;
for (y = 0; y < geoXml.docs.length; y++) {
if (geoXml.docs[y].baseUrl == ('/KML/' + tmpkml)) {
geoXml.hideDocument(geoXml.docs[y]);
valtoremove = null;
removed = true;
break;
}
}
if (!removed) {
geoXml.hideDocument();
}
}
});
Original issue reported on code.google.com by [email protected]
on 4 Aug 2011 at 6:56
What steps will reproduce the problem?
1. Go to http://www.geocodezip.com/geoxml3_test/v3_geoxml3_KML_samples_test.html
2. Click on the "Mt.Etna" button
3. Click on the "hide" button
What is the expected output? What do you see instead?
ground overlay should be hidden. Currently doesn't have any effect
Original issue reported on code.google.com by geocodezip
on 31 Oct 2010 at 5:19
What steps will reproduce the problem?
1. User checks a checkbox used to show/hide a .kml file
2. The map seems not to respond to checkbox but is in fact loading the file.
After a while the expected overlay finally shows on the map.
What is the expected output? What do you see instead?
Possibility of showing a "loading" message, both when first parsing a file
(geoXml.parse) but also when, after hiding it, the user wants to see it again
(geoXml.showDocument). I know how to do it, I'm just not sure where in
geoxml3.js should I place the code for showing and hiding the loading message.
What version of the product are you using? On what operating system?
polys branch
Original issue reported on code.google.com by [email protected]
on 18 Sep 2011 at 7:08
What steps will reproduce the problem?
1.
Load multiple KML files (in my case 4 files of ~1.2 MB) using parse(urls:Array)
in Browser IE >= 7 or Firefox (No issue in Google Chrome)
2.
Problem: sometime you get an alert: log:Unable to retrieve file....
I tested this situation with both local links and network links to files. No
difference.
3.
Looks like XHR is breaking down or timeout, while reading/waiting for
ResponseXML. As I said, this happens only in IE and FF.
What is the expected output? What do you see instead?
No alert of file not found should be there.
What version of the product are you using? On what operating system?
Google Maps API v3, in IE 7 or 8, FF 3.6
Please provide any additional information below.
Also performance with multiple KML is not good in IE > 7.
Original issue reported on code.google.com by [email protected]
on 11 Feb 2011 at 3:41
What steps will reproduce the problem?
1. Use a logging proxy between your browser and the net
2. Put this URL inside the
myParser.parse('http://your.server/file.kml?data=[]&request=[]&binding=[]') if
geoxml3
3. The logging proxy does receive this URL
http://your.server/file.kml?data=[]&request=[]&binding=[]
What is the expected output? What do you see instead?
I would have expected the proxy to retrieve this URL:
http://your.server/file.kml?data=[]&request=[]&binding=[]
instead of this:
http://your.server/file.kml?data=[]&request=[]&binding=[]
What version of the product are you using? On what operating system?
The latest version on Linux.
Please provide any additional information below.
I need the & not to be escaped as & so the proxy retrieves the original URL
as typed in the HTML. How can I do that?
Original issue reported on code.google.com by [email protected]
on 11 Jun 2011 at 11:11
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.