改写一段代码,delphi+mapx,高手请进,顷分相送,不够再加!! 高手请加我qq:11676870在线等!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 procedure TMainForm.SpeedButton7Click(Sender: TObject);varmj1 : integer;mj2 : integer;zj1 : integer;zj2 : integer;ssql: string;searchFeatures : Features;EsearchFeatures : Features;wid:string;beginmj1 := integer(txtmj1.Text);mj2 := integer(txtmj2.Text);zj1 := integer(txtzj1.Text);zj2 := integer(txtzj2.Text); if mj1 > mj2 then mj1 := integer(txtmj2.Text); mj2 := integer(txtmj1.Text); if zj1 > zj2 then zj1 := integer(txtzj2.Text); zj2 := integer(txtzj1.Text);g_Title := '查询结果:';Map1.Layers.ClearSelection;ssql := 'select 组名,户编号 from TENANCY where 1=1 ';if txtssqy.Text <> '' then ssql := ssql + ' and 所属区域 = ' + QuotedStr(txtssqy.Text);if txtlxr.Text <> '' then ssql := ssql + ' and 联系人 = ' + QuotedStr(txtlxr.Text);if txtlxfs.Text <> '' then ssql := ssql + ' and 联系方式 = ' + QuotedStr(txtlxfs.Text);if txtlxdz.Text <> '' then ssql := ssql + ' and 联系地址 = ' + QuotedStr(txtlxdz.Text);if txthx.Text <> '' then ssql := ssql + ' and 户型 = ' + QuotedStr(txthx.Text);if txtlc.Text <> '' then ssql := ssql + ' and 楼层 = ' + QuotedStr(txtlc.Text);if txtwz.Text <> '' then ssql := ssql + ' and 位置 = ' + QuotedStr(txtwz.Text);if (txtmj1.Text <> '') and (txtmj2.Text <> '') then ssql := ssql + ' and 面积 > ' + string(mj1) + ' and 面积 < ' + string(mj2) ;if (txtzj1.Text <> '') and (txtzj2.Text <> '') then ssql := ssql + ' and 租金 > ' + string(zj1) + ' and 租金 < ' +string(zj2);if txtfwss.Text <> '' then ssql := ssql + ' and 房屋设施 = ' + QuotedStr(txtfwss.Text);ShowMessage(ssql);adoSearch.Close;adoSearch.sql.Clear;adoSearch.sql.Add(ssql);adoSearch.Open;if not adoSearch.Eof thenbegin adoSearch.First; searchFeatures := searchLayer.NoFeatures; EsearchFeatures := searchLayer.AllFeatures; while not adoSearch.Eof do begin wid:=adoSearch.fieldbyname('组名').asstring + adoSearch.fieldbyname('户编号').AsString; try searchFeatures.Add(VsearchLayer.Search('GID="' + wid + '"')); except on Exception do end; adoSearch.Next; end; if searchFeatures.Count <> 0 then begin VsearchLayer.selection.add(searchFeatures); g_ftrs := searchFeatures; Self.dxDockSiteMain.ShowingControl := nil; startTime := Now; FlashTimer.Interval := myinifile.ReadInteger('FLASH', 'TimerInterval', 200); flashTimer.Enabled := true; end else Application.MessageBox('地图上没有相关的户信息.','搜索结果提示',0);endelse showmessage('没有相关的户信息'); exit;end;问题基本解决,已经实现了地图定位以及结果闪烁,但在查询面积和租金的地方还有点错误由于对delphi不熟,请各位delphi高手指正! 在查询面积和租金的时候报错,对delphi的语法不太熟悉,请大伙指正! 警告楼主不要倒分http://community.csdn.net/Expert/topic/3322/3322493.xml?temp=.2152674http://community.csdn.net/Expert/topic/3308/3308296.xml?temp=.6293451 数据库?? ado+access用installshield打包遇到的问题,急! 欢迎大家提意见,开发一个打印组件 富有挑战性的问题! 关于dbgrid的排序 关于ListView的问题,还望大家多多指教! 如何按要求显示DBGrid中的数据 李维-商务篇-第二章第一个例子-在线等待 SendMessage 有没有人用过TMS的组件,他到底是不是免费的,如果我不order,组件会有什么限制? QQ左边栏的HotTrack效果怎样做出来的?关于图像叠加的问题 多光驱的缩进/弹出控制
mj1 : integer;
mj2 : integer;
zj1 : integer;
zj2 : integer;
ssql: string;
searchFeatures : Features;
EsearchFeatures : Features;
wid:string;beginmj1 := integer(txtmj1.Text);
mj2 := integer(txtmj2.Text);
zj1 := integer(txtzj1.Text);
zj2 := integer(txtzj2.Text);
if mj1 > mj2 then
mj1 := integer(txtmj2.Text);
mj2 := integer(txtmj1.Text);
if zj1 > zj2 then
zj1 := integer(txtzj2.Text);
zj2 := integer(txtzj1.Text);g_Title := '查询结果:';Map1.Layers.ClearSelection;ssql := 'select 组名,户编号 from TENANCY where 1=1 ';if txtssqy.Text <> '' then
ssql := ssql + ' and 所属区域 = ' + QuotedStr(txtssqy.Text);if txtlxr.Text <> '' then
ssql := ssql + ' and 联系人 = ' + QuotedStr(txtlxr.Text);if txtlxfs.Text <> '' then
ssql := ssql + ' and 联系方式 = ' + QuotedStr(txtlxfs.Text);if txtlxdz.Text <> '' then
ssql := ssql + ' and 联系地址 = ' + QuotedStr(txtlxdz.Text);if txthx.Text <> '' then
ssql := ssql + ' and 户型 = ' + QuotedStr(txthx.Text);if txtlc.Text <> '' then
ssql := ssql + ' and 楼层 = ' + QuotedStr(txtlc.Text);if txtwz.Text <> '' then
ssql := ssql + ' and 位置 = ' + QuotedStr(txtwz.Text);if (txtmj1.Text <> '') and (txtmj2.Text <> '') then
ssql := ssql + ' and 面积 > ' + string(mj1) + ' and 面积 < ' + string(mj2) ;if (txtzj1.Text <> '') and (txtzj2.Text <> '') then
ssql := ssql + ' and 租金 > ' + string(zj1) + ' and 租金 < ' +string(zj2);if txtfwss.Text <> '' then
ssql := ssql + ' and 房屋设施 = ' + QuotedStr(txtfwss.Text);ShowMessage(ssql);
adoSearch.Close;
adoSearch.sql.Clear;
adoSearch.sql.Add(ssql);
adoSearch.Open;if not adoSearch.Eof then
begin
adoSearch.First;
searchFeatures := searchLayer.NoFeatures;
EsearchFeatures := searchLayer.AllFeatures; while not adoSearch.Eof do
begin
wid:=adoSearch.fieldbyname('组名').asstring + adoSearch.fieldbyname('户编号').AsString; try
searchFeatures.Add(VsearchLayer.Search('GID="' + wid + '"'));
except
on Exception do
end; adoSearch.Next;
end; if searchFeatures.Count <> 0 then
begin
VsearchLayer.selection.add(searchFeatures);
g_ftrs := searchFeatures;
Self.dxDockSiteMain.ShowingControl := nil;
startTime := Now;
FlashTimer.Interval := myinifile.ReadInteger('FLASH', 'TimerInterval', 200);
flashTimer.Enabled := true;
end
else
Application.MessageBox('地图上没有相关的户信息.','搜索结果提示',0);
end
else
showmessage('没有相关的户信息');
exit;end;
问题基本解决,已经实现了地图定位以及结果闪烁,但在查询面积和租金的地方还有点错误
由于对delphi不熟,请各位delphi高手指正!
http://community.csdn.net/Expert/topic/3322/3322493.xml?temp=.2152674
http://community.csdn.net/Expert/topic/3308/3308296.xml?temp=.6293451