Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

Google maps with image overlap In Cordova / Phonegap

cordova phonegap mobile app google maps overlay

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1 dammarpol


    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 02 September 2014 - 04:05 AM

I'm creating an app in Cordova/Phonegap. I want to add Google Maps with image overlay. I include script with map in MapView.js:


InitializeMap.js code is here: http://pastebin.com/TqjE4CVm

As the result application displays just grey div which should contain map with overlay but there is no image neither map.

In Chrome console i get:

Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened.

I want also to add that normal map without overlay works with following code:http://pastebin.com/vgtgUzSP .

How can I solve it? 

#2 BlackRabbit


    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts

Posted 02 September 2014 - 11:26 PM

The error message is pointing out the problem.

getscript is not the way, intiailize the map by calling the API functions the regular way, else you will have that synchronicity problem.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download