This topic is locked
[SOLVED]

 Automatic Map Features

8/3/2018 3:47:53 AM
PHPRunner General questions
S
swanside author

Hello

I am trying out a new project which requires the use of maybe three maps. An OS map, a Google Map and a weather map.

All can be found by entering a Post Code for the area on the map website, but I would like a way of getting this or something similar by just using the postcode and setting the field as Map, but in the map settings I can use the Google Maps, but how could I use the other sites, such as Windy.com and Grid Reference Finder?

Thanks


admin 8/3/2018

You need to check what embedding options other websites offer, there must be some sort of code snippet you can add to your page. Then using 'View as' Custom you can insert this code snippet and use zip code coming from the database.

S
swanside author 8/4/2018



You need to check what embedding options other websites offer, there must be some sort of code snippet you can add to your page. Then using 'View as' Custom you can insert this code snippet and use zip code coming from the database.



Cheers Sergey

I got a reply back about the Grid reference and i have been told to use
https://gridreferencefinder.com/index.php?pc=NE8%201HH
So I am thinking I use something like this

"https://gridreferencefinder.com/index.php?pc=$value[GRMap'>https://gridreferencefinder.com/index.php?pc=$value[GRMap]);"
But when I put this in the View as Custom the // make the look like a comment

Any help on that please?

thanks
OK Update I looked on W3 Schools and tried this
$value = '<img src="https://gridreferencefinder.com/index.php?pc=$value[GRMap'>https://gridreferencefinder.com/index.php?pc=$value[GRMap] height="80" width="120" />';
But still dont work

lefty 8/4/2018



Cheers Sergey

I got a reply back about the Grid reference and i have been told to use
https://gridreferenc...hp?pc=NE8%201HH
So I am thinking I use something like this

"https://gridreferencefinder.com/index.php?pc=$value[GRMap'>https://gridreferencefinder.com/index.php?pc=$value[GRMap]);"
But when I put this in the View as Custom the // make the look like a comment

Any help on that please?

thanks
OK Update I looked on W3 Schools and tried this
$value = '<img src="https://gridreferencefinder.com/index.php?pc=$value[GRMap'>https://gridreferencefinder.com/index.php?pc=$value[GRMap] height="80" width="120" />';
But still dont work


Try this syntax:
$data instead of $value on field name!
$value ="<img src='https://gridreferencefinder.com/index.php?pc=".$data["GRMap"]."; height='80' width='120' '/>";

S
swanside author 8/4/2018

Thanks John

I tried that but I still get the black box, even took the "s" from "http" to see if it may have been that
$value ="<img src='http://gridreferencefinder.com/index.php?pc=".$data["GRMap"]."; height='80' width='120' '/>";
I think it maybe due to the ref link going to the website and not directly to a map. For example this is the URL I would be trying to look at
http://gridreferencefinder.com/index.php?pc=LL12%206yy

C
cristi 8/4/2018

Maybe you should use an iframe instead of image:

$value="<iframe src=http://gridreferencefinder.com/index.php?pc=".$data["GRMap";] . " height='80' width='120'></iframe>";
S
swanside author 8/5/2018



Maybe you should use an iframe instead of image:

$value="<iframe src=http://gridreferencefinder.com/index.php?pc=".$data["GRMap";] . " height='80' width='120'></iframe>";



Cheers Cristi

That did the job.

Thanks <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=85598&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />