[Cartoweb-users] get PNGs

Oliver Christen oliver.christen at camptocamp.com
Thu Sep 14 02:00:07 EDT 2006


image is genetrated by the images coreplugin. The only problem here is the image path is not set as public and the plugin doesnt have accessor function.
so the first step would be to extend ClientImages 
(
class ClientImagesSomeNameYouWant extends ClientImages  { ... }
)

and add a public function getImagePath() {
    return $imagesResult;
}

now you just have to get the plugin and call the function: 
$imagepath = $this->cartoclient->getPluginManager()->getPlugin('imagesSomeNameYouWant ')->getImagePath();

or something like that
this exemple is in the case you are working on the client side in php

if you want to get it in javascript, you will have to write it into the template by using the RenderForm function (see exemples in any existing plugin) and your template will be something like this:
<script type="text/javascript">
/*<![CDATA[*/
pathtoimage = '{$pathToImage}';
/*]]>*/
</script>

maybe there is an easier way, but we are a bit busy with the FOSS4G event atm and i cant ask my colleagues about this, maybe next week.

regards
Oliver
  ----- Original Message ----- 
  From: guillaume champlong 
  To: carto web 
  Sent: Tuesday, September 12, 2006 12:14 PM
  Subject: RE: [Cartoweb-users] get PNGs


  thanks again for your reply.
  Finally, doesn't anyone know how to get this id dynamically?

  Mathieu Coudert <m.coudert at oieau.fr> a écrit :
    Hi guillaume,

    Have a look at cartoweb3/htdocs/generated/images/
    I don't know how to get the id of the generated image but you can just delete all the images of the repository and then you will see the new generated image.

    Mathieu

----------------------------------------------------------------------------

    De : cartoweb-users-bounces at lists.maptools.org [mailto:cartoweb-users-bounces at lists.maptools.org] De la part de guillaume champlong
    Envoyé : mardi 12 septembre 2006 09:34
    À : cartoweb-users at lists.maptools.org
    Objet : [Cartoweb-users] get PNGs

    hi all,

    I would like to know whether we can get the identifier of the .PNG generated files, and the directory where they are generated (if possible)? I thought they were in cartoweb3/www_data/images, but I have no images directory in www_data.

    Can anyone help me?

    thanks

    Guillaume.
      

----------------------------------------------------------------------------

    Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences. Cliquez ici. 
    -- 
    Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n'a ete trouve. 

    Les donnees et renseignements contenus dans ce message sont personnels, confidentiels et privés.Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee. 

    Any data and information contained in this electronic mail is personal, confidential and private. Any total or partial publication, use or distribution must be authorized. 

    -- 
    Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n'a ete trouve. 

    Les donnees et renseignements contenus dans ce message sont personnels, confidentiels et privés.Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee. 

    Any data and information contained in this electronic mail is personal, confidential and private. Any total or partial publication, use or distribution must be authorized. 




------------------------------------------------------------------------------
  Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences. Cliquez ici. 


------------------------------------------------------------------------------


  _______________________________________________
  Cartoweb-users mailing list
  Cartoweb-users at lists.maptools.org
  http://lists.maptools.org/mailman/listinfo/cartoweb-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20060914/e0879209/attachment.html


More information about the Cartoweb-users mailing list