Welcome, Guest
Username: Password: Remember me

TOPIC: Satellite map

Satellite map 3 years 4 months ago #62753

  • prady
  • prady's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
Hi, I'm trying to set up the mapping service to display a satellite or hybrid view... can anybody help me?

Thanks in advance!

Nicola
Last Edit: 3 years 4 months ago by prady.
The administrator has disabled public write access.

Re: Satellite map [SOLVED] 3 years 4 months ago #62822

  • prady
  • prady's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
Solved:
In survey_runtime.js
I added this string:

map.setMapType(G_HYBRID_MAP);

after this one

var map = new GMap2(document.getElementById("gmap_canvas_" + question));
Last Edit: 3 years 4 months ago by prady.
The administrator has disabled public write access.

Re: Satellite map 3 years 4 months ago #62823

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4364
  • Thank you received: 827
  • Karma: 381
You can add map controls or set the default map type in scripts/survey_runtime.js.

Find this line:
map.addControl(new GSmallMapControl());

And insert this line after it:
map.addControl(new GMapTypeControl());

To set the default map type, add this line next:
map.setMapType(G_SATELLITE_MAP);

The most common map types are:
- G_NORMAL_MAP displays the default road map view.
- G_SATELLITE_MAP displays Google Earth satellite images.
- G_HYBRID_MAP displays a mixture of normal and satellite views.
- G_PHYSICAL_MAP displays a physical map based on terrain information.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Satellite map 3 years 4 months ago #62826

  • prady
  • prady's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
Thanks!!!
The administrator has disabled public write access.

Re: Satellite map 1 year 1 day ago #101906

  • velvetmonster
  • velvetmonster's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Thank you received: 1
  • Karma: 0
The code has changed.

Here is the current method for updating from ROADMAP to HYBRID:

Change this:

mapTypeId: google.maps.MapTypeId.ROADMAP

to this:

mapTypeId: google.maps.MapTypeId.HYBRID
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.118 seconds
Donation Image