close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Multiple Pages/Maps in one directory

Thread began 12/02/2009 9:26 am by ztechinc282425 | Last modified 12/04/2009 12:35 pm by Jason Byrnes | 1470 views | 9 replies |

ztechinc282425

Multiple Pages/Maps in one directory

I would like to setup 4-html pages in the same directory. Each to have their own unique map with a single point.

Since I know the GMP process stores everything in the google_javascript subdir it creates in the dir with the html page, how do I get the 4-pages to not overlay this code/directory?

Sign in to reply to this post

Jason ByrnesWebAssist

Each page will have a unique js file created for it in the google_javascript directory.


For the first map, a file named wagmp_map_1.js will be created. The second map will create a file named wagmp_map_2.js for each map the number will increment.

Sign in to reply to this post

ztechinc282425

Originally Said By: Jason Byrnes
  Each page will have a unique js file created for it in the google_javascript directory.


For the first map, a file named wagmp_map_1.js will be created. The second map will create a file named wagmp_map_2.js for each map the number will increment.  



Great. Thanks. I guess I should have just tried it.

Sign in to reply to this post

ztechinc282425

Well, I did just try this and it doesn't work.

Every map after the first one, does not load.

After creating the second page with a new map, in the same directory, the google_javascript directory now has the _2 file and the wagmp_maps.js file is changed to:

window.onunload = function() {
GUnload();
}

/*wagmp_onload*/
if(window.wagmp_map_2) wagmp_map_2();
if(window.wagmp_map_1) wagmp_map_1();

The second page with a map does not load the map.

Go here for the first page that works:
Cracker_Barrel_Breakfast.htm

Then the second page, that does not work:
Cracker_Barrel_Breakfast_1208.htm

Yes, I triple-checked that the google_javascript directory has been uploaded/refreshed and I cleared my browser cache.

Originally Said By: ztechinc282425
  Great. Thanks. I guess I should have just tried it.  
Sign in to reply to this post

gruant2000381341

I can see the map on both of those links...one 4 chester one for mech.

Sign in to reply to this post

ztechinc282425

I just fixed it with my changes (see following post).

Originally Said By: gruant2000381341
  I can see the map on both of those links...one 4 chester one for mech.  
Sign in to reply to this post

Jason ByrnesWebAssist

That change may have worked, but is not necessary, there is something else going wrong.

I have created plenty of maps in the same site and had them work correctly, I can guarantee you that there is not a problem in tool that is causing this.


To get to the real cause of the problem, I would need to be able to see the issue in the browser.

Sign in to reply to this post

ztechinc282425

Well, we reworked all the pages by hand.

How is it supposed to work? Should the process create multiple "_maps" files that point to the individual "map_?" files?

Is there supposed to be multiple "if(window.wagmp_map_?) wagmp_map_?();" statements in the "_maps" file?

I am not a Javascript coder so I don't understand the language, but aren't these statements supposed to test if a file exists and then run/load it? If so, how does it know which one to load.

If needed, I can create a new set of files/maps in a different directory, since these pages have gone live (another helper modified the code to make it so that we don't have to have multiple pages - it just switches the map - a cool idea for the next release of GMP).

Originally Said By: Jason Byrnes
  That change may have worked, but is not necessary, there is something else going wrong.

I have created plenty of maps in the same site and had them work correctly, I can guarantee you that there is not a problem in tool that is causing this.


To get to the real cause of the problem, I would need to be able to see the issue in the browser.  
Sign in to reply to this post

Jason ByrnesWebAssist

Pro maps will create one wagmp_maps.js file. this will have a line in it for each map that is created.

For each map that is created, it will create a wagmp_map_<int>.js file. <int> is a variable that will start at 1 and increment for each map you create.

On the page, to display the map, there will be a div created as the map place holder:
<div id="wagmp_map_<int>" style="width: 300px; height: 300px;"></div>


the id of the div "id="wagmp_map_<int>"" along with the JS include line:
<script type="text/javascript" src="google_javascript/wagmp_map_<int>.js">/*wagmp*/</script>

control which map is loaded.


The code in the wagmp_maps.js:
if(window.wagmp_map_<int>) wagmp_map_<int>();


is testing for the div ID on the page, and loading the corresponding map.

Sign in to reply to this post

ztechinc282425

Well, I figured out how to make it work, but you guys need to fix it.

I created a separate wagmp_maps_2.js file with a single entry for the _map file it needs:
if(window.wagmp_map_2) wagmp_map_2();

and changed the page to point to this "maps" file.

Now it works.

Originally Said By: ztechinc282425
  Well, I did just try this and it doesn't work.

Every map after the first one, does not load.

After creating the second page with a new map, in the same directory, the google_javascript directory now has the _2 file and the wagmp_maps.js file is changed to:

window.onunload = function() {
GUnload();
}

/*wagmp_onload*/
if(window.wagmp_map_2) wagmp_map_2();
if(window.wagmp_map_1) wagmp_map_1();

The second page with a map does not load the map.

Go here for the first page that works:
Cracker_Barrel_Breakfast.htm

Then the second page, that does not work:
Cracker_Barrel_Breakfast_1208.htm

Yes, I triple-checked that the google_javascript directory has been uploaded/refreshed and I cleared my browser cache.  
Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...