SyntaxError: '' literal not terminated before end of script

  • clever
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #12478 by clever
Hi,

I'm trying to add three maps inside a custom module using the plugin but none is visible and this is the error I get in the Firefox console:

SyntaxError: '' literal not terminated before end of script for line 753 of my site, which is the last line of this script part:
Code:
<script type="text/javascript">/*<![CDATA[*/ var map_mod_custom_content__0_1_map, infowindow_mod_custom_content__0_1_map; var latlng_mod_custom_content__0_1_map, routeaddress_mod_custom_content__0_1_map; var zhgmObjMgr_mod_custom_content__0_1_map; var routedestination_mod_custom_content__0_1_map, routedirection_mod_custom_content__0_1_map; var mapzoom_mod_custom_content__0_1_map; var infobubblemarkers_mod_custom_content__0_1_map = []; var userContactAttrs = 'name,position,address,phone,mobile,fax,email'; var icoIcon='http://dev.unfallservice-leinweber.de/administrator/components/com_zhgooglemap/assets/icons/'; var icoUtils='http://dev.unfallservice-leinweber.de/administrator/components/com_zhgooglemap/assets/utils/'; var icoDir='administrator/components/com_zhgooglemap/assets/icons/'; zhgmObjMgr_mod_custom_content__0_1_map = new zhgmMapObjectManager(); zhgmObjMgr_mod_custom_content__0_1_map.setMapID(1); zhgmObjMgr_mod_custom_content__0_1_map.setPlacemarkList(""); zhgmObjMgr_mod_custom_content__0_1_map.setExcludePlacemarkList(""); zhgmObjMgr_mod_custom_content__0_1_map.setPlacemarkGroupList(""); zhgmObjMgr_mod_custom_content__0_1_map.setPlacemarkCategotyList(""); zhgmObjMgr_mod_custom_content__0_1_map.setPathList(""); zhgmObjMgr_mod_custom_content__0_1_map.setExcludePathList(""); zhgmObjMgr_mod_custom_content__0_1_map.setPathGroupList(""); zhgmObjMgr_mod_custom_content__0_1_map.setPathCategotyList(""); zhgmObjMgr_mod_custom_content__0_1_map.setUserMarkersFilter("0"); zhgmObjMgr_mod_custom_content__0_1_map.setMapLanguageTag(""); zhgmObjMgr_mod_custom_content__0_1_map.setServiceDirection(0); zhgmObjMgr_mod_custom_content__0_1_map.setIcoIcon(icoIcon); zhgmObjMgr_mod_custom_content__0_1_map.setIcoUtils(icoUtils); zhgmObjMgr_mod_custom_content__0_1_map.setIcoDir(icoDir); zhgmObjMgr_mod_custom_content__0_1_map.setArticleID("_mod_custom_content__0_1_map"); zhgmObjMgr_mod_custom_content__0_1_map.setPlacemarkRating(0); zhgmObjMgr_mod_custom_content__0_1_map.setPlacemarkTitleTag("h2"); zhgmObjMgr_mod_custom_content__0_1_map.setRequestURL("http://dev.unfallservice-leinweber.de/"); zhgmObjMgr_mod_custom_content__0_1_map.setPlacemarkCreationInfo(0); zhgmObjMgr_mod_custom_content__0_1_map.setFeature4Control(2); zhgmObjMgr_mod_custom_content__0_1_map.setPanelInfowin(0); zhgmObjMgr_mod_custom_content__0_1_map.setContactAttrs("name,position,address,phone,mobile,fax,email"); zhgmObjMgr_mod_custom_content__0_1_map.setUserContact(0); zhgmObjMgr_mod_custom_content__0_1_map.setUserUser(0); function initializemod_custom_content__0_1_map() { var markerCluster0; zhgmObjMgr_mod_custom_content__0_1_map.GroupStateDefine(0, 1); var pathArray0 = []; var toShowLoading = document.getElementById("GMapsLoading_mod_custom_content__0_1_map"); toShowLoading.style.display = 'block'; latlng_mod_custom_content__0_1_map = new google.maps.LatLng(50.8387855, 8.7701257); routedirection_mod_custom_content__0_1_map = 1; routeaddress_mod_custom_content__0_1_map = ""; routedestination_mod_custom_content__0_1_map = latlng_mod_custom_content__0_1_map; mapzoom_mod_custom_content__0_1_map =14; var myOptions = { center: latlng_mod_custom_content__0_1_map, zoom: mapzoom_mod_custom_content__0_1_map, gestureHandling: 'cooperative', draggable: true , mapTypeId: google.maps.MapTypeId.ROADMAP, zoomControl: true, zoomControlOptions: { position: google.maps.ControlPosition.LEFT_CENTER }, mapTypeControl: true, mapTypeControlOptions: { mapTypeIds: [ google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.TERRAIN, google.maps.MapTypeId.SATELLITE, google.maps.MapTypeId.HYBRID ], position: google.maps.ControlPosition.TOP_RIGHT , style: google.maps.MapTypeControlStyle.DEFAULT }, disableDoubleClickZoom: true, scaleControl: false, streetViewControl: true, streetViewControlOptions: { position: google.maps.ControlPosition.LEFT_TOP }, rotateControl: false }; map_mod_custom_content__0_1_map = new google.maps.Map(document.getElementById("GMapsID_mod_custom_content__0_1_map"), myOptions); infowindow_mod_custom_content__0_1_map = new google.maps.InfoWindow(); zhgmObjMgr_mod_custom_content__0_1_map.setMap(map_mod_custom_content__0_1_map); zhgmObjMgr_mod_custom_content__0_1_map.setInfowin(infowindow_mod_custom_content__0_1_map); var geocoder_mod_custom_content__0_1_map = new google.maps.Geocoder(); var contentString_mod_custom_content__0_1_map = '<div id="placemarkContent" class="placemarkContent" >' + '<h2 id="headContent" class="placemarkHead">Marburg'+ '<div id="bodyContent" class="placemarkBody">'+ ''+ '</script>

Everything is up to date / on the latest version:

dev.unfallservice-leinweber.de

Any ideas?

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #12479 by Dima
Hi.
Check on the other template.
I think it will be OK.
Check my forum, on some templates there is plugin, which breaks code (it removes closing ' on line with script tag.
Like in Roket theme

Don't forget support my developments: post review in JED , donate , help with translation ;)
The following user(s) said Thank You: clever

Please Log in or Create an account to join the conversation.

  • clever
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #12480 by clever
You're right...on a standard template it works.
On the other hand ZH GoogleMap works fine via Menu item or module...only the plugin leads to that error.
Unfotunaltely I can't switch template, so i'll have to implement the maps in a different way.

Thanks for your support.

Please Log in or Create an account to join the conversation.

Time to create page: 0.177 seconds
Powered by Kunena Forum