google-maps

Google Maps marker getting replaced with default marker


A marker on a static Google Maps is being replaced by the default marker, although an icon

Furthermore, the strange thing is that some markers get displayed correctly depending parameters like latitude/longitude and zoom factor.

The link of the static map with the marker being replaced by a default marker is

    http://maps.google.com/maps/api/staticmap?size=600x500&sensor=false&center=48.135578,11.52429&zoom=7&markers=icon:http://hermes.schf.de/home/job_interview@schf.de/Share/office.png|48.135578,11.52429&path=color:red|enc:inxdHyyieAyiFqyJ{_yF~__Btj`GmesAysxF~`dApik|Nkhyj@e`btNt`||@oiu@mjlOki_@xj`BslM}bE

Solution

  • Your marker is out of limits (150x173). See google docs Custom Icons:

    The icon parameter must be specified using a URL (which should be URL-encoded). You may use any valid URL of your choosing… Most URL-shortening services have the advantage of automatically encoding URLs. Icons are limited to sizes of 4096 pixels (64x64 for square images), and the Static Maps service allows up to five unique custom icons per request. Note that each of these unique icons may be used multiple times within the static map.