[mapserver-users] imagemaps using php mapscript?

P. R.M. romero619 at hotmail.com
Mon Mar 30 22:19:10 EDT 2009


Im bumping this message, hoping for some help/feedback (see below).
 
is there a problem with the mapserver mailing list? 
- several questions have gone by in the past few days (from both myself and other users) without any responses...

Please help,
 
Thanks,
P.Romero

----------------------------------------
> From: romero619 at hotmail.com
> To: iacovlev.pavel at gmail.com; mapserver-users at lists.osgeo.org
> Subject: RE: [mapserver-users] imagemaps using php mapscript?
> Date: Sat, 28 Mar 2009 13:08:27 -0700
> CC:
>
>
> thanks, but that didnt help much.
> I have this:
>
> $map = ms_newMapObj("/data/www/html/test/test.map");
> $img=$map->draw();
>
> $tmparray["img_url"] = $img->saveWebImage();
>
> # remove '/data/www/html' directory prefix
> # from the resulting url string
>
> $tmparray["img_url"] = substr($tmparray["img_url"],14,strlen($tmparray["img_url"]));
>
> $html=$map->processquerytemplate($tmparray);
> echo $html;
>
> However, the processquerytemplate() function is not processing the data in my points layer.
> the imagemap html tags are empty, even though the points from my points layer are correctly being drawn on the map image.
>
> Here's the relevant sections of my mapfile, including my points layer:
>
> OUTPUTFORMAT
> NAME 'html'
> DRIVER 'TEMPLATE'
> MIMETYPE 'text/html'
> FORMATOPTION 'FILE=/data/www/html/test/testmap.html'
> END
> QUERYMAP
> STATUS ON
> STYLE NORMAL
> END
> WEB
> QUERYFORMAT 'html'
> LOG "/data/www/html/test/mslog"
> IMAGEPATH "/data/www/html/images/mapserver/tmp/"
> IMAGEURL "/data/www/html/images/mapserver/tmp/"
> MAXSCALE 15500000
> END
> LAYER
> NAME "mypoints"
> STATUS DEFAULT
> CONNECTIONTYPE OGR
> CONNECTION "test.ovf"
> DATA "mypoints"
> TYPE POINT
> TEMPLATE "/data/www/html/test/testmap.html"
> CLASS
> NAME "None"
> STYLE
> SYMBOL 'arrow'
> ANGLE [ADIR]
> SIZE [MAG]
> END
> END
> END
>
> the documentation says that the processquerytemplate() function apparently only processes at the mapobject layer, so it doesnt seem to process each layer. Is this correct?
>
> How can I process the html template file using the points in my points layer?
>
> Please help,
> Thanks,
> P.Romero
> ________________________________
>> Date: Sat, 28 Mar 2009 21:29:35 +0200
>> Subject: Re: [mapserver-users] imagemaps using php mapscript?
>> From: iacovlev.pavel at gmail.com
>> To: romero619 at hotmail.com
>>
>> $image = $map->draw();
>>
>> ob_start();
>> $image->saveimage('');
>> $image = imagecreatefromstring(ob_get_contents());
>> $contents = ob_get_contents();
>> ob_end_clean();
>>
>> imagepng($image);
>>
>>
>> 2009/3/28 P.Romero>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> How can this example:
>>
>>
>>
>> http://mapserver.org/output/imagemaps.html?highlight=imagemap
>>
>>
>>
>>
>>
>>
>>
>>
>> be implemented using php mapscript?
>>
>>
>>
>>
>>
>>
>>
>> More specifically, how can the html output for the imagemap
>> be separated from the imageobject, and stored into a php variable?
>>
>>
>>
>>
>>
>>
>>
>> Im hoping for something like….
>>
>>
>>
>>
>>
>>
>>
>> $map = ms_newMapObj("mymapfile.map");
>>
>>
>>
>> $map_img=$img=$map->draw();
>>
>>
>>
>> $imagemap_html=$map->get_html_output();
>>
>>
>>
>>
>>
>>
>>
>> ...and then I can separately handle the image & html
>> output.
>>
>>
>>
>>
>>
>>
>>
>> Is this possible?
>>
>>
>>
>>
>>
>>
>>
>> Please help,
>>
>>
>>
>>
>>
>>
>>
>> Thanks,
>>
>>
>>
>> P.Romero
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>>
>> mapserver-users mailing list
>>
>> mapserver-users at lists.osgeo.org
>>
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>>
>>
>>
>> --
>> http://iap.md, The future is open
> _________________________________________________________________
> Express your personality in color! Preview and select themes for Hotmail®.
> http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme_______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
_________________________________________________________________
Express your personality in color! Preview and select themes for Hotmail®.
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme


More information about the mapserver-users mailing list