Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 944257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:33:49+00:00 2026-05-15T22:33:49+00:00

Trying to use OpenLayers to (eventually) load markers, vectors & WMS on top of

  • 0

Trying to use OpenLayers to (eventually) load markers, vectors & WMS on top of a google earth plugin base map. Google Earth does not appear to ‘play well with others’.

If I instantiate a map in the ‘google way’:
google.earth.createInstance(‘map’, initCB, failCB);

I get a google map that I can add google placemarks to, but I can’t pass that instance to OpenLayers.

Using the following:

map = new OpenLayers.Map('ol-map');
map.addControl(new OpenLayers.Control.LayerSwitcher());

var gphy = new OpenLayers.Layer.Google(
    "Google Physical",
    {type: G_PHYSICAL_MAP}
);
var gmap = new OpenLayers.Layer.Google(
    "Google Streets", // the default
    {numZoomLevels: 20}
);
var ghyb = new OpenLayers.Layer.Google(
    "Google Hybrid",
    {type: G_HYBRID_MAP, numZoomLevels: 20}
);
var gsat = new OpenLayers.Layer.Google(
    "Google Satellite",
    {type: G_SATELLITE_MAP, numZoomLevels: 22}
);
var gearth = new OpenLayers.Layer.Google(
    "Google Earth",
    {type: G_SATELLITE_3D_MAP}
);

map.addLayers([gphy, gmap, ghyb, gsat, gearth]);

map.setCenter(new OpenLayers.LonLat(-120, 32), 5)
addMarker();

This creates a basic OL map with 5 googly layers. I can see the marker I add when any of the map layers except when gearth is selected. As soon as I load the google earth map, it ‘takes over’ the entire div. All the OL controls such as the LayerSwitcher are gone and I haven’t been able to figure out how to access the google earth instance from OL.

I’m assuming the markers are still present, but behind the basemap. Setting the opacity on the basemap has no effect.

Questions:

  1. Is this a documented limitation? I can’t find anything that indicated it should not be possible.
  2. Is there a workaround where I can pass the OpenLayers map/layer instance to google earth’s getEarthInstance call? Or vice versa? It seems like that would be the best of both worlds, giving me access to the GE API when needed, but I could use all the WFS processing in OL for most tasks.

Half-baked ideas welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:33:49+00:00Added an answer on May 15, 2026 at 10:33 pm

    In general, OpenLayers has absolutely no support for the Google Earth 3D mode. (I’m a developer for OpenLayers, and I only became aware that this was possible via this question.) Because of the way that the 3D display code works (via a 3rd party plugin), I can not imagine any way that the default OpenLayers tools — for drawing, etc. — are going to work: the pieces that OpenLayers would need to integrate with simply don’t exist in the 3D API.

    OpenLayers — primarily being a 2D drawing client — is unlikely to ever implement something that would translate all of its various calls into Google Maps/Earth API calls.

    OpenLayers does have support for Protocols and Formats: in theory, this would allow you to use the OpenLayers WFS processing toolchain to some extent when interacting with third party APIs like the Google Earth API. However, I expect that in this case, you don’t gain sufficiently enough from this to solve your problem.

    In short: This doesn’t work, and there is no simple solution. If you want 3D, you’ll probably need to build a lot more yourself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying use the jQuery table sorter plugin for a table that is
i am trying to use tinyows for wfs-t in my app along with openlayers
Trying to use an excpetion class which could provide location reference for XML parsing,
Trying to use a guid as a resource id in a rest url but
While trying to use LINQ to SQL I encountered several problems. I have table
I' trying to use a Linq query to find and set the selected value
I trying to use ImageInfo and Jython to get information from a image on
I'm trying to use svnmerge.py to merge some files. Under the hood it uses
I've been trying to use SQLite with the PDO wrapper in PHP with mixed
I'm trying to use SQLBindParameter to prepare my driver for input via SQLPutData .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.