Mercurial > hg > ChinaGisRestApi
comparison gis_gui/blocks/map.js @ 234:6e6e78adb447
show line and polygon-layer
author | fknauft |
---|---|
date | Mon, 05 Sep 2011 11:35:01 +0200 |
parents | 0a3303682712 |
children | ed0cb46fb936 |
comparison
equal
deleted
inserted
replaced
233:bdab16f83512 | 234:6e6e78adb447 |
---|---|
182 paramstr += "&connect_line="+params.connect_line; | 182 paramstr += "&connect_line="+params.connect_line; |
183 } | 183 } |
184 var layerurl = "../db/RESTdb/db/public/" + escape(params.table) + "?" + paramstr; | 184 var layerurl = "../db/RESTdb/db/public/" + escape(params.table) + "?" + paramstr; |
185 jQuery.get(layerurl, function (data, textStatus, XMLHttpRequest) { | 185 jQuery.get(layerurl, function (data, textStatus, XMLHttpRequest) { |
186 // function after load kml url finished | 186 // function after load kml url finished |
187 console.debug("kml url loaded! this=", this, " data=", data, " ("+typeof(data)+")"); | 187 console.debug("kml url loaded! this=", this ); |
188 console.debug(" data=", data ); | |
189 console debug(" data type="+typeof(data)); | |
188 if (typeof(data) == "string") { | 190 if (typeof(data) == "string") { |
189 var kmlURL = data; | 191 var kmlURL = data; |
190 } else { | 192 } else { |
191 // broken, what now? | 193 // broken, what now? |
192 return; | 194 return; |
193 } | 195 } |
194 // render layer | 196 // render layer |
195 if (google != null) { | 197 if (google != null) { |
196 var newMarker=new google.maps.KmlLayer(kmlURL); | 198 var newMarker=new google.maps.KmlLayer(kmlURL); |
197 console.debug("new marker layer=",newMarker," map=",map); | 199 console.debug("new marker layer=",newMarker); |
200 console.debug(" map=",map); | |
198 newMarker.setMap(map); | 201 newMarker.setMap(map); |
202 console.debug("Map-Update finished"); | |
199 } | 203 } |
200 }); | 204 }); |
201 } | 205 } |
202 }; | 206 }; |
203 | 207 |