Select to view content in your preferred language

why gmaps.GoogleMapsLayer() cannot be added as a layer to a map in intranet?

803
3
08-09-2011 05:14 AM
YardenCochav
Deactivated User
Hi all,
I am spending couple of days to add go GoogleMapsLayer to the map but I got exception on map.addLayer(new gmaps.GoogleMapsLayer({visible: false})).
Is there a restriction by Google when accessing the gmaps api through internal network?
Why the example in http://gmaps-utility-gis.googlecode.com/svn/tags/gmapslayer/1.0a/examples/gmapslayer.html
working fine, but when I save the html example to my computer on the internal network, the example doesn't work.

Thanks for any assistance
Regards,
Yarden
0 Kudos
3 Replies
JeffPace
MVP Alum
Hi all,
I am spending couple of days to add go GoogleMapsLayer to the map but I got exception on map.addLayer(new gmaps.GoogleMapsLayer({visible: false})).
Is there a restriction by Google when accessing the gmaps api through internal network?
Why the example in http://gmaps-utility-gis.googlecode.com/svn/tags/gmapslayer/1.0a/examples/gmapslayer.html
working fine, but when I save the html example to my computer on the internal network, the example doesn't work.

Thanks for any assistance
Regards,
Yarden


If you look at the source of that sample, the path to the google js file is relative


<script type="text/javascript" src="../src/gmapslayer_compiled.js">


you likely need to change that to a full path if you arent hosting that file
try changing it to


<script type="text/javascript" src="http://gmaps-utility-gis.googlecode.com/svn/tags/gmapslayer/1.0a/src/gmapslayer_compiled.js">
0 Kudos
StephenLead
Honored Contributor
Note that Google don't allow the use of their maps on an intranet site without paying for a premier license.

http://code.google.com/apis/maps/terms.html says:


9.1.1 General Rules.

(b) Public Access (No Firewall). Your Maps API implementation must not (i) operate only behind a firewall; or (ii) only on an internal network (except during the development and testing phase); or (iii) in a closed community (for example, through invitation-only access).
0 Kudos
YardenCochav
Deactivated User
Thanks you so much.
Your answers solve my problem!
0 Kudos