NetTalk Central

Author Topic: Mapping & Geocoding Part 2  (Read 10091 times)

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Mapping & Geocoding Part 2
« on: December 30, 2012, 11:28:38 AM »
In my previous example of mapping with NetTalk I used GoogleMaps.  There is a problem with that approach.  You are supposed to pay Google if you use the GoogleMaps API in a commercial venture.

Another alternative is to use the OpenLayers API which is built upon the OpenStreetMap project.

The OpenLayers API is free for personal and commercial use.

I have updated my example to include an example of a map using the OpenLayers API.  This map will display all markers/points in the database.  The map will automatically zoom out to include all markers.  If there's only one address in the database then it will zoom in pretty close.

Anyway, the coding is pretty rough on my part so no flaming there please.   ;D

Enjoy!

[attachment deleted by admin]
« Last Edit: December 30, 2012, 04:33:00 PM by DonRidley »
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Skip Williams

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Email
Re: Mapping & Geocoding Part 2
« Reply #1 on: January 01, 2013, 07:14:47 AM »
Hi Don.

This looks really interesting.  I hope to get a chance to play with it sometime this week.

Thanks for posting it.

Skip

Skip Williams

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Email
Re: Mapping & Geocoding Part 2
« Reply #2 on: January 01, 2013, 12:43:55 PM »
Here are a couple of links that might be useful...

http://leafletjs.com/features.html

and

http://www.netmagazine.com/features/top-seven-alternatives-google-maps-api

Leaflet looks pretty good...

Skip

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Mapping & Geocoding Part 2
« Reply #3 on: January 01, 2013, 06:51:02 PM »
Hey Skip,

LeafLet does look good!!  In fact, I will experiment with it ASAP.

Thanks for sharing that information!!

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Skip Williams

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Email
Re: Mapping & Geocoding Part 2
« Reply #4 on: January 26, 2013, 06:32:02 AM »
Hi Don,

Have you had any success with Leaflet?

Skip

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Mapping & Geocoding Part 2
« Reply #5 on: January 27, 2013, 03:25:10 AM »
Hi Don,

Have you had any success with Leaflet?

Skip


No.   I played around with it briefly but, no, I didn't have success with it.  (Not that it can't be done)

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Skip Williams

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Email
Re: Mapping & Geocoding Part 2
« Reply #6 on: January 28, 2013, 10:35:34 AM »
Thanks Don.

I haven't had a chance to look at it but may try in the next week or two....although if you didn't have much success, I may not either...<g>

skip

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Mapping & Geocoding Part 2
« Reply #7 on: January 28, 2013, 04:01:25 PM »
Oh no, I may not have communicated that properly.

I think Leaflet would definitely work but it's a different monster (slightly) than what I'm using.  So, I just haven't had enough time to sit and play around with the code and do a proper test.  I'm sure it would work.

Thanks for taking an interest in mapping with NetTalk.

I did a demo for a potential customer and when I showed him a sneak preview of the mapping.....wow!  He was impressed (actually his whole department was impressed.  He brought all of them to my demo.)

Thanks,

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Poul Jensen

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • Email
Re: Mapping & Geocoding Part 2
« Reply #8 on: September 10, 2013, 12:09:21 PM »
Hi,

Has anybody using OpenLayers tried reading positions off a textfile with this method:

            var newl = new OpenLayers.Layer.Text( "text", {location: "./textfile.txt"} );
            map.addLayer(newl);

This way I should be able to specify different icons for various positions.

Cheers,
/Poul