<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px"
bgColor=#ffffff leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT face=Arial size=2>Dear Eric,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am into great fuss over here</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>The pop up id does not work coz popup is made afterwards<BR><BR>I may need
to use marker name or something<BR><BR>The clear situation is something as
this:- <BR><BR>I am making a feature in which a user can mark a point on map,add
photos<BR> <BR>the user marks the point, enters name , uploads
images<BR> <BR>then on mouse over the marker the images are fetched using
name entered above from folder of that name<BR> <BR>then user marks second
popup,enters name,uploads images<BR> <BR>now when user takes cursor on this
pop up new images are fetched using new name entered<BR> <BR>Now the
problem<BR> <BR>When user takes cursor to first popup , it shows images of
second pop up coz name value is changed <BR>and its using changed name value to
fetch images.<BR> <BR>I tried to use markers layer id instead of name but
it also changes every time....<BR><BR>if I try to set this.markers.name above
<BR><BR> markers.events.register('mouseover', markers, function(evt)
{ <BR><BR><BR>Nd then try to use this.markers.name after this code to
fetch images it says<BR>this.markers.name is
undefined....<BR><BR><BR><BR> map.events.register("click", map, function(e)
{
<BR>
var lonlat =
map.getLonLatFromViewPortPx(e.xy);<BR>
var maplat =
lonlat.lat;<BR>
var maplon=lonlat.lon
;<BR><BR>
//document.getElementById("lati").value=maplat;<BR>
//document.getElementById("long").value=maplon;<BR>
var markers = new OpenLayers.Layer.Markers( "Markers"
);<BR>
map.addLayer(markers);<BR>
var size = new
OpenLayers.Size(33,28);<BR>
var offset = new OpenLayers.Pixel(-(size.w),
-size.h);<BR><BR>
var icon = new
OpenLayers.Icon('http://localhost/maplab/interactive-maps/img/poi.gif',size,offset);<BR>var
marker =new OpenLayers.Marker(new
OpenLayers.LonLat(maplon,maplat),icon)<BR>
markers.addMarker(marker);<BR><BR> var
name=prompt("Name","")<BR>marker.id=name;<BR> alert(marker.id);<BR>var p
=prompt ("Desc","")<BR>var answer = confirm("Do u want to upload any
images?")<BR>if (answer){<BR>var pwin =
window.open("test.php?name="+name,"test","width=300,height=180,status=no,resizable=no");<BR>}<BR>var
bbc="";<BR><BR>imagestr="<img width=100px height=100px
src='images/"+name+"/";<BR> markers.events.register('mouseover', markers,
function(evt) { <BR> var pin=new
OpenLayers.Control.MousePosition({prefix: 'Lon: ', separator: '
Lat:'})<BR> alert(pin);<BR> returnimages(marker.id); //<FONT
color=#0000ff>This function fetches images with name sent of folder but id of
marker changes each time name changes
above)<BR></FONT> <BR><BR> var check =
document.getElementById('check_bol').value;<BR>
alert(check);<BR><BR>if(check){<BR>var string_result =
document.getElementById('string');//(final images string fetched)<BR>
bbc=string_result.value;<BR>alert(bbc);<BR> feature = new
OpenLayers.Feature(layer,new OpenLayers.LonLat(maplon,maplat));<BR>var coord =
new OpenLayers.LonLat(maplon,maplat);<BR> var si = new
OpenLayers.Size(240,410);<BR>imagestr_final=bbc;<BR>var link ="<a
href='javascript:onPopupClose(name);' >Refresh Images</a>";<BR>var temp
="<br><b><u>"+name+"</u></b><BR><BR><b>Description:-</b><FONT
type=verdana
size=3>"+p+"</font><br><br>"+imagestr_final+"<br>"+link+"<br><br><br><br>";<BR>
// popup = new OpenLayers.Popup("pof",coord,si,temp,true
,{autoSize:true},{panMapIfOutOfView:true});<BR> popup = new
OpenLayers.Popup.FramedCloud(name,coord,si,temp,null,
true);<BR>popup.setContentHTML(temp);<BR>
map.addPopup(popup);
<BR>document.getElementById('check_bol').value="false";<BR>}<BR>
<BR>});<BR>/*markers.events.register('mouseout', markers, function(evt)
{markers.map.removePopup(popup);<BR>
popup.destroy();<BR>
popup = null;
<BR>
<BR>}); */<BR><BR><BR> }); </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Pls suggest something....</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards</FONT></DIV>
<DIV><FONT face=Arial size=2>Kusum</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><BR>--------------------------------------------------<BR>From: "Eric
Lemoine" <eric.c2c@gmail.com><BR>Sent: Saturday, May 17, 2008 3:33
AM<BR>To: "Kusum" <kusum@infobase.in><BR>Cc: "Christopher Schmidt"
<crschmidt@metacarta.com>; "Openlayers Users"
<users@openlayers.org><BR>Subject: Re: [OpenLayers-Users] popup hidden
when goes on sides of viewport<BR><BR>> On Thu, May 15, 2008 at 2:21 PM,
Kusum <kusum@infobase.in> wrote:<BR>>> Dear
all<BR>>><BR>>> I am caught in a very difficult situation. In my
application the user marks<BR>>> a point on map and enters description to
the point.<BR>>> Aslo uploads photos.<BR>>> a folder is made into
which the uploaded photos go and then I fetch the<BR>>> string for all
photos in folder.<BR>>> And then the description and photos are seen in
popup.<BR>>> But if the user marks a second point and uploads other photos
in other<BR>>> folder and then sees the popup.<BR>>> In second popup
new photos are seen but then photos of first popup also<BR>>> change as
now they start using the new fetched image string for new
popup.<BR>>><BR>>> Isn't there an id corresponding each FramedCloud
popup that I can assign and<BR>>> later use to fetch photos corresponding
to it.<BR>> <BR>> If you pass null as the first arg to the popup
constructor, OL will<BR>> create a popup id for you which you can refer to
using popup.id. Would<BR>> that help?<BR>> <BR>> --<BR>>
Eric</DIV></BODY></HTML>