Does anyone know the URL to the red coloured Numbered pushpins that local.live uses to display a pushpin
I need numbers 1 – 25 if anyone can help me
Does anyone know the URL to the red coloured Numbered pushpins that local.live uses to display a pushpin
I need numbers 1 – 25 if anyone can help me
Pushpins with numbers on them.
Bloom326984
This is a GDI+ thing - There are workarounds posted all over the net, but you could either use a JPG as the base image, or use something like the following to create a new instance of your image that is not indexed:
try{
canvas =
Graphics.FromImage(renderImage);}
// GDI pukes when you try to get a graphics object from an index image // so here's the hack! catch{
Bitmap tmpBmp = new Bitmap(renderImage.Width, renderImage.Height);canvas =
Graphics.FromImage(tmpBmp);canvas.DrawImage(renderImage,
new Rectangle(0, 0, tmpBmp.Width, tmpBmp.Height), 0, 0, tmpBmp.Width, tmpBmp.Height, System.Drawing.GraphicsUnit.Pixel);}
LeoXue
thats not true, i got all of them in my cache, but i dont use it, because they look ugly.
clear your cache, calc a new route with many points and look again in your cache, you'll find them there.
mkfl
Thanks Dave,
I belive now that these are dynamically created (I could only find the master blank one in my IE Cache)....
I could well do with some sample code to steer me in the right direction in order to create this numbered pushpins...
Thanks in advance...
Pwint
Yup, pretty much the way I would have gone - Pass in a QueryString param for the "Number" you want to display and throw that into the DrawString and you're off
Avada Kedavra
I keep getting errors when I try to run the code, says can't index pixelated image Then the image becomes locked and I can't rename/delete Is there something wrong with my code or certain types of gif's
Thanks,
Jason
CJW99
It's highly possible they are dynamically generated, certainly wouldn't seem to make sense to do otherwise. All you need is a base image, then use GDI+ to overaly the numbers, based on a param to the image .... Assuming you are using .Net
If you need help with this I could whip something up pretty quickly to do this.
Chrismanster
agreed.
Ok, to crerate a dynamic image, create a new aspx named 'Image.aspx'
then insert following code into the Page_Load Method:
Bitmap bmp;
Font font;
bmp = (Bitmap)System.Drawing.Image.FromFile(Path.Combine(Server.MapPath("images"),"circle.gif"));
gfx = Graphics.FromImage(bmp);
font = new Font("Arial",7);
gfx.DrawString("1",fnt2,Brushes.Black,0,0);
gfx.Dispose();
Response.ContentType="image/jpeg";
bmp.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
i did not post the #using stuff, should be obvious what to add to the file.
AlanKohl
Here's the url:
http://local.live.com/i/pins/poi_usergenerated.gif
johnvarney
Just because they are in your cache does not mean they are not dynamically created/rendered as opposed to static images. Whats in your cache is what your browser displayed, who's to say they were not dynamically created