At the moment I have my asp.net code generating this URL:
(now obviously that wont work for anyone else due to it being locally hosted at the moment)
Now if I replace the "http://localhost:63709/ShowMapIcon.ashx?id=21"
With https://www.megaadresse.com/images/icons/google-maps.png
(which you can test :) )
But if I go directly to:
http://localhost:63709/ShowMapIcon.ashx?id=21
So why doesn't my generated link work? After some trial and error I found that the marker image has to be below 64*64pix, so to rule out any other weirdness I uploaded the megaadresse image to our database and after downloading the image from both my asp.net address and the web address, they look identical:
My best guess is that because ShowMapIcon.ashx.cs is itself generating that image, from bytes in a database (I don't know why its done that way, legacy code) that what happens is, somehow, the map is generated before the showmapicon?
But it could also be a syntactical conflict with asp.net (I am going to see if I can write some tests around that)
Or it could just be I am misunderstanding the google api completely??
If anyone has suggestions I would be really grateful
Note: I am trying to embed a google maps image in a PDF so all of this is going into an url of an image cell of ITextsharp, so I would preferably like to keep the logic in a format that ends with a img tag valid url that I can send ITextsharp. So it would need to work like it does in the snippet below:
<img src= "https://maps.googleapis.com/maps/api/staticmap?center=57.145329,-2.10066&zoom=13&size=600x300&maptype=roadmap&markers=icon:https://www.megaadresse.com/images/icons/google-maps.png|57.145329,-2.10066&key=AIzaSyCysdGK0acTzKqW01IPvUanvPwFSXfX-NE">
Firstly how does Google APIs know what localhost is? The Google map request is going off and retrieving an map at said location from the Google servers and then trying to create a custom marker from an image it has no reference to because it's local to your work network