//iTextSharp.text.Image LocationImage = iTextSharp.text.Image.GetInstance("http://maps.google.com/maps/api/staticmap?center=" + objInspMgt.PropertyInspectedAddress + "&zoom=14&size=612x612&maptype=roadmap&markers=color:blue|label:S|40.702147,-74.015794&markers=color:green|label:G|40.711614,-74.012318&markers=color:red|color:red|label:C|41.726247,-97.002853&sensor=false");
//Map style roadMap
iTextSharp.text.Image LocationImage = iTextSharp.text.Image.GetInstance("http://maps.google.com/maps/api/staticmap?size=412x530&maptype=roadmap&markers=size:mid|color:red|"+objInspMgt.PropertyInspectedAddress+"&sensor=false");
//Map style terrain
//iTextSharp.text.Image LocationImage = iTextSharp.text.Image.GetInstance("http://maps.google.com/maps/api/staticmap?size=412x530&maptype=terrain&markers=size:mid|color:red|" + objInspMgt.PropertyInspectedAddress + "&sensor=false");
//Map style satellite
//iTextSharp.text.Image LocationImage = iTextSharp.text.Image.GetInstance("http://maps.google.com/maps/api/staticmap?size=412x530&maptype=satellite&markers=size:mid|color:red|"+objInspMgt.PropertyInspectedAddress+"&sensor=false");
//Map style hybrid
//iTextSharp.text.Image LocationImage = iTextSharp.text.Image.GetInstance("http://maps.google.com/maps/api/staticmap?size=412x530&maptype=hybrid&markers=size:mid|color:red|" + objInspMgt.PropertyInspectedAddress + "&sensor=false");
LocationImage.ScaleToFit(650, 650);
LocationImage.Alignment = iTextSharp.text.Image.UNDERLYING;
LocationImage.SetAbsolutePosition(0, 0);
locationcell = new PdfPCell(LocationImage);
locationcell.PaddingBottom = 10;
locationcell.PaddingTop = 10;
locationcell.HorizontalAlignment = 1; //0=Left, 1=Centre, 2=Right
locationcell.Colspan = 3;
locationcell.Border = 0;
Locationtable.AddCell(locationcell);
Document.Add(Locationtable);
//Map style roadMap
iTextSharp.text.Image LocationImage = iTextSharp.text.Image.GetInstance("http://maps.google.com/maps/api/staticmap?size=412x530&maptype=roadmap&markers=size:mid|color:red|"+objInspMgt.PropertyInspectedAddress+"&sensor=false");
//Map style terrain
//iTextSharp.text.Image LocationImage = iTextSharp.text.Image.GetInstance("http://maps.google.com/maps/api/staticmap?size=412x530&maptype=terrain&markers=size:mid|color:red|" + objInspMgt.PropertyInspectedAddress + "&sensor=false");
//Map style satellite
//iTextSharp.text.Image LocationImage = iTextSharp.text.Image.GetInstance("http://maps.google.com/maps/api/staticmap?size=412x530&maptype=satellite&markers=size:mid|color:red|"+objInspMgt.PropertyInspectedAddress+"&sensor=false");
//Map style hybrid
//iTextSharp.text.Image LocationImage = iTextSharp.text.Image.GetInstance("http://maps.google.com/maps/api/staticmap?size=412x530&maptype=hybrid&markers=size:mid|color:red|" + objInspMgt.PropertyInspectedAddress + "&sensor=false");
LocationImage.ScaleToFit(650, 650);
LocationImage.Alignment = iTextSharp.text.Image.UNDERLYING;
LocationImage.SetAbsolutePosition(0, 0);
locationcell = new PdfPCell(LocationImage);
locationcell.PaddingBottom = 10;
locationcell.PaddingTop = 10;
locationcell.HorizontalAlignment = 1; //0=Left, 1=Centre, 2=Right
locationcell.Colspan = 3;
locationcell.Border = 0;
Locationtable.AddCell(locationcell);
Document.Add(Locationtable);
No comments:
Post a Comment