Integrating Google Map with erpnext

65 views
Skip to first unread message

saurabh palande

unread,
Sep 25, 2013, 2:26:57 AM9/25/13
to erpnext-dev...@googlegroups.com
Hi

I am trying to integrate  google map with erpnext

please consider attachments

1. Geocode.html : using for reference
2. mapwitherp.js : code as per erpnext javascript

gettting error in initialize function on this line as google is not defined :geocoder = new google.maps.Geocoder();

error is due to missing of this src="http://maps.google.com/maps/api/js?sensor=false

what should i do to include this scr in js file?

regards,
saurabh


Geocode.html
mapwitherp.js

Rushabh Mehta

unread,
Sep 25, 2013, 2:33:32 AM9/25/13
to erpnext-dev...@googlegroups.com
Please share code files via gist or pastebin


W: https://erpnext.com
T: @rushabh_mehta

--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<Geocode.html><mapwitherp.js>

Saurabh Palande

unread,
Sep 25, 2013, 2:59:21 AM9/25/13
to erpnext-dev...@googlegroups.com
Hi

apologies for attachments. please consider these links.

Link for Geocode.html: http://pastebin.com/wAS4CQ1X

Link for mapwitherp.js : http://pastebin.com/H8YDwfrj


java script is same in both but getting error at geocoder = new google.maps.Geocoder(); as google is not defined 
my  assumptions error is due to missing of "src="http://maps.google.com/maps/api/js?sensor=false"
what should i do ?
--
S.S.Palande

Saurabh Palande

unread,
Sep 25, 2013, 3:55:09 AM9/25/13
to erpnext-dev...@googlegroups.com
Hi,
I have resolved that error.
Please suggest me the way to achieve goal

--
S.S.Palande

Saurabh Palande

unread,
Sep 25, 2013, 5:13:00 AM9/25/13
to erpnext-dev...@googlegroups.com
Scenario:
I want to integrate google map with ERPNext in customer & lead form so it will display the location as per address.

Steps that I have followed:
1. On client form I have added one field with name MAP and set it type to HTML.
2. Wrote a script code in client.js Link for mapwitherp : http://pastebin.com/H8YDwfrj

My queries are
1.Is this correct a way?
2.which file I need to refer to add <div> on client form at runtime? 


--
S.S.Palande
Reply all
Reply to author
Forward
0 new messages