[ka-Map-users] mode nquery in kamap

Lorenzo Becchi lorenzo at ominiverdi.com
Fri Jun 26 17:29:18 EST 2009


you should be able to hack the print_map.php with the temporary mapfile 
made by index_query

lorenzo


Antonio García wrote:
> Thank for your answers Lorenzo and Raul, but I would like print the 
> poligon when I print with the pdf in KAMAP.
>  
> The contourn of index_query.html is very interesting, but if I can 
> print it, It is no good for me.
>  
> I would like an example for this code, because with my 
> ka-map-ms4w-1.0.zip I haven't your example and  index_query.html  is 
> not ok
>  
> Raul, Do you know the code (php_mapscript + javascript) for print the 
> poligon when i print the map?
>  
> Saludos,
> -----------
> Antonio García Benlloch
>
> *Correo:
> *angarben at hotmail.com
> angarben at aaa.upv.es <mailto:angarben at aaa.upv.es>
>
> *Web:
> *http://personales.alumno.upv.es/~angarben
>
>
>
>  
> > From: ka-map-users-request at lists.maptools.org
> > Subject: ka-Map-users Digest, Vol 50, Issue 5
> > To: ka-map-users at lists.maptools.org
> > Date: Tue, 16 Jun 2009 12:00:02 -0500
> >
> > Send ka-Map-users mailing list submissions to
> > ka-map-users at lists.maptools.org
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > http://lists.maptools.org/mailman/listinfo/ka-map-users
> > or, via email, send a message with subject or body 'help' to
> > ka-map-users-request at lists.maptools.org
> >
> > You can reach the person managing the list at
> > ka-map-users-owner at lists.maptools.org
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of ka-Map-users digest..."
> >
> >
> > Today's Topics:
> >
> > 1. Re: kaMap - setTile function - uses openstreetmap servers.
> > (Ionut Muntean)
> > 2. Re: mode nquery in kamap (Lorenzo Becchi)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Mon, 15 Jun 2009 23:32:36 +0300
> > From: Ionut Muntean <ionut at muntean.ro>
> > Subject: Re: [ka-Map-users] kaMap - setTile function - uses
> > openstreetmap servers.
> > To: Joe Franklin <traderboy at yahoo.com>
> > Cc: ka-map-users <ka-map-users at lists.maptools.org>
> > Message-ID: <4A36AFE4.7000507 at muntean.ro>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > nope. at least i am not aware of any modified tile.php. life and need
> > put me to do this hack on setTile. the big challange was (for me) to 
> put
> > azScales to match kaMap.
> >
> > kaMap display engine is fast and simple. nothing fancy, but very
> > functional. this is why i will use it as a starting point for 
> displaying
> > tiles in my projects. so, if i can hack into the js code of kaMap, why
> > use tile.php? ... or openlayers ...
> >
> > this could become a layer such as wmslayer ... maybe sometime when i
> > have time or maybe someone else could do this ;)
> >
> > ionut
> >
> > Joe Franklin wrote:
> > > very cool. has anyone modified tile.php so it can accept x/y/z 
> parameters instead of the top/left/scale parameters? then tile.php 
> could be used instead of TileCache which is written in Python instead 
> of PHP.
> > >
> > > joe
> > >
> > >
> > >
> > > --- On Mon, 5/25/09, Ionut Muntean <ionut at muntean.ro> wrote:
> > >
> > >
> > >> From: Ionut Muntean <ionut at muntean.ro>
> > >> Subject: [ka-Map-users] kaMap - setTile function - uses 
> openstreetmap servers.
> > >> To: "ka-map-users" <ka-map-users at lists.maptools.org>
> > >> Date: Monday, May 25, 2009, 6:52 AM
> > >> kaMap - setTile function - uses
> > >> openstreetmap servers.
> > >>
> > >> File that replaces init.php. Paste the code below in a file
> > >> on your
> > >> server and load it at run time instead of init.php.
> > >>
> > >> /*init*/
> > >> aszScales = new
> > >> Array('110936068.18103503','55468034.09051751','27734017.045258757',
> > >> '13867008.522629378','6933504.261313272','3466752.130658053',
> > >> '1733376.0653290264','866688.0326645132','433344.0163322566',
> > >> '216672.008164711','108336.00408377283','54168.002041886415',
> > >> '27084.001020943208','13542.000510471604','6771.000253818478',
> > >> '3385.5001283265624','1692.7500655806048');
> > >> var mResolutions = new Array('156543.0339', '78271.51695',
> > >>
> > >> '39135.758475', '19567.8792375', '9783.93961875',
> > >> '4891.969809375',
> > >> '2445.984904687',
> > >>
> > >> '1222.992452344',
> > >> '611.496226172',
> > >> '305.748113086', '152.874056543', '76.437028271',
> > >> '38.218514136',
> > >> '19.109257068',
> > >>
> > >> '9.554628534',
> > >> '4.777314267', '2.388657133',
> > >> '1.194328567', '0.597164284');
> > >> var map = new
> > >> 
> _map({name:'Terra',title:'World',currentScale:2,units:3,resolution:72,version:'3',scales:aszScales,
> > >>
> > >> resolutions:mResolutions});
> > >> map.setDefaultExtents(-20037508.34, -200037508.34,
> > >> 200037508.34,
> > >> 200037508.34);
> > >> map.setBackgroundColor('rgb(244,244,234)');
> > >> map.addLayer(new _layer( {
> > >> 
> name:'Terra',visible:true,opacity:100,imageformat:'png',queryable:false,tileSource:'auto',redrawInterval:-1,refreshInterval:-1,scales:
> > >>
> > >> new
> > >> 
> Array('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1')}));
> > >> this.addMap( map );
> > >> this.tileWidth=256;
> > >> this.tileHeight=256;
> > >> this.server = 'http://xxx.xxx.xxx/';
> > >> this.tileURL = 'http://a.tile.osm.dmtech.ro/tiles/';
> > >> this.cacheURL = 'http://localcache.xxx.xxx/tiles/';
> > >> this.selectMap('Terra');
> > >>
> > >>
> > >> Replace setTile with the function below.
> > >>
> > >> _layer.prototype.setTile = function(img) {
> > >> var tforce = _settings.alwaysForceDraw;
> > >> if (arguments.length == 2)
> > >> tforce = true;
> > >> var mercExtents = new
> > >> Array('-20037508.34', '20037508.34');
> > >> var zIdx = (this._map.currentScale + 2);
> > >> // osm zooms are from 0 to
> > >> 18. azScales contains only calculated scales from 2 to 18
> > >> ...
> > >> var res = this._map.resolutions[zIdx];
> > >> var km = this._map.kaMap;
> > >> var left = km.cellSize *
> > >> (safeParseInt(img.style.left) + km.xOrigin);
> > >> var top = -1 * km.cellSize *
> > >> (safeParseInt(img.style.top) + km.yOrigin);
> > >> var right = left + km.cellSize *
> > >> km.tileWidth;
> > >> var bottom = top - km.cellSize *
> > >> km.tileHeight;
> > >> if (left < mercExtents[0] || left >
> > >> mercExtents[2] || top <
> > >> mercExtents[0] || top > mercExtents[1]) return false;
> > >> var limit = Math.pow(2, zIdx);
> > >> var x = Math.round((left -
> > >> mercExtents[0]) / (res * km.tileWidth));
> > >> var y = Math.round((mercExtents[1] - top)
> > >> / (res * km.tileHeight));
> > >> if (y < 0 || y >= limit) return
> > >> false;
> > >> x = ((x % limit) + limit) % limit;
> > >> if (tforce) {
> > >> var src = this._map.kaMap.tileURL +
> > >> zIdx + '/' + x + '/' + y + '.png';
> > >> } else {
> > >> var src = this._map.kaMap.cacheURL +
> > >> zIdx + '/' + x + '/' + y +
> > >> '.png';
> > >> }
> > >> if (img.src != src) {
> > >> img.style.visibility =
> > >> 'hidden';
> > >> img.src = src;
> > >> }
> > >> };
> > >>
> > >>
> > >>
> > >> Have fun!
> > >> Ionut Muntean
> > >>
> > >>
> > >> _______________________________________________
> > >> ka-Map-users mailing list
> > >> ka-Map-users at lists.maptools.org
> > >> http://lists.maptools.org/mailman/listinfo/ka-map-users
> > >>
> > >>
> > >
> > >
> > >
> > >
> > >
> >
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: 
> http://lists.maptools.org/pipermail/ka-map-users/attachments/20090615/c61a760d/attachment-0001.htm 
>
> >
> > ------------------------------
> >
> > Message: 2
> > Date: Tue, 16 Jun 2009 00:21:33 +0200
> > From: Lorenzo Becchi <lorenzo at ominiverdi.com>
> > Subject: Re: [ka-Map-users] mode nquery in kamap
> > Cc: ka-map-users at lists.maptools.org
> > Message-ID: <4A36C96D.4020100 at ominiverdi.com>
> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> >
> > there's part of what you're looking for already in kaMap.
> > http://ominiverdi.org/ka-map/ka-map/htdocs/index_query.html
> > try to adjust to your needing
> > lorenzo
> >
> >
> > raul retamozo wrote:
> > >
> > > Hi, If you are working with mapserver in KaMap you can obtain the 
> same
> > > effect. Take note that KaMap is just an interface so you can code 
> with
> > > php_mapscript + javascript, improving Kamap to get the effect.
> > >
> > > Si estas trabajando con Mapserver en KaMapa puedes obtener el mismo
> > > efecto. Kamap No es otro Mapserver,es solo una interfaz, Solo debes
> > > codificar algo de php_mapscript y javascript.
> > >
> > > *Ra?l Retamozo ***
> > > **
> > >
> > >
> > >
> > >
> > > 
> ------------------------------------------------------------------------
> > > From: angarben at hotmail.com
> > > To: ka-map-users at lists.maptools.org
> > > Date: Sun, 14 Jun 2009 08:27:11 +0000
> > > Subject: [ka-Map-users] mode nquery in kamap
> > >
> > > In Mapserver when I query about a layer, I obtain a image of the map
> > > with the query object in red. How can I obtain this efect with Kamap?
> > >
> > > En castellano:
> > >
> > > En mapserver cuando consultas sobre una parcela se genera una imagen
> > > del mapa con esa parcela en rojo. ?Como puedo obtener este efecto en
> > > Kamap?
> > >
> > > Saludos,
> > > -----------
> > > Antonio Garc?a Benlloch
> > >
> > > *Correo:
> > > *angarben at hotmail.com
> > > angarben at aaa.upv.es <mailto:angarben at aaa.upv.es>
> > >
> > > *Web:
> > > *http://personales.alumno.upv.es/~angarben
> > > <http://personales.alumno.upv.es/%7Eangarben>
> > >
> > > 
> ------------------------------------------------------------------------
> > > Diferentes formas de estar en contacto con amigos y familiares.
> > > Desc?brelas. Desc?brelas.
> > > <http://www.microsoft.com/windows/windowslive/default.aspx>
> > >
> > > 
> ------------------------------------------------------------------------
> > > Nuevo Windows Live, un mundo lleno de posibilidades Desc?brelo.
> > > <http://www.microsoft.com/windows/windowslive/default.aspx>
> > > 
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > ka-Map-users mailing list
> > > ka-Map-users at lists.maptools.org
> > > http://lists.maptools.org/mailman/listinfo/ka-map-users
> > >
> >
> >
> > ------------------------------
> >
> > _______________________________________________
> > ka-Map-users mailing list
> > ka-Map-users at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/ka-map-users
> >
> >
> > End of ka-Map-users Digest, Vol 50, Issue 5
> > *******************************************
>
> ------------------------------------------------------------------------
> Nuevo Windows Live, un mundo lleno de posibilidades Descúbrelo. 
> <http://www.microsoft.com/windows/windowslive/default.aspx>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
>   


More information about the ka-Map-users mailing list