$title = $path->displayTitle;
$this->view->path = $path;
$geomform->geom_title->setValue($path->title);
- $geomform->geom_data->setValue((string)$path->geom);
$loginform->login_geom_id->setValue((string)$path->id);
+ $jsgeom = new phptojs\JsObject('gInitialGeom', array('data' => (string) $path->geom));
+ $this->view->headScript()->prependScript((string) $jsgeom);
} else {
$geomform->setAction('path');
$extent = new phptojs\JsObject('gMaxExtent', $this->_helper->syjGeoip($this->getRequest()->getClientIp(true)));
this.messenger.hide();
}
- if ($("geom_data").value) {
- this.viewLayer.addFeatures([this.wkt.read($("geom_data").value)]);
+ if (typeof gInitialGeom !== "undefined" && typeof gInitialGeom.data !== "undefined") {
+ this.viewLayer.addFeatures([this.wkt.read(gInitialGeom.data)]);
extent = this.viewLayer.getDataExtent();
// XXX: ie has not guessed height of map main div yet during map
// initialisation. Now, it will read it correctly.