google maps - How to correctly load dependent JavaScript files -


I'm trying to expand a website page that displays Google Maps. The Google Maps API defines a class named GMMarker, which is expanded by labeled markers.

The problem is, I can properly load the lathe marker script, i.e. after the Google API load and I have no 'GMMarker defined' error.

What is the correct way to specify scripts in such situations?

I have client script of ASP.NET. Registry ClientScript included Google API URL and then immediately after the labeled marker script file.

The initial Google API loader writes further script links that load the actual GMMakers class. All those scripts must be executed before the next script block (labeled marker script).

I have tested the generated HTML and script blocks have been emitted in the correct order.

  & lt; Script src = "google api url" type = "text / javascript" & gt; & Lt; / Script & gt; ... (The above script uses documents. To add additional script blocks / sources to the script) ... ... & lt; Script src = "scripts / labelmember.js" type = "text / javascript" & gt; & Lt; / Script & gt;  

Once again, labelExter before labeling FIP is loading. JS is being executed.

I think the problem is that I'm calling google.load () in the body Was there. The script that is loading is done after loading the script. By emulating the script tag for LabeledMarker from within the Ollod handler.


Comments