[GraphHopper] How to initialize my own flagEncoder?
John Zhao
johnthu at gmail.com
Thu May 28 18:49:12 UTC 2015
Hi Peter,
I want to keep the compatibility of combine the existing flagEncoder with
my customized flagEncoder.
And intialize them from the properties file.
Could you elaborate a little bit more about the portability reason?
I am new to reflection.
*Best Regards,*
*ZhiQiang ZHAO*
On Thu, May 28, 2015 at 11:44 AM, Peter <graphhopper at gmx.de> wrote:
> Hi John,
>
> if you have a custom flagencoder why not just call
> new EncodingManager(new YourFlagEncoder()) ?
>
> Reflections was abandoned due to portability reasons but also it is not
> really necessary here, especially as you use it as a library and you have a
> custom flag encoder anyway.
>
> Regards,
> Peter
>
>
> On 28.05.2015 20:14, John Zhao wrote:
>
> Hi,
>
> I have a project which use GH as a library.
> I have implemented my own flag encoder, like xxxFlagEncoder.
> I don't figure out a good way to initialize it, except to change the
> EncodingManger to insert xxxFlagEncoder on parseEncoderString().
> I think it's better the change the way EncodingManger initialize all the
> flagEncoders.
> EncodingManger can use reflection to find the class or flagEncoder from
> its name, if we standardize the name and toString method.
>
> Do you think it's a good idea, or there is a better way?
>
>
>
> _______________________________________________
> GraphHopper mailing listGraphHopper at openstreetmap.orghttps://lists.openstreetmap.org/listinfo/graphhopper
>
>
>
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/graphhopper
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20150528/500f480b/attachment.html>
More information about the GraphHopper
mailing list