Hi all,
I am trying to create custom widget for Google Map in maqetta. I created required files(.js, _oam) & added their references in widgets.json, widgetPalette.json files.
I am getting this error in
dojox.geo.openlayers._base.js line no. 43.
ReferenceError: OpenLayers is not defined
This is my
Map2.js file code.
define("dojox/mobile/Map2", [
"dojo/_base/declare",
"dijit/_WidgetBase",
"dijit/_Contained",
"dijit/_Container",
"dojox/geo/openlayers/Map"
]
, function(declare, WidgetBase, Contained, Container, Map){
return declare("dojox.mobile.Map2", [WidgetBase, Container, Contained],{
map:null,
constructor: function (){
},
buildRendering: function(){
this.domNode = this.srcNodeRef || domConstruct.create(this.tag);
this.map = new Map(this.domNode,{baseLayerType : dojox.geo.openlayers.BaseLayerType.GOOGLE});
this.map.fitTo([ -160, 70, 160, -70 ]);
this.inherited(arguments);
}
});
});
Map2_oam.js{
"id": "http://dojotoolkit.org/dojox/mobile/Map2",
"name": "dojox.mobile.Map2",
"spec": "1.0",
"version": "1.7",
"require": [
{
"type": "javascript-module",
"format": "amd",
"src": "dojox/mobile",
"$library": "dojo"
},
{
"type": "javascript-module",
"format": "amd",
"src": "dojox/mobile/deviceTheme",
"$library": "dojo"
},
{
"type": "javascript-module",
"format": "amd",
"src": "dojox/mobile/compat",
"$library": "dojo"
},
{
"type": "javascript-module",
"format": "amd",
"src": "dojox/mobile/Map2",
"$library": "dojo"
}
],
"library": {
"dojo": {
"src": "../../../dojo/dojo.js"
}
},
"property": {
},
"content": "<div></div>",
"title": {
"type": "text/html",
"value": "<p> Map for google Maps. </p>"
},
"description": {
"type": "text/html",
"value": "<p>Map for google Maps.</p>"
}
}
Where can i add OpenLayers, Google scripts. (
Ref). I added these scripts in
maqetta.client.orion/WebContent/pagedesigner.html but how to add them in silhouette iframe.
Is there any widget exists where can I use it to show google maps on drag & drop of it, allow the user to add pointers on maps with message?
Thanks in advance.