Skip to main content

Google Earth widget not working in 1.6.3

4 replies [Last post]
csmith_oopscope
Offline
Joined: 2004-04-05
Points: 0

I updated to NB jMaki plugin 1.6.3 and now the google earth sample does not work as advertised... I get the google popup warning stating that the API key is registered to another server. I created a key for the http://localhost:8084/ (and other variations on the URL) and updated config.jason but same problem.

I also get a js error:

Error loading jmaki.widgets.google.map.Widget : id=google_map3
Script: http://localhost:8084/dispatch/resources/google/map/component.js (line:15).
Message: G_SATELLITE_TYPE is not defined

This was working with the original manual install from the jMaki site.

Any one solved this one?

Thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
csmith_oopscope
Offline
Joined: 2004-04-05
Points: 0

More diging:

The google configuration is still in config.jason, however the apikeys have been moved to a cross reference array for URL to key defined in the "apikeys" section.

Unfortunatly entering a key generated for my server http://localhost:8084/dispatch does not solve the problem.

Anyone have other thoughts?

gmurray71
Offline
Joined: 2003-07-31
Points: 0

The URL for the API key that is used needs to match the top directory where the widget is being used. If you are deploying from the root of your web server try:

{"url" : "http://localhost:8084/",
"key" : "YOUR_API_KEY"
}

If you are not sure about the root directory look at the page source for something like:

You can see the jmaki.webRoot here. The key you use (if from the widget is in the top directory will be the jmaki.webRoot with a slash after it.

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Oh and one more thing. The reason the key is not being appended is because there was not a matching API key with the correct URL in your config.json.

csmith_oopscope
Offline
Joined: 2004-04-05
Points: 0

Just an update to the G_SATELLITE_TYPE error: This is due to a spelling error in the widget.jason as delivered in the NB update:

SATALITE should be SATELLITE in all places:

Here is corrected version:

{'name': 'Map',
'type': 'Google',
'version': '.8',
'image' : 'images/google-map.jpg',
'description': 'A configurable map.',
'args': [
{'zoom':{'type':'NUMBER', 'defaultValue': '13', 'description': 'The map zoom.'}},
{'centerLat':{'type':'NUMBER', 'defaultValue': 37.4041960114344, 'description': 'The center latititude.'}},
{'centerLon':{'type':'NUMBER', 'defaultValue': -122.008194923401, 'description': 'The center longitude.'}},
{'mapType':{'type':'STRING', 'defaultValue': 'SATELLITE', 'values': [['Hybrid','HYBRID'],['Regular','REGULAR'],['Satellite','SATELLITE']], 'description': 'The view to use.'}},
{'height':{'type':'NUMBER', 'defaultValue': 320, 'description': 'A static height.'}},
{'width':{'type':'NUMBER', 'defaultValue': 500, 'description': 'A static width.'}}
]
}

It appears that the configuration file has been moved to the google/map/widget.jason from the rather un-intuative yahoo/config.jason. This may be the cause of the API key error as well. The generated page/script is missing the value for the key= attribute:

I will try some of the obvious fixes, but if anyone gets a light going off - please help me to save some time.

Thanks