[ka-Map-users] XMLoverlay label

chunrima chunrima at hotmail.com
Mon Aug 18 13:59:14 EDT 2008


Hi Maxime, 

I tried to replace 'Info' by xml_overlay in kaXmlOverlay.js.
It seems to work, but the caption show [object Object]. 

I also tried to replace 'info' by xml_overlay.kaMap.geoToPix( this.cxmax,
this.cymin ) in kaXmlOverlay.js for test purposes.
The caption, however, show NaN, NaN. 

My point is that we can resolve this issue if we identify what javascript
objective points to the label attribute in the XML file. 

A better idea? 

Thanks, 

Jae



Maxime Phaneuf wrote:
> 
> Hello again guys.
> 
> Thank you PG I solved my problem. I did not declare my function at the
> right
> time.
> 
> But unfortunetaly, I've got another problem. I implemented a onmouseover()
> that
> makes a pop-up appear with the ID of the XMLpoint under the cursor.
> 
> I just added this:
> this.div.onmouseover=function(){ overlib(pid, STICKY,
>     CAPTION, 'Info')};
>     this.div.onmouseout=function(){ nd() };
> in the KaXMLPoint function in KaXmlOverlay. I also added the overlib
> library.
> 
> My problem is that I want to call the label of the XMlPoints. As you can
> see,
> right now I'm only calling the ID (pid). Is it possible to call the label
> of a
> XMLPoint? If so, how can I do it?
> 
> Thank you
> Maxime Phaneuf
> 
> 
> For the problem with IE may be you could find usefull the hint in the Wiki
> Page
> 
>    http://ka-map.ominiverdi.org/wiki/index.php/Overlay_API_Reference#FAQs
> 
> For the linestring, a possible issue is to call too early the kaXmlOverlay
> APIs: you should wait the map is fully initialized.
> See:
> http://ka-map.ominiverdi.org/wiki/index.php/Overlay_API_Reference#kaXmlOverlay_Quick_HOW-TO
> 
> 
> 2008/5/30 Maxime Phaneuf <Maxime.Phaneuf at usherbrooke.ca>:
> 
>> Hello guys.
>>
>> I'm working on a project to map Mars. I'm using ka-map to do it. All went
>> well
>> up to now, but I have a problem I can't seem to solve.
>>
>> I was testing the XMLOverlay. This XML file is working well, what is
>> supposed to
>> appear is appearing:
>>
>> <overlay>
>>  <point x="-124.5" y="68.5" id="p1">
>>   <label>Phoenix</label>
>>   <symbol shape="bullet" size="30" opacity="1" color="#FF0000" />
>>  </point>
>> </overlay>
>>
>> The next step for me was to make some linestrings appear. The problem is
>> that
>> they appear when I first go to the website, but when I refresh that page,
>> they
>> disappear. Here is the XML file:
>>
>> <overlay>
>>         <point x="-129" y="60" id="l3">
>>            <label>TEST</label>
>>              <linestring  stroke="3" opacity="0.8" color="#FF0000">
>>                 -129 60, -115 60
>>              </linestring>
>>        </point>
>> </overlay>
>>
>> At first, everything appears. But, when I reload the page, only the label
>> appears.
>>
>> I always get this message error when the linestring doesn't appear:
>> map has no properties
>> kaXmlOverlay.js
>> Line 930
>> var scales = map.getScales();
>>
>> I try to solved that problem but I cannot see what's the problem.
>>
>> Also, i'm using firefox to do my testing, but where I'm working it's
>> mostly
>> IE.
>> But the XMLoverlay doesn't appear in IE. Can you also help me with this
>> problem?
>>
>> Thank you very much
>>
>> Maxime Phaneuf
>>
>> COOP Student
>> Canadian Space Agency
> 
> 
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
> 
> 

-- 
View this message in context: http://www.nabble.com/XMLoverlay-label-tp17627545p19035638.html
Sent from the ka-map-users mailing list archive at Nabble.com.



More information about the ka-Map-users mailing list