I installed this very nice module and all worked fine.
After setting up my first direction I got shown the directions listed
but where the map should appear there is a blank field with the
dimensions of the map and it say’s “Javascript is required to view
this map.”
I verified that I have javascript enabled on my browser (other gmaps
are shown without any problem) I searched a while and could find out
that the data for the map is filled in after the the call for the map
in source code on the website it looks like this
<div style="width: 100%; height: 600px;"
id="gmap-my-map-gmap0"
class="gmap-control gmap-gmap gmap gmap-map gmap-my-map-gmap gmap-processed">
Javascript is required to view this map.
</div>
And then comes
<script type="text/javascript">
/* <![CDATA[ */ jQuery.extend(true, Drupal, { settings: { "gmap": { "my-map": {"width":"100%", "height": "600px", "zoom": 10, "maxzoom": "14", "controltype":
"Small", "align": "None", "maptype": "Map", "mtc": "standard","baselayers":{ "Map": 1, "Satellite": 1, "Hybrid": 1 }, "styles": { "line_default":
["0000ff", "5", "45", "", "" ], "poly_default": [ "000000", "3", "25", "ff0000", "45" ] }, "line_colors": [ "#00cc00", "#ff0000", "#0000ff" ],
"behavior": { "locpick": false, "nodrag": 0, "nokeyboard": 1, "nomousezoom": 0, "nocontzoom": 0, "autozoom": 0, "dynmarkers": 0, "overview": 0,
"collapsehack": 0, "scale": 0 }, "markermode": "1", "id": "my-map", "latitude": "51.9836", "longitude": "7.8852", "shapes": [ { "type": "line",
"points": [ [ "52.0059", "7.90506" ], [ "52.004", "7.90468" ], .... more data ..... [ "51.9642", "7.86181" ], [ "51.9638", "7.86046" ], [ "51.9637",
"7.85994" ], [ "51.9637", "7.8597" ] ], "style": [ "ff0000", 5, 80, "00ff00", 60 ] } ] } } } });
/* ]]*/
</script>
JavaScript is definitely turn on in my browser because other JavaScript functions work without any problem
What is wrong on my site
Thanks for any help in advance
Georg
Comments
Comment #1
jurgenhaasWhen viewing a map in gmap_direx, the module write the following content into the page:
After the page got loaded, the JavaScript in gmap.js (which comes from the GMap module and is not ours) finding the id gmap-my-map-gmap0 and replaces and loads the corresponding map from Google and replaces the text "Javascript is required to view this map." by the map itselve.
So, if the text remains visible, it means that the module Gmap is doing something wrong.
Comment #2
gording commentedHi jurgenhass,
I verified that the gmap.js is loaded within the header.
the following script files are loaded
so as you explained it has to be thomthing else.
Thanks for your help
Georg
Comment #3
jurgenhaasIt's probably a good guess that the GMap module isn't configured properly. E.g. have you defined your Google Maps API key? Are you seeing a map when you're going to admin/settings/gmap on your site? The system is using the exact same syntax to display a map which is described in #1 above.
Comment #4
gording commentedHallo jurgenhass
yes I did set up the google maps api key, and as well the map is showing up on the settings page and on other pages where I show maps like content location, user location and so on.
So this is what I wonder about why the map is not displayed but I´m getting a bit closer. I tryed to put out a gmap macro in to your code to see if this map will be displayed. So I put this code at line 140 in to your code and tryed what happen
but still no map that meens you are right that the map is not coded via js but question now is why because the gmap js is loaded in the head
and that means that as well the gmap macro should be displayed on this side or am I wrong here
Georg
Comment #5
jurgenhaasI'm note sure this is a gmap_direx issue. This module write the same code into html as the gmap module does itselve by using the theme("gmap") function and hopefully someone from the gmap module is able to help us here to find out why this is misinterpreted in your website where it works perfectly fine at others.
Therefore I've assigned this to the gmap module issue queue asking for help.
Comment #6
gording commentedThanks for your help,
would you have a site for me where I can see a working version
Comment #7
jurgenhaasPlease go to http://www.paragon-es.de and login as stormdashboarddemo with the password being the last 4 characters of the username.
Comment #8
gording commentedHallo jurgenhaas
thanks for the login I found the working version on your site. There are a few js files which are not on my site I´m going to find out if this is the reason why my map is not displayed.
As son as I have any result I will let you know.
Georg
Comment #9
johnvClosing this very old issue. Please reopen if it is still valid.