TravelMapping / Web

Web-facing tool/page development
8 stars 26 forks source link

Create chng template #785

Closed eeffaann closed 3 months ago

eeffaann commented 4 months ago

This is ready, but I'm not sure if/what/how to change any PHP files as necessary. I think we can start with this and better than nothing. Official signs have subscript for the last 2 characters of the 4-digit numbers.,,

michihdeu commented 4 months ago

It should work. If the route name needs to be modified, you can do it under: https://github.com/TravelMapping/Web/blob/master/shields/shieldgen.php#L46

jteresco commented 4 months ago

I don't think any PHP changes will be needed. Make it a regular PR instead of a draft if you'd like me to pull it in and give it a try.

michihdeu commented 4 months ago

There is no need to modify the php file if the G prefix is indicated on signs.

eeffaann commented 4 months ago

If it's quick and easy, please though go add in logic for, if more than 3 characters (G15xx), shrink the remaining characters: https://commons.wikimedia.org/wiki/Category:NTHS_Regional_Ring_Expressway_signposts_in_China#/media/File:China_Expwy_G9221_sign_no_name.svg

jteresco commented 4 months ago

I'm thinking that would be most easily (but not trivially) done by having separate .svgs for the longer route numbers, the PHP would pick which one based on length of the route number, then have separate text fields for the normal sized part and the smaller part and replace each separately.

eeffaann commented 4 months ago

Ha in that case, maybe let's just start with keeping it simple and then we can iterate from there then. This would be already be a pretty big improvement!

eeffaann commented 3 months ago

@michihdeu, it looks like G4 works now along with other single-digit routes, but the others still show the default one: https://travelmapping.net/shields/clinched.php?units=miles&u=nagamasa&cort=traveled&reload=true. Do you know what could be the case?

eeffaann commented 3 months ago

@michihdeu, it looks like G4 works now along with other single-digit routes, but the others still show the default one: https://travelmapping.net/shields/clinched.php?units=miles&u=nagamasa&cort=traveled&reload=true. Do you know what could be the case?

nvm I found the code in shieldgen to support _wide and _wide4, new PR: https://github.com/TravelMapping/Web/pull/792