[mapserver-users] problem in reference map

Venkat Rao Tammineni vtammineni at roulacglobal.com
Sun May 10 22:24:54 PDT 2009


Hi,

This one u should place in mapfile

  ###################### Refrence Map #####################

 REFERENCE
	STATUS on
	IMAGE "..\images\india-map_small.png"
	SIZE 120 80
	EXTENT 64.881 5.469 97.898 37.762
	STATUS OFF
	COLOR -1 -1 -1
	OUTLINECOLOR 255 0 0
	
  # MAXBOXSIZE 125
END

########### INCLUDE MAP FILE AREA################


This is my C# code for generating Refrence map.same time you need to have
one temp folder with will store the temp images

        public void LoadLegend(System.Web.UI.WebControls.ImageButton imgleg)
        {
            try
            {
                string imageLoc;
                string imageURL;
                imageObj imgRef;
		    imgRef = MapFunction.Map.drawReferenceMap();
                imageLoc = MapFunction.OutputDir + "/" +
System.DateTime.Now.ToBinary() + "." + imgRef.format.extension;  // here  u
need to store images in temp forlder
                imageURL =
imageLoc.Substring(imageLoc.IndexOf(MapFunction.OutputDirURL)); // here u
need to give the image url
                imgRef.save(imageLoc, null);
                imgleg.Width = imgRef.width;
                imgleg.Height = imgRef.height;
                imgleg.ImageUrl = "../" + imageURL;
                MapFunction.IsMapInDirectory = false;

            }
            catch (Exception exp) { }
        }



This is working for me in C#.I think it will give some idea.


Thanks,

Venkat Rao Tammineni
Hyderbad
India


-----Original Message-----
From: Ahmet Temiz [mailto:temiz at deprem.gov.tr] 
Sent: Friday, May 08, 2009 10:55 PM
To: Venkat Rao Tammineni; 'Steve Lime'; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] problem in reference map

Thank you

I am using java. However, I try to adapt C# to java


On Fri, 8 May 2009 12:46:09 +0530, Venkat Rao Tammineni wrote
> HI,
> 
>   Which language you are using ...if it is C# , then I can help you.
> 
> Thanks
> Venkat
> 
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org
> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Ahmet Temiz
> Sent: Friday, May 08, 2009 12:39 PM
> To: Steve Lime; mapserver-users at lists.osgeo.org
> Subject: Re: [mapserver-users] problem in reference map
> 
> On Thu, 07 May 2009 12:26:47 -0500, Steve Lime wrote
> 
> thank you
> 
> reference map extent is same as main map extent.
> I checked size of reference map.
> 
> But the problem still exists.
> 
> > Most likely your reference map size or extent are incorrect. That's 
> > where I'd start.
> > 
> > Steve
> > 
> > >>> On 5/7/2009 at 6:54 AM, in message
> <20090507115038.M79754 at deprem.gov.tr>,
> > "Ahmet Temiz" <temiz at deprem.gov.tr> wrote:
> > > hello
> > > 
> > > the red box in my reference map isn't settled on my zoomed main map.
> > > 
> > > what am I likely to miss ?
> > > 
> > > regards
> > > 
> > > Ahmet Temiz
> > > 
> > > --
> > > Open WebMail Project (http://openwebmail.org)
> > >
> > 
> > -- 
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> 
> --
> Open WebMail Project (http://openwebmail.org)
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.


--
Open WebMail Project (http://openwebmail.org)


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the MapServer-users mailing list