Whats The Best Pratice To Show Multiple Placemarks With Photos Inside Of The Ballons?
Solution 1:
In your code if you look at the signature of the method geraFotosObra
you can see it takes a single int
parameter idObra
.
public String geraFotosObra(int idObra)throws Exception { ...
Yet when you call the method in your jsp you are passing an an object literal containing a callback function.
PainelEarthAjax.geraFotosObra({
callback : function(kmlString) { ...
As it is I don't see how the kml is generated, unless perhaps geraFotosObra
is an overloaded method? Also even if it was generated, as is, I don't see how the callback function that you pass in place of an id is ever called - why for example would kmlString
be the result of the call to geraFotosObra
?
// How is this called, what sets kmlString!?
callback : function(kmlString) {
var kmlObject = ge.parseKml(kmlString);
ge.getFeatures().appendChild(kmlObject);
}
All in all the code you posted is a wee bit confusing, so sorry if I have missed something...I think you have possibly copy and pasted some code from a fetchKml example and the asynchronous callbacks used with that method have confused you slightly.
Anyhow, based on what you have posted, you should be passing an int
id
to the geraFotosObra
method, getting the string result and then parsing it in the plug-in.
Something like the following makes sense. Replace the showPics
function with the following.
functionshowPics(ge) {
var kmlString = PainelEarthAjax.geraFotosObra(1); // or something?var kmlObject = ge.parseKml(kmlString);
ge.getFeatures().appendChild(kmlObject);
}
Post a Comment for "Whats The Best Pratice To Show Multiple Placemarks With Photos Inside Of The Ballons?"