Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Satellite map

Satellite map 3 Jahre 8 Monate her #62753

  • prady
  • pradys Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 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
Letzte Änderung: 3 Jahre 8 Monate her von prady.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Satellite map [SOLVED] 3 Jahre 8 Monate her #62822

  • prady
  • pradys Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 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));
Letzte Änderung: 3 Jahre 8 Monate her von prady.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Satellite map 3 Jahre 8 Monate her #62823

  • tpartner
  • tpartners Avatar
  • ONLINE
  • LimeSurvey Team
  • Beiträge: 4582
  • Dank erhalten: 903
  • Karma: 402
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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Satellite map 3 Jahre 8 Monate her #62826

  • prady
  • pradys Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 14
  • Karma: 0
Thanks!!!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Satellite map 1 Jahr 3 Monate her #101906

  • velvetmonster
  • velvetmonsters Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 4
  • Dank erhalten: 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
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Satellite map 3 Wochen 6 Tage her #117073

  • c_schmitz
  • c_schmitzs Avatar
  • ONLINE
  • LimeSurvey Team
  • Beiträge: 852
  • Dank erhalten: 124
  • Karma: 95
Unfortunately the solutions offered so far do require a change of the core files.
In case of a version update they will be gone, nor does everyone have the ability to change the core files by themselves.

The following codelines can be put into the template.js file (which can be edited by a normal LimeSurvey administrator) and adjusted as seen fit.
$(document).ready(function(){
 
    $.each(gmaps, function( mapid, map ) {
        if (mapid.indexOf("marker")==-1)
            map.setMapTypeId(google.maps.MapTypeId.HYBRID);
    });
 
});
 

In this example the map type is set to hybrid. That way only the survey using the particular template is affected. Valid values are

HYBRID Displays a photographic map + roads and city names
ROADMAP Displays a normal, default 2D map
SATELLITE Displays a photographic map
TERRAIN Displays a map with mountains, rivers, etc.
Support us, too. Donate to the LimeSurvey project and help keep us going!
Letzte Änderung: 3 Wochen 6 Tage her von c_schmitz.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: OMN

Satellite map 3 Wochen 6 Tage her #117076

  • OMN
  • OMNs Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 1
  • Karma: 0
Tested here, working perfectly. Thanks Schmitz.
Ouassim Manout
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.167 Sekunden
Donation Image