0

I am playing with writing a little javascript solution that would take place on mars. I would love to have the output result in a google map of a lat and long on Mars. Any thoughts? Can the following concept BE called for a location on the red planet?

`map = new google.maps.Map();`

I see stuff in the API that indicates this at lease WAS doable in v.2, but I don't know if that survived, and can't seem to scare anything relevant up to tell me if this is a possibility or a dead end.

For Earth, this looks straight forward enough.

var map;
function initMap() {
  map = new google.maps.Map(document.getElementById('map'), {
    center: {lat: -34.397, lng: 150.644},
    zoom: 8
  });

 var markerTest = {lat: -34.397, lng: 150.644};

  var marker = new google.maps.Marker({
    position: markerTest,
    map: map
  });
}

Here's an Fiddle example: https://jsfiddle.net/chakra5/qx3r12xk/

Many thanks in advance for any and all brainstorming.

Jon Silver
  • 11
  • 1
  • 1
    There is an example of a map of the Moon [in the documentation](https://developers.google.com/maps/documentation/javascript/examples/maptype-image). So yes it is possible. – geocodezip Jan 11 '18 at 00:31
  • 1
    http://googlemaps.github.io/js-samples/planetary-maptypes/planetary-maptypes.html (see Mars types) – geocodezip Jan 11 '18 at 00:38
  • Thanks for your response geocodezip! This is promising, and I'll poke it a little to see if it does what I'm after. Much appreciated! – Jon Silver Jan 11 '18 at 02:37
  • update: this rocked. I'm off and running. Thank you! – Jon Silver Jan 11 '18 at 04:10

0 Answers0