Search code examples
htmlgoogle-mapsgoogle-maps-api-3google-maps-embed

Google Maps Embedding without Arrow Marker


I'm trying to embed a Google Map solely using longitude and latitude coordinates (supplied from a MySQL database). So far, I've been pretty successful, but I have one last hurdle I'm struggling with. Here's my embed code:

<iframe width="250" height="193" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=<?=$result_array['lat']?>,<?=$result_array['long']?>&amp;aq=&amp;sll=<?=$result_array['lat']?>,<?=$result_array['long']?>&amp;sspn=0.000647,0.001246&amp;t=m&amp;gl=us&amp;ie=UTF8&amp;ll=<?=$result_array['lat']?>,<?=$result_array['long']?>&amp;spn=0.011505,0.018239&amp;z=15&amp;output=embed"></iframe>

I've gotten to a point where using only one set of coordinates, I can pinpoint the right place on the map, but the place is marked with an arrow and the relevant landmark. Does anyone know of a way to get rid of the green arrow?

Here's what I'm talking about: http://jsfiddle.net/9fmwM/6/


Solution

  • You may use the saddr-parameter instead of the q-parameter:

    <iframe style="min-height: 99%; width: 100%;" 
            frameborder="0" scrolling="no" 
            marginheight="0" 
            marginwidth="0" 
            src="https://maps.google.com/maps?f=q&amp;saddr=37.42216,-122.083737&amp;source=s_d&amp;hl=en&amp;z=15&amp;output=embed"></iframe>
    

    http://jsfiddle.net/doktormolle/kUsCP/