[Cartoweb-users] Locate Plugin

Oliver Christen oliver.christen at camptocamp.com
Fri Jan 30 05:00:11 EST 2009


hi

you can have a look at the recentering request, generated in the javascript 
function locate in the locate.tpl file,
more specifically, that the input_element.alt and item.id values are 
correct.
simply add :
alert(input_element.alt + "\n" + item.id)

then you can try to manually trigger the recentering via the url: 
?id_recenter_layer=...&id_recenter_ids=... to test if the basic recentering 
fonctionnality works at all.

if the input_element.alt or item.id values are not correct, you can try to 
see if the sql generated by the locate plugin is correct.

the sql is generated in ClientLocate.php function getList

simply add a:
print $sql;
after
$sql = sprintf($sql, $substr);

regards
Oliver

>
> Hi Christoph,
>
> Thanks for your reply.  I have tried the sql on the database directly, the
> recenter id exists.  Actually in the locate plugin I cannot recenter to 
> any
> of the features.  If the recenter layer is a shapefile, then the recenter
> works.
>
> Thanks again,
> Jady
>
>
> Lauber Christoph wrote:
>>
>> Hi Jady
>>
>> Have you tried to execute the sql directly on the database? This way you
>> can control if the recenter id really exists in your database.
>>
>> Regards,
>> Christoph
>>
>>
>> Hi list,
>>
>> I have developed a project with the locate plugin working fine.  However,
>> after I copied the project to another server, the recenter process of the
>> locate plugin failed, i.e. after I have chosen a value from the locate
>> plugin's autocompletion drop down list, its expected to zoom to the
>> feature
>> but it shows a message saying 'Recenter Id canceled, unable to find
>> selected
>> Id.'
>>
>> As everything works fine in the original server and I just simply copy 
>> the
>> project and the database to the new server, what could be the reason
>> causing
>> this?  (the recenter function in the search plugin is working without any
>> problem)
>>
>> Thanks a lot for any hints!!
>>
>> Best regards,
>>
>> Jady
>> --
>> View this message in context:
>> http://www.nabble.com/Locate-Plugin-tp21742863p21742863.html
>> Sent from the cartoweb-users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Cartoweb-users mailing list
>> Cartoweb-users at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>>
>>
>> _______________________________________________
>> Cartoweb-users mailing list
>> Cartoweb-users at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>>
>>
>
> -- 
> View this message in context: 
> http://www.nabble.com/Re%3A-Locate-Plugin-tp21742959p21743500.html
> Sent from the cartoweb-users mailing list archive at Nabble.com.
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
> 



More information about the Cartoweb-users mailing list