PDA

View Full Version : googlemap with geoserver and extjs4 wierd interaction



arpho
29 Aug 2013, 2:04 AM
Hi, in my application I am using a googlemap as base-layer and four different layers coming from geoserver that acts as wms provider, with openlayersto put all togheter , everything is ok, as fare I do not import ext-all-debug.js in my html file, when I import it, I can see all my layers over the base-layer with an offset, that disappear after I switch firebug, if you want to see the mapping part of my code, it is visible at http://pastebin.com/rn9xQbke, but this works well as far ext-all-debug is not imported, so I imagine there is a sort of interaction between ext-all-debug and my code, this is my index.html:

<html lang="it-IT">
<head>
<title>MMASGIS 5-gmapped</title>
<link rel="stylesheet" href="extjs/resources/css/ext-all.css">
<script type="text/javascript" src="javascripts/encryption.js"></script>
<script src="extjs/ext-all.js"></script>
<link rel="stylesheet" href="stylesheets/style.css">
<script type="text/javascript" src="app/model/Utente.js"></script>
<script type="text/javascript" src="javascripts/constants.js"></script>
<link rel="stylesheet" type="text/css" href="style/ux/gritter/css/ext-growl.css" />
<script type="text/javascript" src="javascripts/ux/ext-growl.js"></script>
<script type="text/javascript" src="javascripts/model/user.js"></script>
<script type="text/javascript" src="app/model/Pv.js"></script>
<script type="text/javascript" src="app/model/Census.js"></script>
<script type="text/javascript" src="app/store/census.js"></script>
<script type="text/javascript" src="app/view/Census.js"></script>
<script type="text/javascript" src="app/model/attribute.js"></script>
<script type="text/javascript" src="app/store/Pv.js"></script>
<script type="text/javascript" src="app/store/memoryStoreGenerator.js"></script>
<script type="text/javascript" src="app/view/Login.js"></script>
<script type="text/javascript" src="app/view/Pv.js"></script>
<script type="text/javascript" src="app/view/Attribute.js"></script>
<script type="text/javascript" src="app/view/anagrafica.js"></script>
<script type="text/javascript" src="app/view/filterTab.js"></script>
<script type="text/javascript" src="app/view/Filter.js"></script>
<script type="text/javascript" src="app/view/filterGridMaker.js"></script>
<script type="text/javascript" src="locals/it.js"></script>
<script type="text/javascript" src="mmasgis.js"></script>
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
<script type="text/javascript" src="http://openlayers.org/api/OpenLayers.js"></script>
</head>
<body>
<div style="width:79.5%; height:100%" id="map"></div>
<script defer="defer" type="text/javascript" src='hw.js'>

</script>

</body>
</html>


initially I thought that the order of importing could matter, but is not, the only way to eliminate the offset is not importing extjs, could enlight me over this problem? what is wrong? thanks in advance

arpho
2 Sep 2013, 8:31 PM
I solved, I put all my code inside an ext.onReady function and now it works