Dynamic Google Maps Location for PHP and MySQL Driven -
I have a database based site where it gets the address and the address is shown on Google Maps. Here is the string in which Google Maps is embedded. I do not have the latitude of the letters, but I have the address and the area. Locations are not visible.
& lt ;? Php $ add = $ row_rsDoc ['address']; $ Address = str_replace ("", "+", $ add); $ Gtown = str_replace ("", "+", $ row_rsDoc ['city']); $ Gprov = str_replace ("", "+", $ row_rsDoc ['province']); $ Googlestr = $ address ',' '+' $ gtown ',' '+' $ gprov ...... Echo $ googlestr; ? & Gt; & Lt; Th width = "446" square = "entry" scope = "col" & gt; & Lt; Iframe width = "441" height = "243" frameborder = "0" "No" marginheight scrolling = = "0" marginwidth = "0" src = "https://maps.google.co.za/maps?f= q & amp; amp; source = s_q & amp; amp; hl = en & amp; amp; geocode = & amp; amp; q = & lt;? php $ googlestr echo ;? & gt; & amp; amp; aq = & amp; amp; SLL = -26.178375,28.033719 & amp; amp; ie = UTF8 & amp; amp; AH = & amp; amp; hnear = & amp; amp; radius = 15000 & amp; amp; T = M & amp; output = embed "& Gt; & Lt; / Iframe & gt; & Lt; Br / & gt; to use
str_replace () Instead of urlencode () (see the document) Also, if you are including location coords in your URL, try using this: < Pre> & lt; Th width = "446" square = "entry" scope = "col" & gt; & Lt; Iframe width = "441" height = "243" frameborder = "0" scrolling = "no" marginheight = "0" marginwidth = "0" src = "https://maps.google.co.za/maps?f= q & amp; amp; source = s_q & amp; amp; hl = en & amp; amp; geocode = & amp; amp; q = & lt;? php echo $ googlestr ;? & Gt; & amp; amp; aq = & amp; ie = UTF8 and Amp; output = embed "& gt; & Lt; / Iframe & gt; & Lt; Br / & gt;
Comments
Post a Comment