如何并排显示Google地图

时间:2015-08-19 11:38:00

标签: javascript jquery html css

我真的需要你的帮助,请访问我的网站,并在地图部分的底部scrool,我的地图不能并排排列。请帮助添加所需的代码以使其并排排列。 http://stages.a-wan.com/hybridmotors

1 个答案:

答案 0 :(得分:0)

看起来你的gmaps是容器的outide(你可能)意味着将它们放在

   class WebSocketClient
{
    static WebSocket websocket = null;
    public static void Start()
    {
        try {
            Console.WriteLine("Started At: " + DateTime.Now.ToString());
            if (websocket != null)
            {
                websocket.Dispose();
            }
            websocket = new WebSocket("ws://a uri");
            websocket.Opened += new EventHandler(webSocketClient_Opened);
            websocket.Error += websocket_Error;
            websocket.Closed += new EventHandler(webSocketClient_Closed);
            websocket.MessageReceived += new EventHandler<MessageReceivedEventArgs>(webSocketClient_MessageReceived);
            websocket.Open();
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.ToString() + " DEBUG#8");
        }
    }

    private static bool TimeOutOccured = false;
    private static DateTime stopped;
    public static void Send(byte[] packet)
    {

        try
        {
            if (websocket.State == WebSocketState.Open)
            {
                if (packet != null)
                {
                    websocket.Send(packet, 0, packet.Length);
                }
                TimeOutOccured = false;
            }
            else
            {
                if (TimeOutOccured)
                {
                    Console.WriteLine("TimeOut At: " + DateTime.Now.ToString());
                    if ((DateTime.Now - stopped).TotalSeconds > 30)
                    {
                        websocket.Opened -= new EventHandler(webSocketClient_Opened);
                        websocket.Error -= websocket_Error;
                        websocket.Closed -= new EventHandler(webSocketClient_Closed);
                        websocket.MessageReceived -= new EventHandler<MessageReceivedEventArgs>(webSocketClient_MessageReceived);
                        Start();
                    }
                }
                else
                {
                    TimeOutOccured = true;
                    stopped = DateTime.Now;
                }
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.ToString() + " DEBUG#9");
        }
    }

    static void websocket_Error(object sender, SuperSocket.ClientEngine.ErrorEventArgs ex)
    {
        try {
            Console.WriteLine("Error At: " + DateTime.Now.ToString());
            Shared.AddError("WebSocketClient.websocket_Error", ex.Exception);
        }
        catch (Exception x)
        {
            Console.WriteLine(x.ToString() + " DEBUG#10");
        }
    }
    protected static void webSocketClient_MessageReceived(object sender, MessageReceivedEventArgs e)
    {
        try {
            var m_CurrentMessage = e.Message;
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.ToString() + " DEBUG#11");
        }

    }
    protected static void webSocketClient_Closed(object sender, EventArgs e)
    {
        try
        {
            Console.WriteLine("Closed At: " + DateTime.Now.ToString());
            if (websocket.State == WebSocketState.Closed)
            {
                System.Threading.Thread.Sleep(1000);
                Start();
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.ToString() + " DEBUG#12");
        }
    }
    protected static void webSocketClient_Opened(object sender, EventArgs e)
    {
        Console.WriteLine("Opened At: " + DateTime.Now.ToString());
    }
}

将其更改为

 public void Start2()
    {
        try
        {
            var server = new WebSocketServer("my wan uri");

            ILog logger = LogManager.GetLogger(typeof(FleckLog));

            FleckLog.LogAction = (level, message, ex) =>
            {
                switch (level)
                {
                    case LogLevel.Debug:
                        //gger.Debug(message, ex);
                        break;
                    case LogLevel.Error:
                        SocketMessage("3", message, ex);
                        break;
                    case LogLevel.Warn:
                        SocketMessage("4", message, ex);
                        break;
                    default:
                        SocketMessage("5", message, ex);
                        break;
                }
            };

            server.Start(socket =>
            {
                socket.OnOpen = () => evStatusChanged("Open!");
                socket.OnClose = () => evStatusChanged("Close!");
                socket.OnError = error =>
                    {
                        Console.WriteLine("DEBUG:1 " + error.ToString());
                    };
                socket.OnBinary = packetIn =>
                    {
                        try
                        {
                          //i check my timestamps in my headers here
                        }
                        catch (Exception ex)
                        {
                            Console.WriteLine(ex.ToString() + " ServerWebSocket.WebSocketServer_NewDataReceived.Catch3");
                        }
                    };
                socket.OnMessage = message =>
                {

                };
            });
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.ToString() + " ServerWebSocket.Start2");
        }
    }

如果你想要并排

,也应该删除clearfix