• When pre view the embedded map with recommended html code it look great, but when publishing the page the map is replaced with the html code. What do I do wrong ?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey @plorent1,

    Is this code supposed to be an iframe?

    If yes, to add iframe code to a page or post in the Block Editor, you can use a Custom HTML block.

    Or, if you use the Classic Editor, you’d need to switch to the text editor and add your code there.

    Does that help? If not, would you be able to paste the code that you’re trying to embed in a reply here? I’ll then do my best to help you figure it out.

    Thread Starter plorent1

    (@plorent1)

    <script type="text/javascript">
    	width='100%';		// the width of the embedded map in pixels or percentage
    	height='450';		// the height of the embedded map in pixels or percentage
    	border='1';		// the width of the border around the map (zero means no border)
    	shownames='false';	// to display ship names on the map (true or false)
    	latitude='37.4460';	// the latitude of the center of the map, in decimal degrees
    	longitude='24.9467';	// the longitude of the center of the map, in decimal degrees
    	zoom='9';		// the zoom level of the map (values between 2 and 17)
    	maptype='1';		// use 0 for Normal Map, 1 for Satellite, 2 for OpenStreetMap
    	trackvessel='265720710';	// MMSI of a vessel (note: vessel will be displayed only if within range of the system) - overrides "zoom" option
    	fleet='';		// the registered email address of a user-defined fleet (user's default fleet is used)
    </script>
    <script type="text/javascript" src="//www.marinetraffic.com/js/embed.js"></script>
    Thread Starter plorent1

    (@plorent1)

    Hi Dave,

    Thank you for supporting me.
    This is the code I received from marin traffic and seems to work when pre view but not when publishing. I have used the custom html block but maybe wrong ?

    As you may understand I am not experienced in html programming.

    Thanks
    Peter

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Embed marin traffic map’ is closed to new replies.