Instead of creating a new mapPane for each layer you need to create just a
new layer and add that to the existing map content object.

Ian

On Tue, 10 Apr 2018, 02:11 NBA浪仔, <799052...@qq.com> wrote:

> Thanks a lot for your replay . Actually, I have realized the goal that one
> panel displays one shp map ,
> But I want to display two maps in one JPanel like this ,any suggestions?
> Otherwise,I want to realize zooming in and out in this JPanel,how should I
> do that?
>
>
>
> ------------------ 原始邮件 ------------------
> *发件人:* "Ian Turton"<ijtur...@gmail.com>;
> *发送时间:* 2018年4月10日(星期二) 凌晨0:34
> *收件人:* "NBA浪仔"<799052...@qq.com>;
> *抄送:* "geotools-devel"<geotools-de...@lists.sourceforge.net>;
> *主题:* Re: [Geotools-devel] An issue about showing more than one shp
> filesusing Swing component
>
> You need to create a second layer and add that to the map in exactly the
> same way as the first.
>
> Ian
>
> On 9 April 2018 at 11:32, NBA浪仔 <799052...@qq.com> wrote:
>
>> Dear Sir/Madam,
>>         With your help earlier,I can display one shp format map file in a
>> JPanel component,like this :
>>
>>
>> Now I want to display two shp format map files in the Swing component
>> --JPanel,how should I do that?
>>
>> Yours sincerely,
>> Ouyang
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> GeoTools-Devel mailing list
>> geotools-de...@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>>
>>
>
>
> --
> Ian Turton
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to