Google Maps behaving differently in CEF vs. browser

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Google Maps behaving differently in CEF vs. browser

Postby michaeladamkatz » Wed Jul 16, 2014 11:22 pm

I am using CEF version 3.1650.1539, Chromium version 31.0.1650.57. Running on Windows 7 x64.

I am using the Google Maps API (version 3) through OpenLayers (version 2.11).

I notice that Google maps behaves differently in my CEF app than when I run the same client code in Chrome. Since there are so many players involved I'm mostly just looking for a hint at where the source of the difference may lie.

My app uses Google Maps as the basemap, and then overlays my own (transparent) tiles on top. These latter tiles are retrieved from a server running on the local machine.

The most striking difference I see is that in the browser, when I zoom or pan to a different map view, the Google tiles layer refreshes immediately, even when my locally served tiles may be slow to come in. In CEF, when I zoom or pan to a different map view, I see a beige background color (not quite sure if that's my beige, or from OpenLayers, or from CEF), and then I see my local tiles come in (possibly slowly), and finally I see the Google tiles update quickly behind them.

I'm trying to understand if this difference could be coming from the fact that:

(a) CEF is rendering off screen or in some other way different from how Chrome renders (but I don't see why a different render method would change the order in which things fill in)

(b) CEF is somehow prioritizing the tile requests to the local server over the tile requests for the remote Google tiles, and is somehow waiting to do those remote requests until the local requests are all satisfied

(c) something else

Any help/guesses would be appreciated.

Thanks.
michaeladamkatz
Mentor
 
Posts: 50
Joined: Wed Jan 09, 2013 5:10 pm

Re: Google Maps behaving differently in CEF vs. browser

Postby magreenblatt » Fri Jul 18, 2014 10:29 am

Are you testing with a Release build of libcef? Are you using windowed or off-screen rendering? What Google Chrome version are you comparing against?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Google Maps behaving differently in CEF vs. browser

Postby michaeladamkatz » Fri Jul 18, 2014 5:46 pm

I'm building/running with the release libcef.dll (about 27 MB), not the debug version (about 195 MB). (The program runs quickly, not in slow-motion like when I run the debug version.)

I don't believe I'm running with off-screen rendering. AppIsOffScreenRenderingEnabled() return false, and I see the screen update incrementally as a page is loaded (not sure if that indicates whether it's drawing on-screen).

Chrome version is 34.0.1847.137 m. I have also tested with the Chromium browser version 38.0.2097.0 (283646) and it behaves the same as Chrome (i.e., requesting/receiving the Google maps tiles quickly/early) and not like CEF (requesting/receiving the Google maps tiles only after all the local tiles have been received).

(I looked at it using Fiddler and indeed all of the local tile requests show in the session list and are satisfied before I see any of the google maps requests show in the session list.)
michaeladamkatz
Mentor
 
Posts: 50
Joined: Wed Jan 09, 2013 5:10 pm

Re: Google Maps behaving differently in CEF vs. browser

Postby michaeladamkatz » Fri Jul 18, 2014 6:07 pm

Here is a Fiddler trace. It shows that the story is basically like I said, but a bit more nuanced. This is after changing to a new map view. There is a burst of requests for the tiles on my various OpenLayer layers, including the local /selectiontagsoverlay layer, the local /tile layer, and the local /tileoverlay layer. You can see that at 28-30 it gets in some requests to googlemaps, but they aren't the actual image requests. Those don't happen until the /vt calls, which are grouped mostly at the bottom. (But not exclusively, there are still a few calls to the local server after the first few /vt google call at session 66.)

# Result Protocol Host URL Body Caching Content-Type Process Comments Custom
4 200 HTTP localhost:8080 /selectiontagsoverlay/7/24/49/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
5 200 HTTP localhost:8080 /selectiontagsoverlay/7/25/49/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
6 200 HTTP localhost:8080 /selectiontagsoverlay/7/25/48/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
7 200 HTTP localhost:8080 /selectiontagsoverlay/7/24/48/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
8 200 HTTP localhost:8080 /selectiontagsoverlay/7/23/48/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
9 200 HTTP localhost:8080 /selectiontagsoverlay/7/23/49/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
10 200 HTTP localhost:8080 /selectiontagsoverlay/7/23/50/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
11 200 HTTP localhost:8080 /selectiontagsoverlay/7/24/50/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
12 200 HTTP localhost:8080 /selectiontagsoverlay/7/25/50/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
13 200 HTTP localhost:8080 /selectiontagsoverlay/7/26/50/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
14 200 HTTP localhost:8080 /selectiontagsoverlay/7/26/49/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
15 200 HTTP localhost:8080 /selectiontagsoverlay/7/26/48/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
16 200 HTTP localhost:8080 /selectiontagsoverlay/7/26/47/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
17 200 HTTP localhost:8080 /selectiontagsoverlay/7/25/47/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
18 200 HTTP localhost:8080 /selectiontagsoverlay/7/24/47/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
19 200 HTTP localhost:8080 /ajax/ViewChanged/17 2 text/JSON;charset=utf-8 cefclient:7400
20 200 HTTP localhost:8080 /selectiontagsoverlay/7/23/47/-12829802,4623636,-12038526,5295059/0 1,843 image/png cefclient:7400
21 200 HTTP localhost:8080 /tileoverlay/7/24/49/-12829802,4623636,-12038526,5295059/0 2,133 image/png cefclient:7400
22 200 HTTP localhost:8080 /tileoverlay/7/25/49/-12829802,4623636,-12038526,5295059/0 3,210 image/png cefclient:7400
23 200 HTTP localhost:8080 /tileoverlay/7/25/48/-12829802,4623636,-12038526,5295059/0 1,841 image/png cefclient:7400
25 200 HTTP localhost:8080 /ajax/SetClickPoint/-110.72570800782/39.712451409233//18 2 text/JSON;charset=utf-8 cefclient:7400
26 200 HTTP localhost:8080 /tileoverlay/7/24/48/-12829802,4623636,-12038526,5295059/0 4,293 image/png cefclient:7400
27 200 HTTP localhost:8080 /ajax/MouseSelection/-110.76416015626/39.742024794368/-110.67626953125/39.674409848436/7/0/_all_/1/0/19 210 text/JSON;charset=utf-8 cefclient:7400
28 200 HTTP maps.googleapis.com /maps/api/js/ViewportInfoService.GetViewportInfo?1m6&1m2&1d33.40842089043825&2d-122.65009313201989&2m2&1d47.59555852884353&2d-100.68291227255361&2u7&4sen-US&5e0&6sm%40269000000&7b0&8e0&9b0&callback=_xdc_._63if8l&token=28000 7,046 no-cache, must-revalidate; Expires: Fri, 01 Jan 1990 00:00:00 GMT text/javascript; charset=UTF-8 cefclient:7400
29 200 HTTP mt0.googleapis.com /mapslt/ft?hl=en-US&lyrs=m%40269000000%7Csalt%3A1484351913&las=tuvuwwt,tuvuwwu,tuvuwwv,tuvuwww,tuvwuut,tuvwuuu,tuvwuuv,tuvwuuw,tuwtvvt,tuwtvvu,tuwtvvv,tuwtvvw,tuwvttt,tuwvttu,tuwvttv,tuwvttw&z=7&src=apiv3&xc=1&style=47%2C37%7Csmartmaps&callback=_xdc_._d2i3oi&token=125291 992 public, max-age=22222222; Expires: Thu, 02 Apr 2015 03:46:43 GMT text/javascript; charset=UTF-8 cefclient:7400
30 200 HTTP mt1.googleapis.com /mapslt/ft?hl=en-US&lyrs=m%40269128463%7Csalt%3A1484351913&las=tuvuwwt,tuvuwwu,tuvuwwv,tuvuwww,tuvwuut,tuvwuuu,tuvwuuv,tuvwuuw,tuwtvvt,tuwtvvu,tuwtvvv,tuwtvvw,tuwvttt,tuwvttu,tuwvttv,tuwvttw&z=7&src=apiv3&xc=1&style=47%2C37%7Csmartmaps&callback=_xdc_._p8zgx4&token=93720 966 public, max-age=22222222; Expires: Thu, 02 Apr 2015 03:46:44 GMT text/javascript; charset=UTF-8 cefclient:7400
31 200 HTTP localhost:8080 /ajax/SetClickPoint/-110.72570800782/39.712451409233//20 2 text/JSON;charset=utf-8 cefclient:7400
32 200 HTTP localhost:8080 /ajax/MouseSelection/-110.76416015626/39.742024794368/-110.67626953125/39.674409848436/7/0/_all_/1/0/21 210 text/JSON;charset=utf-8 cefclient:7400
34 200 HTTP localhost:8080 /tileoverlay/7/23/48/-12829802,4623636,-12038526,5295059/0 870 image/png cefclient:7400
35 200 HTTP localhost:8080 /tileoverlay/7/23/49/-12829802,4623636,-12038526,5295059/0 2,994 image/png cefclient:7400
36 200 HTTP localhost:8080 /tileoverlay/7/23/50/-12829802,4623636,-12038526,5295059/0 3,725 image/png cefclient:7400
37 200 HTTP localhost:8080 /tileoverlay/7/24/50/-12829802,4623636,-12038526,5295059/0 4,570 image/png cefclient:7400
38 200 HTTP localhost:8080 /tileoverlay/7/25/50/-12829802,4623636,-12038526,5295059/0 3,275 image/png cefclient:7400
39 200 HTTP localhost:8080 /tileoverlay/7/26/50/-12829802,4623636,-12038526,5295059/0 4,757 image/png cefclient:7400
40 200 HTTP localhost:8080 /tileoverlay/7/26/49/-12829802,4623636,-12038526,5295059/0 2,911 image/png cefclient:7400
42 200 HTTP localhost:8080 /tileoverlay/7/25/47/-12829802,4623636,-12038526,5295059/0 1,865 image/png cefclient:7400
43 200 HTTP localhost:8080 /tileoverlay/7/26/48/-12829802,4623636,-12038526,5295059/0 5,842 image/png cefclient:7400
44 200 HTTP localhost:8080 /tileoverlay/7/26/47/-12829802,4623636,-12038526,5295059/0 2,464 image/png cefclient:7400
47 200 HTTP localhost:8080 /tileoverlay/7/24/47/-12829802,4623636,-12038526,5295059/0 3,975 image/png cefclient:7400
49 200 HTTP localhost:8080 /tileoverlay/7/23/47/-12829802,4623636,-12038526,5295059/0 1,283 image/png cefclient:7400
50 200 HTTP localhost:8080 /tile/7/24/49 1,843 image/png cefclient:7400
51 200 HTTP localhost:8080 /tile/7/25/49 1,843 image/png cefclient:7400
52 200 HTTP localhost:8080 /tile/7/25/48 1,843 image/png cefclient:7400
53 200 HTTP localhost:8080 /tile/7/24/48 1,843 image/png cefclient:7400
54 200 HTTP localhost:8080 /tile/7/23/49 1,843 image/png cefclient:7400
55 200 HTTP localhost:8080 /tile/7/23/48 1,843 image/png cefclient:7400
56 200 HTTP localhost:8080 /tile/7/23/50 1,843 image/png cefclient:7400
57 200 HTTP localhost:8080 /tile/7/24/50 1,843 image/png cefclient:7400
58 200 HTTP maps.googleapis.com /maps/api/js/StaticMapService.GetMapImage?1m2&1i5893&2i12054&2e1&3u7&4m2&1u647&2u549&5m4&1e0&5sen-US&6sus&10b1&token=44269 91,109 public, max-age=86400; Expires: Sat, 19 Jul 2014 22:56:25 GMT image/png cefclient:7400
59 200 HTTP localhost:8080 /tile/7/26/49 1,843 image/png cefclient:7400
60 200 HTTP localhost:8080 /tile/7/26/50 1,843 image/png cefclient:7400
61 200 HTTP localhost:8080 /tile/7/25/50 1,843 image/png cefclient:7400
62 200 HTTP localhost:8080 /tile/7/26/48 1,843 image/png cefclient:7400
63 200 HTTP mt1.googleapis.com /vt?lyrs=m@269099835&src=apiv3&hl=en-US&x=23&y=47&z=7&style=47,37%7Csmartmaps 12,450 public, max-age=22222222; Expires: Sun, 29 Mar 2015 20:08:26 GMT image/png cefclient:7400
64 200 HTTP mt0.googleapis.com /vt?lyrs=m@269127749&src=apiv3&hl=en-US&x=24&y=47&z=7&style=47,37%7Csmartmaps 20,332 public, max-age=22222222; Expires: Thu, 02 Apr 2015 03:46:47 GMT image/png cefclient:7400
65 200 HTTP mt1.googleapis.com /vt?lyrs=m@269091608&src=apiv3&hl=en-US&x=23&y=48&z=7&style=47,37%7Csmartmaps 12,021 public, max-age=22222222; Expires: Sat, 28 Mar 2015 21:17:18 GMT image/png cefclient:7400
66 200 HTTP mt0.googleapis.com /vt?lyrs=m@269127746&src=apiv3&hl=en-US&x=24&y=48&z=7&style=47,37%7Csmartmaps 29,307 public, max-age=22222222; Expires: Thu, 02 Apr 2015 03:46:47 GMT image/png cefclient:7400
67 200 HTTP localhost:8080 /tile/7/24/47 1,843 image/png cefclient:7400
68 200 HTTP localhost:8080 /tile/7/23/47 1,843 image/png cefclient:7400
69 200 HTTP localhost:8080 /tile/7/26/47 1,843 image/png cefclient:7400
70 200 HTTP mt0.googleapis.com /vt?lyrs=m@269000000&src=apiv3&hl=en-US&x=22&y=47&z=7&style=47,37%7Csmartmaps 7,805 public, max-age=22222222; Expires: Wed, 25 Mar 2015 06:44:32 GMT image/png cefclient:7400
71 200 HTTP localhost:8080 /tile/7/25/47 1,843 image/png cefclient:7400
72 200 HTTP mt1.googleapis.com /vt?lyrs=m@269126492&src=apiv3&hl=en-US&x=23&y=49&z=7&style=47,37%7Csmartmaps 12,890 public, max-age=22222222; Expires: Thu, 02 Apr 2015 03:46:47 GMT image/png cefclient:7400
73 200 HTTP mt0.googleapis.com /vt?lyrs=m@269066141&src=apiv3&hl=en-US&x=22&y=48&z=7&style=47,37%7Csmartmaps 13,131 public, max-age=22222222; Expires: Wed, 25 Mar 2015 22:49:50 GMT image/png cefclient:7400
74 200 HTTP mt0.googleapis.com /vt?lyrs=m@269099467&src=apiv3&hl=en-US&x=24&y=46&z=7&style=47,37%7Csmartmaps 28,409 public, max-age=22222222; Expires: Sun, 29 Mar 2015 19:22:42 GMT image/png cefclient:7400
75 200 HTTP mt1.googleapis.com /vt?lyrs=m@269127761&src=apiv3&hl=en-US&x=23&y=46&z=7&style=47,37%7Csmartmaps 33,926 public, max-age=22222222; Expires: Thu, 02 Apr 2015 01:44:19 GMT image/png cefclient:7400
76 200 HTTP mt0.googleapis.com /vt?lyrs=m@269119926&src=apiv3&hl=en-US&x=24&y=49&z=7&style=47,37%7Csmartmaps 19,423 public, max-age=22222222; Expires: Thu, 02 Apr 2015 03:46:47 GMT image/png cefclient:7400
77 200 HTTP mt1.googleapis.com /vt?lyrs=m@269126763&src=apiv3&hl=en-US&x=25&y=47&z=7&style=47,37%7Csmartmaps 9,147 public, max-age=22222222; Expires: Thu, 02 Apr 2015 03:46:47 GMT image/png cefclient:7400
78 200 HTTP mt1.googleapis.com /vt?lyrs=m@269126094&src=apiv3&hl=en-US&x=25&y=48&z=7&style=47,37%7Csmartmaps 18,839 public, max-age=22222222; Expires: Thu, 02 Apr 2015 01:18:37 GMT image/png cefclient:7400
79 204 HTTP maps.googleapis.com /maps/gen_204?target=api&ev=api_viewport&cad=host:localhost%3A8080,v:15,vr:1,r:1,mt:m,c:40.600534%2C-111.697998,sp:4.57650x7.10815,size:647x549,relsize:0.45,token:691filbehx,src:apiv3,ts:s3vs2v 0 no-cache, must-revalidate; Expires: Fri, 01 Jan 1990 00:00:00 GMT image/gif cefclient:7400
80 204 HTTP maps.googleapis.com /maps/gen_204?target=api&imp=smimps%3DFuP01yT4R82,BWkUqnFAuaq,N477FNIT_8H%26z%3D7&cad=src:apiv3,ts:s3vt0o 0 no-cache, must-revalidate; Expires: Fri, 01 Jan 1990 00:00:00 GMT image/gif cefclient:7400
82 200 HTTP mt1.googleapis.com /vt?lyrs=m@269126763&src=apiv3&hl=en-US&x=25&y=46&z=7&style=47,37%7Csmartmaps 15,779 public, max-age=22222222; Expires: Thu, 02 Apr 2015 03:46:48 GMT image/png cefclient:7400
83 200 HTTP mt0.googleapis.com /vt?lyrs=m@269127996&src=apiv3&hl=en-US&x=22&y=46&z=7&style=47,37%7Csmartmaps 26,177 public, max-age=22222222; Expires: Thu, 02 Apr 2015 02:33:45 GMT image/png cefclient:7400
84 200 HTTP mt0.googleapis.com /vt?lyrs=m@269110799&src=apiv3&hl=en-US&x=22&y=49&z=7&style=47,37%7Csmartmaps 12,529 public, max-age=22222222; Expires: Tue, 31 Mar 2015 03:58:08 GMT image/png cefclient:7400
85 200 HTTP mt1.googleapis.com /vt?lyrs=m@269126494&src=apiv3&hl=en-US&x=25&y=49&z=7&style=47,37%7Csmartmaps 23,768 public, max-age=22222222; Expires: Thu, 02 Apr 2015 03:46:48 GMT image/png cefclient:7400
michaeladamkatz
Mentor
 
Posts: 50
Joined: Wed Jan 09, 2013 5:10 pm

Re: Google Maps behaving differently in CEF vs. browser

Postby magreenblatt » Fri Jul 18, 2014 6:42 pm

Try a newer version of CEF (1750 or 1916 branch).
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Google Maps behaving differently in CEF vs. browser

Postby michaeladamkatz » Fri Jul 18, 2014 6:56 pm

It's a bit time-consuming for me to update to a new CEF at this point because I've done a lot of customization of the sample app. (Not sure if any of those customizations would break with a new CEF?)

Do you have any specific reason to believe that a new CEF will do something differently in regard to this issue?
michaeladamkatz
Mentor
 
Posts: 50
Joined: Wed Jan 09, 2013 5:10 pm

Re: Google Maps behaving differently in CEF vs. browser

Postby magreenblatt » Sat Jul 19, 2014 12:23 am

There have been significant changes since 1650 and you're comparing to a totally different Google Chrome version. Also, to rule out your customizations as the source of the problem you should test with an unmodified Release build of cefclient.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 47 guests