[Thread Prev][Thread Next][Index]
[las_users] How to change the MAP of LAS application and How Integrate the Google Map in LAS
- To: las_users@xxxxxxxx
- Subject: [las_users] How to change the MAP of LAS application and How Integrate the Google Map in LAS
- From: sandip <sandipingle21@xxxxxxxxx>
- Date: Mon, 24 Jan 2011 10:42:27 +0530
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=nPyqi0zy2JOnVPyLpUOjaubQ1wbGoOY82brvPcUEdcA=; b=rsg4+ui9eZ13Bklwz1XD93Q4tAp6jqKTEI8MYxzqWUlGQHrNRKoRA96awNKGlMRMCD s71OAFkKjT4r//EoxUqIAGwB4fVyZz+rTXe5CVhOt1CJ/JlmE3vsTmjW6/c9RmF277Ta k4PNC/5kgvJRKZjtXPFn60MgBh64M/fX/1Pb4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=vzH6p4SvUvVEXzOf7BDnl+mQAzegZEhP6CEED2e09zAw0kQ4C0ALfBC/8hoMlgJWrb RQNMtPW/q9Dit9dYR4nPjmKsPKS6QOXITsWomfskp+6akE9TUsC9W9qYzUy+5fVoPEXt 3CMTvE9PfMAS+lqOlINuelyNyxV/PVKQwRTdM=
- Sender: owner-las_users@xxxxxxxx
Hi,
Good Morning....!!!
Dear All,
I am working on LAS Application wanted to change the LAS Application Map (Some images are attached in first picture),
How change this map (from - labs.metacarta.com) and How to remove this image from LAS. Instead of this image i want to used Google Map in LAS Application.
Here is the Google Map image,
Now the my problem is that, where i have to make the change in LAS Application so that the changes will reflect. I am able to put the Map on Standalone page, But cant able to integrate it into LAS. I tried to add layers of Google Map into LASOpenlayer.js file.
small snippet of the code....
/* INIT OPENLAYERS MAP */
mapoptions0 = {
maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90),
restrictedExtent: new OpenLayers.Bounds(-180, -90, 180, 90)
};
mapoptions180 = {
maxExtent: new OpenLayers.Bounds(-400, -90, 400, 90),
restrictedExtent: new OpenLayers.Bounds(-400, -90, 400, 90)
};
this.map = new OpenLayers.Map(this.DOMNode.id, mapoptions0);
this.map.MW = this;
/* add the layers */
var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}, {wrapDateLine: true, isBaseLayer:false});
var vector = new OpenLayers.Layer.Vector("Vector Layer",{ rendererOptions : { extent : new OpenLayers.Bounds(-180, -90, 360, 90)}});
vector.events.register("sketchstarted", vector, function(evt) {evt.object.destroyFeatures();});
vector.events.register("featureadded", vector, function(evt) {
evt.object.map.selection = evt.feature.geometry.bounds;
evt.object.map.MW.extents.selection.grid.x.min = evt.feature.geometry.bounds.left;
evt.object.map.MW.extents.selection.grid.x.max = evt.feature.geometry.bounds.right;
evt.object.map.MW.extents.selection.grid.y.max = evt.feature.geometry.bounds.top;
evt.object.map.MW.extents.selection.grid.y.min = evt.feature.geometry.bounds.bottom;
evt.object.map.MW.ondraw();
evt.object.map.MW.onafterdraw();
});
vector.events.register("afterfeaturemodified", vector, function(evt) {
evt.object.map.selection = evt.feature.geometry.bounds;
evt.object.map.MW.extents.selection.grid.x.min = evt.feature.geometry.bounds.left;
evt.object.map.MW.extents.selection.grid.x.max = evt.feature.geometry.bounds.right;
evt.object.map.MW.extents.selection.grid.y.max = evt.feature.geometry.bounds.top;
evt.object.map.MW.extents.selection.grid.y.min = evt.feature.geometry.bounds.bottom;
evt.object.map.MW.ondraw();
evt.object.map.MW.onafterdraw();
});
var base = new OpenLayers.Layer.Vector("Base Layer",{isBaseLayer:true, rendererOptions : { extent : new OpenLayers.Bounds(-180, -90, 360, 90)}});
this.map.addLayers([base, wmsLayer, vector]);
this.map.addControl(new OpenLayers.Control.MousePosition());
controls = {
point: new OpenLayers.Control.DrawFeature(vector, OpenLayers.Handler.Point, {title : "point"}),
hline: new OpenLayers.Control.DrawFeature(vector, OpenLayers.Handler.HorizontalPath,{title : "hline" }),
vline: new OpenLayers.Control.DrawFeature(vector, OpenLayers.Handler.VerticalPath,{title : "vline"}),
box: new OpenLayers.Control.DrawFeature(vector, OpenLayers.Handler.RegularPolygon, { title : "box", handlerOptions: { sides: 4, irregular: true}}),
drag: new OpenLayers.Control.DragFeature(vector,{title:"map_change"}),
nav: new OpenLayers.Control.Navigation({title : "map_nav"})
};
for(var key in controls) {
this.map.addControl(controls[key]);
}
/*dateline WMS trick*/
this.map.setCenter(new OpenLayers.LonLat(0, 0), 1);
this.map.setOptions(mapoptions180);
this.map.zoomToExtent(new OpenLayers.Bounds(0, -90, 360, 90), true);
this.extents.data.grid.x.min=0;
this.extents.data.grid.x.max=360;
this.extents.data.grid.y.min=-90;
this.extents.data.grid.y.max=90;
this.extents.selection.grid.x.min=0;
this.extents.selection.grid.x.max=360;
this.extents.selection.grid.y.min=-90;
this.extents.selection.grid.y.max=90;
}
Please, can you tell me what are the ways to change the map.
--
Thanks & Regards,
Sandip Ingle,
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement