https://grid.plus.codes/ shows grid generation working with different map providers, including free OpenStreetMaps (click "LEAFLET" or "OPENLAYERS").
Source code for the grid server is here: https://github.com/google/open-location-code/tree/main/tile_server Sample code to integrate with free map tile providers is here: https://github.com/google/open-location-code/blob/main/tile_server/example.html Neither requires any paid license or network connection to Google. Cheers, Bill On Thu, Nov 24, 2022 at 7:11 AM Ramlaxman Prasad Rimal < heavenne...@gmail.com> wrote: > Thanks. > how can we implement a grid view on the map without paying a license? is > there any method to generate the overlay grid as like the google grid map? > > On Friday, November 4, 2022 at 12:20:30 AM UTC+5:45 Bill S wrote: > >> Hi, >> >> There are open source implementations of open location code that don't >> require any network dependency. >> >> For java, see: >> >> https://github.com/google/open-location-code/blob/main/java/src/main/java/com/google/openlocationcode/OpenLocationCode.java >> >> For PHP there are a couple implementations hosted elsewhere on github if >> you search "openlocationcode php". >> >> Hope that helps, >> Bill >> >> On Thursday, November 3, 2022 at 2:03:13 AM UTC-7 heave...@gmail.com >> wrote: >> >>> Please advise me on the formula for calculating the source of Google >>> plus code which can be accessed offline as well, without the need for plus >>> code API. >>> >>> I got these 2 examples >>> I need these on Java or Php >>> In case of two separate latitude & longitude fields are available >>> >>> IF(AND(Latitude,Longitude),SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(CONCATENATE("["&FLOOR(MOD(FLOOR((Latitude+90)*8000)/POWER(20,4),20))&"]","["&FLOOR(MOD(FLOOR((Longitude+180)*8000)/POWER(20,4),20))&"]","["&FLOOR(MOD(FLOOR((Latitude+90)*8000)/POWER(20,3),20))&"]","["&FLOOR(MOD(FLOOR((Longitude+180)*8000)/POWER(20,3),20))&"]","["&FLOOR(MOD(FLOOR((Latitude+90)*8000)/POWER(20,2),20))&"]","["&FLOOR(MOD(FLOOR((Longitude+180)*8000)/POWER(20,2),20))&"]","["&FLOOR(MOD(FLOOR((Latitude+90)*8000)/POWER(20,1),20))&"]","["&FLOOR(MOD(FLOOR((Longitude+180)*8000)/POWER(20,1),20))&"]","+","["&FLOOR(MOD(FLOOR((Latitude+90)*8000)/POWER(20,0),20))&"]","["&FLOOR(MOD(FLOOR((Longitude+180)*8000)/POWER(20,0),20))&"]"),"[0]","2"),"[1]","3"),"[2]","4"),"[3]","5"),"[4]","6"),"[5]","7"),"[6]","8"),"[7]","9"),"[8]","C"),"[9]","F"),"[10]","G"),"[11]","H"),"[12]","J"),"[13]","M"),"[14]","P"),"[15]","Q"),"[16]","R"),"[17]","V"),"[18]","W"),"[19]","X")) >>> >>> In case of one combined latitude & longitude field are available >>> IF(Location,SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(CONCATENATE("["&FLOOR(MOD(FLOOR((LEFT(SUBSTITUTE({Location}," >>> ",""),FIND(',',SUBSTITUTE({Location}," >>> ",""))-1)+90)*8000)/POWER(20,4),20))&"]","["&FLOOR(MOD(FLOOR((MID(SUBSTITUTE({Location}," >>> ",""),FIND(',',SUBSTITUTE({Location}," ",""))+1,LEN(SUBSTITUTE({Location}," >>> ","")))+180)*8000)/POWER(20,4),20))&"]","["&FLOOR(MOD(FLOOR((LEFT(SUBSTITUTE({Location}," >>> ",""),FIND(',',SUBSTITUTE({Location}," >>> ",""))-1)+90)*8000)/POWER(20,3),20))&"]","["&FLOOR(MOD(FLOOR((MID(SUBSTITUTE({Location}," >>> ",""),FIND(',',SUBSTITUTE({Location}," ",""))+1,LEN(SUBSTITUTE({Location}," >>> ","")))+180)*8000)/POWER(20,3),20))&"]","["&FLOOR(MOD(FLOOR((LEFT(SUBSTITUTE({Location}," >>> ",""),FIND(',',SUBSTITUTE({Location}," >>> ",""))-1)+90)*8000)/POWER(20,2),20))&"]","["&FLOOR(MOD(FLOOR((MID(SUBSTITUTE({Location}," >>> ",""),FIND(',',SUBSTITUTE({Location}," ",""))+1,LEN(SUBSTITUTE({Location}," >>> ","")))+180)*8000)/POWER(20,2),20))&"]","["&FLOOR(MOD(FLOOR((LEFT(SUBSTITUTE({Location}," >>> ",""),FIND(',',SUBSTITUTE({Location}," >>> ",""))-1)+90)*8000)/POWER(20,1),20))&"]","["&FLOOR(MOD(FLOOR((MID(SUBSTITUTE({Location}," >>> ",""),FIND(',',SUBSTITUTE({Location}," ",""))+1,LEN(SUBSTITUTE({Location}," >>> ","")))+180)*8000)/POWER(20,1),20))&"]","+","["&FLOOR(MOD(FLOOR((LEFT(SUBSTITUTE({Location}," >>> ",""),FIND(',',SUBSTITUTE({Location}," >>> ",""))-1)+90)*8000)/POWER(20,0),20))&"]","["&FLOOR(MOD(FLOOR((MID(SUBSTITUTE({Location}," >>> ",""),FIND(',',SUBSTITUTE({Location}," ",""))+1,LEN(SUBSTITUTE({Location}," >>> ","")))+180)*8000)/POWER(20,0),20))&"]"),"[0]","2"),"[1]","3"),"[2]","4"),"[3]","5"),"[4]","6"),"[5]","7"),"[6]","8"),"[7]","9"),"[8]","C"),"[9]","F"),"[10]","G"),"[11]","H"),"[12]","J"),"[13]","M"),"[14]","P"),"[15]","Q"),"[16]","R"),"[17]","V"),"[18]","W"),"[19]","X")) >>> >> -- Public site: http://www.openlocationcode.com/ Github project: https://github.com/google/open-location-code Demo site: http://plus.codes/ --- You received this message because you are subscribed to the Google Groups "Plus Codes Community Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-location-code+unsubscr...@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/open-location-code/CANaMn1B4tRxQEWvxGuBaOUn9b8h3wX7cWfDP%3DRGLy%3DvZ%2Bah2jg%40mail.gmail.com.