when draw a polygon on the map, why the lat/long grid line was shown?

172 views
Skip to first unread message

Yan Zheng

unread,
Sep 7, 2011, 11:49:46 PM9/7/11
to google-map...@googlegroups.com
The wired is: if I create a new project, it is no problem; But in my current project, the problem is there.

How to disable the white lines? Thanks a lot, guys.

The code:

    function initialize() {
        var myLatLng = new google.maps.LatLng(54.470038, -96.799805);
        var myOptions = {
            zoom: 5,
            center: myLatLng,
            mapTypeId: google.maps.MapTypeId.ROADMAP
        };

        var bermudaTriangle;

        var map = new google.maps.Map(document.getElementById("map_canvas"),
      myOptions);

        var triangleCoords = [
    new google.maps.LatLng(60.009971, -110.017090),
    new google.maps.LatLng(49.023461, -110.017090),
    new google.maps.LatLng(49.001844, -123.094940),
    new google.maps.LatLng(49.126017, -123.200684),
    new google.maps.LatLng(49.222979, -123.208923),
    new google.maps.LatLng(49.272285, -123.265228),
    new google.maps.LatLng(49.319751, -123.136139),
    new google.maps.LatLng(49.377008, -123.306427),
    new google.maps.LatLng(49.334967, -123.391571),
    new google.maps.LatLng(49.339441, -123.427277),
    new google.maps.LatLng(49.392206, -123.405304),
    new google.maps.LatLng(49.429733, -123.473969),
    new google.maps.LatLng(49.384161, -123.531647),
    new google.maps.LatLng(49.472586, -123.885956),
    new google.maps.LatLng(50.071244, -124.859619),
    new google.maps.LatLng(50.701677, -126.628418),
    new google.maps.LatLng(51.172455, -127.770996),
    new google.maps.LatLng(52.005174, -128.221436),
    new google.maps.LatLng(53.169826, -129.957275),
    new google.maps.LatLng(53.839564, -130.682373),
    new google.maps.LatLng(54.711929, -130.550537),
    new google.maps.LatLng(54.683359, -132.775269),
    new google.maps.LatLng(57.007842, -135.851440),
    new google.maps.LatLng(58.387318, -137.059937),
    new google.maps.LatLng(59.456243, -139.581299),
    new google.maps.LatLng(60.048389, -142.042236)
  ];

        ca_western = new google.maps.Polygon({
            paths: triangleCoords,
            strokeColor: "#1E92FF",
            strokeOpacity: 1,
            strokeWeight: 4,
            fillColor: "#3DAEFF",
            fillOpacity: 0.95
        });
        ca_western.setMap(map);


Untitled.jpg

Pil

unread,
Sep 8, 2011, 3:39:34 AM9/8/11
to Google Maps JavaScript API v3
Perhaps there is something wrong with your graphics card?
Do you see the white lines also when using another machine or another
browser?
Perhaps turning hardware acceleration off in the browser helps?
>  Untitled.jpg
> 52KViewDownload

Andrew Leach

unread,
Sep 8, 2011, 5:25:12 AM9/8/11
to google-map...@googlegroups.com
On 8 September 2011 04:49, Yan Zheng <cait...@gmail.com> wrote:
> The wired is: if I create a new project, it is no problem; But in my current
> project, the problem is there.
>
> How to disable the white lines? Thanks a lot, guys.

Check your CSS to ensure that images are not given a border.

Yan Zheng

unread,
Sep 8, 2011, 10:14:01 AM9/8/11
to Google Maps JavaScript API v3
Thanks a lot for reply.

I didn't use any CSS file in my page. And i didn't use any image.

Thanks again.

On Sep 8, 5:25 am, Andrew Leach <andrew.leac...@gmail.com> wrote:

Enoch Lau (Google Employee)

unread,
Sep 8, 2011, 10:23:23 AM9/8/11
to google-map...@googlegroups.com
Are you viewing your page with a browser zoom of anything other than 100%?

Which browser are you using?

Can you please provide a link to a demo page that illustrates this problem?

Enoch
Reply all
Reply to author
Forward
0 new messages